From 478740163b5b40f7569bf322db6931614a79cf91 Mon Sep 17 00:00:00 2001 From: David Berlioz Date: Thu, 21 Sep 2023 19:01:01 +0200 Subject: [PATCH 1/4] #620: add value KZ_VOEC --- lib/Model/OrdersV0/OrderItem.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/Model/OrdersV0/OrderItem.php b/lib/Model/OrdersV0/OrderItem.php index b40dded0e..b8b1b596b 100644 --- a/lib/Model/OrdersV0/OrderItem.php +++ b/lib/Model/OrdersV0/OrderItem.php @@ -276,13 +276,14 @@ class OrderItem extends BaseModel implements ModelInterface, ArrayAccess, \JsonS const DEEMED_RESELLER_CATEGORY_IOSS = 'IOSS'; const DEEMED_RESELLER_CATEGORY_UOSS = 'UOSS'; - const DEEMED_RESELLER_CATEGORY_SG_VOEC = 'SG_VOEC'; - const DEEMED_RESELLER_CATEGORY_GB_VOEC = 'GB_VOEC'; - const DEEMED_RESELLER_CATEGORY_NO_VOEC = 'NO_VOEC'; const DEEMED_RESELLER_CATEGORY_CA_MPF = 'CA_MPF'; const DEEMED_RESELLER_CATEGORY_AU_VOEC = 'AU_VOEC'; - const DEEMED_RESELLER_CATEGORY_NZ_VOEC = 'NZ_VOEC'; + const DEEMED_RESELLER_CATEGORY_GB_VOEC = 'GB_VOEC'; const DEEMED_RESELLER_CATEGORY_JE_VOEC = 'JE_VOEC'; + const DEEMED_RESELLER_CATEGORY_KZ_VOEC = 'KZ_VOEC'; + const DEEMED_RESELLER_CATEGORY_NO_VOEC = 'NO_VOEC'; + const DEEMED_RESELLER_CATEGORY_NZ_VOEC = 'NZ_VOEC'; + const DEEMED_RESELLER_CATEGORY_SG_VOEC = 'SG_VOEC'; const DEEMED_RESELLER_CATEGORY_CH_SUPPLIER_IMPORT = 'CH_SUPPLIER_IMPORT'; @@ -297,13 +298,14 @@ public function getDeemedResellerCategoryAllowableValues() $baseVals = [ self::DEEMED_RESELLER_CATEGORY_IOSS, self::DEEMED_RESELLER_CATEGORY_UOSS, - self::DEEMED_RESELLER_CATEGORY_SG_VOEC, + self::DEEMED_RESELLER_CATEGORY_AU_VOEC, + self::DEEMED_RESELLER_CATEGORY_CA_MPF, self::DEEMED_RESELLER_CATEGORY_GB_VOEC, + self::DEEMED_RESELLER_CATEGORY_JE_VOEC, + self::DEEMED_RESELLER_CATEGORY_KZ_VOEC, self::DEEMED_RESELLER_CATEGORY_NO_VOEC, - self::DEEMED_RESELLER_CATEGORY_CA_MPF, - self::DEEMED_RESELLER_CATEGORY_AU_VOEC, self::DEEMED_RESELLER_CATEGORY_NZ_VOEC, - self::DEEMED_RESELLER_CATEGORY_JE_VOEC, + self::DEEMED_RESELLER_CATEGORY_SG_VOEC, self::DEEMED_RESELLER_CATEGORY_CH_SUPPLIER_IMPORT, ]; From ebdc743da1f1e95cee86e423f66594a5a81a7dd8 Mon Sep 17 00:00:00 2001 From: David Berlioz Date: Mon, 8 Jan 2024 18:27:14 +0100 Subject: [PATCH 2/4] #621: deemed_reseller_category MY_VOEC --- lib/Model/OrdersV0/OrderItem.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Model/OrdersV0/OrderItem.php b/lib/Model/OrdersV0/OrderItem.php index b8b1b596b..111b19ed4 100644 --- a/lib/Model/OrdersV0/OrderItem.php +++ b/lib/Model/OrdersV0/OrderItem.php @@ -281,6 +281,7 @@ class OrderItem extends BaseModel implements ModelInterface, ArrayAccess, \JsonS const DEEMED_RESELLER_CATEGORY_GB_VOEC = 'GB_VOEC'; const DEEMED_RESELLER_CATEGORY_JE_VOEC = 'JE_VOEC'; const DEEMED_RESELLER_CATEGORY_KZ_VOEC = 'KZ_VOEC'; + const DEEMED_RESELLER_CATEGORY_MY_VOEC = 'MY_VOEC'; const DEEMED_RESELLER_CATEGORY_NO_VOEC = 'NO_VOEC'; const DEEMED_RESELLER_CATEGORY_NZ_VOEC = 'NZ_VOEC'; const DEEMED_RESELLER_CATEGORY_SG_VOEC = 'SG_VOEC'; @@ -303,6 +304,7 @@ public function getDeemedResellerCategoryAllowableValues() self::DEEMED_RESELLER_CATEGORY_GB_VOEC, self::DEEMED_RESELLER_CATEGORY_JE_VOEC, self::DEEMED_RESELLER_CATEGORY_KZ_VOEC, + self::DEEMED_RESELLER_CATEGORY_MY_VOEC, self::DEEMED_RESELLER_CATEGORY_NO_VOEC, self::DEEMED_RESELLER_CATEGORY_NZ_VOEC, self::DEEMED_RESELLER_CATEGORY_SG_VOEC, From 02904491883099247c9d2af62b580654548596b6 Mon Sep 17 00:00:00 2001 From: David Berlioz Date: Mon, 29 Jan 2024 16:09:40 +0100 Subject: [PATCH 3/4] #620: new value NG_VOEC --- lib/Model/OrdersV0/OrderItem.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Model/OrdersV0/OrderItem.php b/lib/Model/OrdersV0/OrderItem.php index 111b19ed4..59d41ad03 100644 --- a/lib/Model/OrdersV0/OrderItem.php +++ b/lib/Model/OrdersV0/OrderItem.php @@ -283,6 +283,7 @@ class OrderItem extends BaseModel implements ModelInterface, ArrayAccess, \JsonS const DEEMED_RESELLER_CATEGORY_KZ_VOEC = 'KZ_VOEC'; const DEEMED_RESELLER_CATEGORY_MY_VOEC = 'MY_VOEC'; const DEEMED_RESELLER_CATEGORY_NO_VOEC = 'NO_VOEC'; + const DEEMED_RESELLER_CATEGORY_NG_VOEC = 'NG_VOEC'; const DEEMED_RESELLER_CATEGORY_NZ_VOEC = 'NZ_VOEC'; const DEEMED_RESELLER_CATEGORY_SG_VOEC = 'SG_VOEC'; const DEEMED_RESELLER_CATEGORY_CH_SUPPLIER_IMPORT = 'CH_SUPPLIER_IMPORT'; @@ -306,6 +307,7 @@ public function getDeemedResellerCategoryAllowableValues() self::DEEMED_RESELLER_CATEGORY_KZ_VOEC, self::DEEMED_RESELLER_CATEGORY_MY_VOEC, self::DEEMED_RESELLER_CATEGORY_NO_VOEC, + self::DEEMED_RESELLER_CATEGORY_NG_VOEC, self::DEEMED_RESELLER_CATEGORY_NZ_VOEC, self::DEEMED_RESELLER_CATEGORY_SG_VOEC, self::DEEMED_RESELLER_CATEGORY_CH_SUPPLIER_IMPORT, From 4b3f60863655b90cb4efda477e239bbc8f4bddf5 Mon Sep 17 00:00:00 2001 From: David Berlioz Date: Sun, 3 Nov 2024 12:19:59 +0100 Subject: [PATCH 4/4] ugly fix for ResponsibleParty with '' value --- lib/Model/OrdersV0/TaxCollection.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Model/OrdersV0/TaxCollection.php b/lib/Model/OrdersV0/TaxCollection.php index 42b74044d..ea7ffbf1a 100644 --- a/lib/Model/OrdersV0/TaxCollection.php +++ b/lib/Model/OrdersV0/TaxCollection.php @@ -260,6 +260,9 @@ public function getResponsibleParty() */ public function setResponsibleParty($responsible_party) { + if (empty($responsible_party)) { + $responsible_party = null; + } $allowedValues = $this->getResponsiblePartyAllowableValues(); if (!is_null($responsible_party) &&!in_array(strtoupper($responsible_party), $allowedValues, true)) { throw new \InvalidArgumentException(