forked from davidtsadler/ebay-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eBay Tax fields added for EU IOSS in fulfillment order response
- Loading branch information
1 parent
9d9ace2
commit 64677b6
Showing
7 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* DO NOT EDIT THIS FILE! | ||
* | ||
* This file was automatically generated from external sources. | ||
* | ||
* Any manual change here will be lost the next time the SDK | ||
* is updated. You've been warned! | ||
*/ | ||
|
||
namespace DTS\eBaySDK\Fulfillment\Enums; | ||
|
||
class CollectionMethodEnum | ||
{ | ||
const C_INVOICE = 'INVOICE'; | ||
const C_NET = 'NET'; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* DO NOT EDIT THIS FILE! | ||
* | ||
* This file was automatically generated from external sources. | ||
* | ||
* Any manual change here will be lost the next time the SDK | ||
* is updated. You've been warned! | ||
*/ | ||
|
||
namespace DTS\eBaySDK\Fulfillment\Enums; | ||
|
||
class TaxTypeEnum | ||
{ | ||
const C_GST = 'GST'; | ||
const C_PROVINCE_SALES_TAX = 'PROVINCE_SALES_TAX'; | ||
const C_REGION = 'REGION'; | ||
const C_STATE_SALES_TAX = 'STATE_SALES_TAX'; | ||
const C_VAT = 'VAT'; | ||
const C_WHITE_GOODS_DISPOSABLE_TAX = 'WHITE_GOODS_DISPOSABLE_TAX'; | ||
const C_ELECTRONIC_RECYCLING_FEE = 'ELECTRONIC_RECYCLING_FEE'; | ||
const C_MATTRESS_RECYCLING_FEE = 'MATTRESS_RECYCLING_FEE'; | ||
const C_ADDITIONAL_FEE = 'ADDITIONAL_FEE'; | ||
const C_BATTERY_RECYCLING_FEE = 'BATTERY_RECYCLING_FEE'; | ||
const C_TIRE_RECYCLING_FEE = 'TIRE_RECYCLING_FEE'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* DO NOT EDIT THIS FILE! | ||
* | ||
* This file was automatically generated from external sources. | ||
* | ||
* Any manual change here will be lost the next time the SDK | ||
* is updated. You've been warned! | ||
*/ | ||
|
||
namespace DTS\eBaySDK\Fulfillment\Enums; | ||
|
||
class VatTaxTypeEnum | ||
{ | ||
const C_ABN = 'ABN'; | ||
const C_IOSS = 'IOSS'; | ||
const C_IRD = 'IRD'; | ||
const C_OSS = 'OSS'; | ||
const C_VOEC = 'VOEC'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/** | ||
* DO NOT EDIT THIS FILE! | ||
* | ||
* This file was automatically generated from external sources. | ||
* | ||
* Any manual change here will be lost the next time the SDK | ||
* is updated. You've been warned! | ||
*/ | ||
|
||
namespace DTS\eBaySDK\Fulfillment\Types; | ||
|
||
/** | ||
* | ||
* @property \DTS\eBaySDK\Fulfillment\Types\Amount $amount | ||
* @property \DTS\eBaySDK\Fulfillment\Types\EbayTaxReference $ebayReference | ||
* @property \DTS\eBaySDK\Fulfillment\Enums\TaxTypeEnum $taxType | ||
* @property \DTS\eBaySDK\Fulfillment\Enums\VatTaxTypeEnum $collectionMethod | ||
*/ | ||
class EbayCollectAndRemitTax extends \DTS\eBaySDK\Types\BaseType | ||
{ | ||
/** | ||
* @var array Properties belonging to objects of this class. | ||
*/ | ||
private static $propertyTypes = [ | ||
'amount' => [ | ||
'type' => 'DTS\eBaySDK\Fulfillment\Types\Amount', | ||
'repeatable' => false, | ||
'attribute' => false, | ||
'elementName' => 'amount' | ||
], | ||
'ebayReference' => [ | ||
'type' => 'DTS\eBaySDK\Fulfillment\Types\EbayTaxReference', | ||
'repeatable' => false, | ||
'attribute' => false, | ||
'elementName' => 'ebayReference' | ||
], | ||
'taxType' => [ | ||
'type' => 'string', | ||
'repeatable' => false, | ||
'attribute' => false, | ||
'elementName' => 'taxType' | ||
], | ||
'collectionMethod' => [ | ||
'type' => 'string', | ||
'repeatable' => false, | ||
'attribute' => false, | ||
'elementName' => 'collectionMethod' | ||
], | ||
]; | ||
|
||
/** | ||
* @param array $values Optional properties and values to assign to the object. | ||
*/ | ||
public function __construct(array $values = []) | ||
{ | ||
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values); | ||
|
||
parent::__construct($parentValues); | ||
|
||
if (!array_key_exists(__CLASS__, self::$properties)) { | ||
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes); | ||
} | ||
|
||
$this->setValues(__CLASS__, $childValues); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace DTS\eBaySDK\Fulfillment\Types; | ||
|
||
/** | ||
* | ||
* @property \DTS\eBaySDK\Fulfillment\Enums\VatTaxTypeEnum $name | ||
* @property string $name The value returned in this field is the VAT identifier number (VATIN), which will vary by country/region. | ||
* This field will be returned if VAT tax is applicable for the order. | ||
* The name field indicates the VAT tax type, which will vary by country/region: | ||
* ABN: eBay AU tax ID | ||
* IOSS: eBay EU IOSS number / eBay UK IOSS number | ||
* IRD: eBay NZ tax ID | ||
* OSS: eBay DE VAT ID | ||
* VOEC: eBay NO number | ||
* | ||
*/ | ||
class EbayTaxReference extends \DTS\eBaySDK\Types\BaseType | ||
{ | ||
/** | ||
* @var array Properties belonging to objects of this class. | ||
*/ | ||
private static $propertyTypes = [ | ||
'name' => [ | ||
'type' => 'string', | ||
'repeatable' => false, | ||
'attribute' => false, | ||
'elementName' => 'name' | ||
], | ||
'value' => [ | ||
'type' => 'string', | ||
'repeatable' => false, | ||
'attribute' => false, | ||
'elementName' => 'value' | ||
], | ||
]; | ||
|
||
/** | ||
* @param array $values Optional properties and values to assign to the object. | ||
*/ | ||
public function __construct(array $values = []) | ||
{ | ||
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values); | ||
|
||
parent::__construct($parentValues); | ||
|
||
if (!array_key_exists(__CLASS__, self::$properties)) { | ||
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes); | ||
} | ||
|
||
$this->setValues(__CLASS__, $childValues); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters