Skip to content

Commit

Permalink
eBay Tax fields added for EU IOSS in fulfillment order response
Browse files Browse the repository at this point in the history
  • Loading branch information
Caffe1neAdd1ct committed Jun 30, 2021
1 parent 9d9ace2 commit 64677b6
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Fulfillment/Enums/CollectionMethodEnum.php
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';

}

26 changes: 26 additions & 0 deletions src/Fulfillment/Enums/TaxTypeEnum.php
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';
}
20 changes: 20 additions & 0 deletions src/Fulfillment/Enums/VatTaxTypeEnum.php
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';
}
67 changes: 67 additions & 0 deletions src/Fulfillment/Types/EbayCollectAndRemitTax.php
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);
}
}
53 changes: 53 additions & 0 deletions src/Fulfillment/Types/EbayTaxReference.php
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);
}
}
7 changes: 7 additions & 0 deletions src/Fulfillment/Types/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @property \DTS\eBaySDK\Fulfillment\Types\AppliedPromotion[] $appliedPromotions
* @property \DTS\eBaySDK\Fulfillment\Types\DeliveryCost $deliveryCost
* @property \DTS\eBaySDK\Fulfillment\Types\Amount $discountedLineItemCost
* @property \DTS\eBaySDK\Fulfillment\Types\EbayCollectAndRemitTaxes $ebayCollectAndRemitTaxes
* @property \DTS\eBaySDK\Fulfillment\Types\GiftDetails $giftDetails
* @property string $legacyItemId
* @property string $legacyVariationId
Expand Down Expand Up @@ -57,6 +58,12 @@ class LineItem extends \DTS\eBaySDK\Types\BaseType
'attribute' => false,
'elementName' => 'discountedLineItemCost'
],
'ebayCollectAndRemitTaxes' => [
'type' => 'DTS\eBaySDK\Fulfillment\Types\EbayCollectAndRemitTaxes',
'repeatable' => true,
'attribute' => false,
'elementName' => 'ebayCollectAndRemitTaxes'
],
'giftDetails' => [
'type' => 'DTS\eBaySDK\Fulfillment\Types\GiftDetails',
'repeatable' => false,
Expand Down
7 changes: 7 additions & 0 deletions src/Fulfillment/Types/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @property string $buyerCheckoutNotes
* @property \DTS\eBaySDK\Fulfillment\Types\CancelStatus $cancelStatus
* @property string $creationDate
* @property boolean $ebayCollectAndRemitTax
* @property string[] $fulfillmentHrefs
* @property \DTS\eBaySDK\Fulfillment\Types\FulfillmentStartInstruction[] $fulfillmentStartInstructions
* @property string $lastModifiedDate
Expand Down Expand Up @@ -58,6 +59,12 @@ class Order extends \DTS\eBaySDK\Types\BaseType
'attribute' => false,
'elementName' => 'creationDate'
],
'ebayCollectAndRemitTax' => [
'type' => 'boolean',
'repeatable' => false,
'attribute' => false,
'elementName' => 'ebayCollectAndRemitTax'
],
'fulfillmentHrefs' => [
'type' => 'string',
'repeatable' => true,
Expand Down

0 comments on commit 64677b6

Please sign in to comment.