From e737ec4d8376db9cbf85979bd9888f6b0d8f6b80 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 1 Oct 2019 15:45:44 +0200 Subject: [PATCH 01/87] fixes the statusId of the WebHookModel which can be nullable --- resources/specification/openapi.json | 1 + src/Api/Generated/Model/WebHookModel.php | 10 +++++----- .../Generated/Normalizer/WebHookModelNormalizer.php | 4 +--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 5fd34788..2a1b76ed 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12690,6 +12690,7 @@ "type": "integer", "minimum": 1, "description": "The id of an order status. Only used with the order-status-changes event.", + "nullable": true, "example": 1 }, "url": { diff --git a/src/Api/Generated/Model/WebHookModel.php b/src/Api/Generated/Model/WebHookModel.php index ca028eb6..b6d129e0 100644 --- a/src/Api/Generated/Model/WebHookModel.php +++ b/src/Api/Generated/Model/WebHookModel.php @@ -25,7 +25,7 @@ class WebHookModel /** * The id of an order status. Only used with the order-status-changes event. * - * @var int + * @var int|null */ protected $statusId; /** @@ -100,20 +100,20 @@ public function setEvent(string $event) : self /** * The id of an order status. Only used with the order-status-changes event. * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The id of an order status. Only used with the order-status-changes event. * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index f73706be..913dddf5 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -57,9 +57,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEvent()) { $data->{'event'} = $object->getEvent(); } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); - } + $data->{'statusId'} = $object->getStatusId(); if (null !== $object->getUrl()) { $data->{'url'} = $object->getUrl(); } From ea63706635538ac438ea5a0e224ff8cda1a2378f Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 2 Oct 2019 08:54:08 +0200 Subject: [PATCH 02/87] update composer to use the forked janephp generator lib for now --- composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 87aae6e7..a38494e3 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,12 @@ "license": "BSD-3-Clause", "minimum-stability": "dev", "prefer-stable": true, + "repositories": [ + { + "type": "git", + "url": "https://github.com/lordrhodos/janephp.git" + } + ], "require": { "php": ">=7.2", "ext-json": "*", @@ -31,7 +37,7 @@ "symfony/property-info": "^4.1", "symfony/options-resolver": "^4.1", "psr/simple-cache": "^1.0", - "jane-php/jane-php": "dev-master" + "jane-php/jane-php": "dev-readonly-properties" }, "require-dev": { "phpunit/phpunit": "^8.1", From f3e515e93261262d72ec521e300264e6e7248b96 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 2 Oct 2019 08:54:32 +0200 Subject: [PATCH 03/87] adds generate script to composer which removes the generated files before regenerating them --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index a38494e3..9fc9f047 100644 --- a/composer.json +++ b/composer.json @@ -53,6 +53,7 @@ "psr-4": {"Starweb\\Tests\\": "tests/unit"} }, "scripts": { + "generate": "rm -r src/Api/Generated/* ; vendor/bin/jane-openapi generate", "phpunit": "vendor/bin/phpunit --stop-on-error --stop-on-failure", "phpunit-coverage-html": "vendor/bin/phpunit --stop-on-error --stop-on-failure --coverage-html ${baseDir}resources/test-coverage", "phpunit-coverage-text": "vendor/bin/phpunit --stop-on-error --stop-on-failure --coverage-text", From 2c249bebd036c63013d3d9c16939587d5ffbc203 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 2 Oct 2019 09:20:28 +0200 Subject: [PATCH 04/87] regenerate models with new read only property support --- .../Normalizer/AddressModelItemNormalizer.php | 3 - .../BundledProductsModelItemNormalizer.php | 3 - .../CurrencyModelItemNormalizer.php | 3 - .../Normalizer/CurrencyModelNormalizer.php | 3 - .../CustomerAddedTagModelItemNormalizer.php | 3 - .../CustomerAddedTagModelNormalizer.php | 3 - ...AddressesModelCollectionDataNormalizer.php | 6 -- .../CustomerAddressesModelItemNormalizer.php | 3 - .../CustomerCreatedModelItemNormalizer.php | 3 - .../CustomerCreatedModelNormalizer.php | 11 ---- ...merExternalServicesModelItemNormalizer.php | 3 - .../CustomerModelCollectionMetaNormalizer.php | 3 - .../CustomerModelItemNormalizer.php | 3 - .../Normalizer/CustomerModelNormalizer.php | 11 ---- .../CustomerTagModelItemNormalizer.php | 3 - .../Normalizer/CustomerTagModelNormalizer.php | 6 -- ...CustomerUpdateModelAddressesNormalizer.php | 6 -- .../CustomerUpdateModelNormalizer.php | 6 -- .../Normalizer/ErrorModelNormalizer.php | 6 -- ...MediaFileModelCollectionMetaNormalizer.php | 3 - .../MediaFileModelItemNormalizer.php | 3 - .../Normalizer/MediaFileModelNormalizer.php | 27 --------- .../OrderAddressCollectionNormalizer.php | 3 - .../OrderAddressModelNormalizer.php | 18 ------ .../OrderCommentModelItemNormalizer.php | 3 - .../OrderCommentModelNormalizer.php | 3 - .../OrderExternalServiceModelNormalizer.php | 3 - ...derExternalServicesModelItemNormalizer.php | 3 - .../OrderItemModelItemNormalizer.php | 3 - .../Normalizer/OrderItemModelNormalizer.php | 3 - .../OrderModelCollectionMetaNormalizer.php | 3 - .../Normalizer/OrderModelItemNormalizer.php | 3 - .../Normalizer/OrderModelNormalizer.php | 57 ------------------- .../Normalizer/OrderPutModelNormalizer.php | 45 --------------- .../OrderStatusModelItemNormalizer.php | 3 - .../Normalizer/OrderStatusModelNormalizer.php | 6 -- .../Normalizer/OrderUpdateModelNormalizer.php | 45 --------------- .../Normalizer/PaginationModelNormalizer.php | 15 ----- .../PaymentMethodLanguageModelNormalizer.php | 12 ---- .../PaymentMethodModelItemNormalizer.php | 3 - .../PaymentMethodModelNormalizer.php | 36 ------------ .../PricelistModelItemNormalizer.php | 3 - .../Normalizer/PricelistModelNormalizer.php | 25 -------- ...tBundleProductPriceModelItemNormalizer.php | 3 - ...ProductCategoryLinkModelItemNormalizer.php | 3 - ...tCategoryModelCollectionMetaNormalizer.php | 3 - .../ProductCategoryModelItemNormalizer.php | 3 - .../ProductCategoryModelNormalizer.php | 9 --- ...roductCategoryModelUpdatableNormalizer.php | 6 -- .../ProductLanguageModelItemNormalizer.php | 3 - ...ProductManufacturerModelItemNormalizer.php | 3 - .../ProductManufacturerModelNormalizer.php | 3 - ...roductMediaFileLinkModelItemNormalizer.php | 3 - .../ProductMediaFileLinkModelNormalizer.php | 6 -- .../ProductMetaDataModelItemNormalizer.php | 3 - .../ProductMetaDataModelNormalizer.php | 3 - ...roductMetaDataModelUpdatableNormalizer.php | 3 - ...ProductMetaDataTypeModelItemNormalizer.php | 3 - .../ProductMetaDataTypeModelNormalizer.php | 6 -- ...ctMetaDataTypeModelUpdatableNormalizer.php | 3 - ...uctMetaLanguageDataModelItemNormalizer.php | 3 - .../ProductModelCollectionMetaNormalizer.php | 3 - .../Normalizer/ProductModelItemNormalizer.php | 3 - .../Normalizer/ProductModelNormalizer.php | 30 ---------- .../ProductModelPatchableNormalizer.php | 9 --- .../ProductModelUpdatableNormalizer.php | 9 --- .../ProductStockStatusModelItemNormalizer.php | 3 - .../ProductStockStatusModelNormalizer.php | 6 -- .../ProductTagLinkModelItemNormalizer.php | 3 - .../ProductTagModelItemNormalizer.php | 3 - .../Normalizer/ProductTagModelNormalizer.php | 6 -- .../ProductTagOptionModelItemNormalizer.php | 3 - .../ProductTagOptionModelNormalizer.php | 6 -- .../ProductUnitModelItemNormalizer.php | 3 - .../Normalizer/ProductUnitModelNormalizer.php | 6 -- ...uctVariantAttributeModelItemNormalizer.php | 3 - ...riantAttributeModelUpdatableNormalizer.php | 3 - ...riantAttributeValueModelItemNormalizer.php | 3 - .../ProductVariantModelItemNormalizer.php | 3 - ...ProductVariantPriceModelItemNormalizer.php | 3 - ...ProductVariantStockModelItemNormalizer.php | 3 - ...uctVariantStockResponseModelNormalizer.php | 3 - ...tVariantVolumePriceModelItemNormalizer.php | 3 - .../ProductVatRateModelItemNormalizer.php | 3 - .../ShippingMethodLanguageModelNormalizer.php | 12 ---- .../ShippingMethodModelItemNormalizer.php | 3 - .../ShippingMethodModelNormalizer.php | 29 ---------- .../ShippingTrackingTypeModelNormalizer.php | 6 -- .../Normalizer/ShopItemNormalizer.php | 3 - .../Normalizer/ShopModelNormalizer.php | 52 ----------------- .../StockLocationModelItemNormalizer.php | 3 - .../StockLocationModelNormalizer.php | 6 -- ...tockLocationPostRequestModelNormalizer.php | 3 - ...StockLocationPutRequestModelNormalizer.php | 3 - .../Normalizer/TokenModelNormalizer.php | 9 --- .../Normalizer/VatRateModelItemNormalizer.php | 3 - .../Normalizer/WebHookModelItemNormalizer.php | 3 - .../Normalizer/WebHookModelNormalizer.php | 3 - 98 files changed, 743 deletions(-) diff --git a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php index 50b572a4..6df91825 100644 --- a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php index cc9fb4fc..2addd86c 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php index d93b804f..1b3ebcd6 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index cb347dba..c7df8a0c 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -42,9 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCode()) { - $data->{'code'} = $object->getCode(); - } if (null !== $object->getExchangeRate()) { $data->{'exchangeRate'} = $object->getExchangeRate(); } diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php index a05c0833..5a23385f 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index dc385839..2b008240 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -42,9 +42,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php index 6687ce8d..7a09dbf5 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getInvoice()) { - $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); - } - if (null !== $object->getDelivery()) { - $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php index e9e72c86..191cf9cf 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php index ca582533..f49e2781 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 93f766f6..6304fc7c 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -69,9 +69,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -93,14 +90,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - $data->{'approved'} = $object->getApproved(); - if (null !== $object->getApprovedAt()) { - $data->{'approvedAt'} = $object->getApprovedAt(); - } - $data->{'pricelistId'} = $object->getPricelistId(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php index c7451376..2163bc53 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php index ae06fc95..0078ef31 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php index c2bf374d..14e29e41 100644 --- a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index ef16f527..c0e3ee08 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -69,9 +69,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -93,14 +90,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - $data->{'approved'} = $object->getApproved(); - if (null !== $object->getApprovedAt()) { - $data->{'approvedAt'} = $object->getApprovedAt(); - } - $data->{'pricelistId'} = $object->getPricelistId(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php index fb18ef1b..4bb6f431 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index 35b82458..80c6b298 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getTagId()) { - $data->{'tagId'} = $object->getTagId(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php index 8b8c0290..f6a85f6e 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getInvoice()) { - $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); - } - if (null !== $object->getDelivery()) { - $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index 0ff33906..af8afda6 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -66,9 +66,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -91,9 +88,6 @@ public function normalize($object, $format = null, array $context = array()) $data->{'customInfo2'} = $object->getCustomInfo2(); } $data->{'pricelistId'} = $object->getPricelistId(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index 26c3c1b8..66ade103 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getError()) { - $data->{'error'} = $object->getError(); - } - if (null !== $object->getErrorDescription()) { - $data->{'error_description'} = $object->getErrorDescription(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php index 1be86293..1d4eccc8 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php index 99d866bd..65cf0f2c 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index abe862f7..3c7c65a6 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -60,33 +60,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getMediaFileId()) { - $data->{'mediaFileId'} = $object->getMediaFileId(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getSize()) { - $data->{'size'} = $object->getSize(); - } - if (null !== $object->getMime()) { - $data->{'mime'} = $object->getMime(); - } - if (null !== $object->getHeight()) { - $data->{'height'} = $object->getHeight(); - } - if (null !== $object->getWidth()) { - $data->{'width'} = $object->getWidth(); - } - if (null !== $object->getUrl()) { - $data->{'url'} = $object->getUrl(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php index 3c799f0f..8918da80 100644 --- a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index 433be7f8..3115da98 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -51,24 +51,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOriginalInvoice()) { - $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); - } - if (null !== $object->getOriginalDelivery()) { - $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); - } - if (null !== $object->getCustomerInvoice()) { - $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); - } - if (null !== $object->getCustomerDelivery()) { - $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); - } - if (null !== $object->getPaymentMethodInvoice()) { - $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); - } - if (null !== $object->getPaymentMethodDelivery()) { - $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php index 168df8f1..b7a8a18e 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index 0ae895ac..3135d6e0 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -45,9 +45,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCommentId()) { - $data->{'commentId'} = $object->getCommentId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index a0887758..d507f80e 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -48,9 +48,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } - if (null !== $object->getReadOnly()) { - $data->{'readOnly'} = $object->getReadOnly(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php index cc189881..8b461161 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php index a458d194..d9a3eb4d 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index 043c7e19..a353186a 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -63,9 +63,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getItemId()) { - $data->{'itemId'} = $object->getItemId(); - } if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php index 428355bf..972cafe4 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php index 65d2e2ce..ec46a196 100644 --- a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index f613aadb..188c67e0 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -198,36 +198,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOrderId()) { - $data->{'orderId'} = $object->getOrderId(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getBaseCurrencyCode()) { - $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } - if (null !== $object->getTotalAmount()) { - $data->{'totalAmount'} = $object->getTotalAmount(); - } - if (null !== $object->getTotalVat()) { - $data->{'totalVat'} = $object->getTotalVat(); - } - if (null !== $object->getAmountToPay()) { - $data->{'amountToPay'} = $object->getAmountToPay(); - } - if (null !== $object->getTotalAmountInBaseCurrency()) { - $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); - } - if (null !== $object->getTotalVatInBaseCurrency()) { - $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); - } - if (null !== $object->getAmountToPayInBaseCurrency()) { - $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -252,9 +222,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodIdCode()) { - $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -273,9 +240,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - if (null !== $object->getTotalWeight()) { - $data->{'totalWeight'} = $object->getTotalWeight(); - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -294,9 +258,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - if (null !== $object->getAmountPaidInBaseCurrency()) { - $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -321,9 +282,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - if (null !== $object->getHasComments()) { - $data->{'hasComments'} = $object->getHasComments(); - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } @@ -348,21 +306,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } - if (null !== $object->getItems()) { - $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context); - } - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); - } - if (null !== $object->getExternalServices()) { - $data->{'externalServices'} = $this->normalizer->normalize($object->getExternalServices(), 'json', $context); - } - if (null !== $object->getCustomer()) { - $data->{'customer'} = $this->normalizer->normalize($object->getCustomer(), 'json', $context); - } - if (null !== $object->getStatus()) { - $data->{'status'} = $this->normalizer->normalize($object->getStatus(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index cfd5a6b5..e708e51f 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -190,36 +190,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOrderId()) { - $data->{'orderId'} = $object->getOrderId(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getBaseCurrencyCode()) { - $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } - if (null !== $object->getTotalAmount()) { - $data->{'totalAmount'} = $object->getTotalAmount(); - } - if (null !== $object->getTotalVat()) { - $data->{'totalVat'} = $object->getTotalVat(); - } - if (null !== $object->getAmountToPay()) { - $data->{'amountToPay'} = $object->getAmountToPay(); - } - if (null !== $object->getTotalAmountInBaseCurrency()) { - $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); - } - if (null !== $object->getTotalVatInBaseCurrency()) { - $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); - } - if (null !== $object->getAmountToPayInBaseCurrency()) { - $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -241,9 +211,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodIdCode()) { - $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -262,9 +229,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - if (null !== $object->getTotalWeight()) { - $data->{'totalWeight'} = $object->getTotalWeight(); - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -283,9 +247,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - if (null !== $object->getAmountPaidInBaseCurrency()) { - $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -310,9 +271,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - if (null !== $object->getHasComment()) { - $data->{'hasComment'} = $object->getHasComment(); - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } @@ -344,9 +302,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php index eb34d7d9..eb1c4251 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index a08745a7..70026add 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -49,15 +49,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); - } if (null !== $object->getShouldSendEmail()) { $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index 47ef7afc..9cee8c72 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -190,36 +190,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOrderId()) { - $data->{'orderId'} = $object->getOrderId(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getBaseCurrencyCode()) { - $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } - if (null !== $object->getTotalAmount()) { - $data->{'totalAmount'} = $object->getTotalAmount(); - } - if (null !== $object->getTotalVat()) { - $data->{'totalVat'} = $object->getTotalVat(); - } - if (null !== $object->getAmountToPay()) { - $data->{'amountToPay'} = $object->getAmountToPay(); - } - if (null !== $object->getTotalAmountInBaseCurrency()) { - $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); - } - if (null !== $object->getTotalVatInBaseCurrency()) { - $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); - } - if (null !== $object->getAmountToPayInBaseCurrency()) { - $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -241,9 +211,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodIdCode()) { - $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -262,9 +229,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - if (null !== $object->getTotalWeight()) { - $data->{'totalWeight'} = $object->getTotalWeight(); - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -283,9 +247,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - if (null !== $object->getAmountPaidInBaseCurrency()) { - $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -310,9 +271,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - if (null !== $object->getHasComment()) { - $data->{'hasComment'} = $object->getHasComment(); - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } @@ -344,9 +302,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index 5e306c04..26d4727f 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -48,21 +48,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCurrentPage()) { - $data->{'current_page'} = $object->getCurrentPage(); - } - if (null !== $object->getPerPage()) { - $data->{'per_page'} = $object->getPerPage(); - } - if (null !== $object->getTotal()) { - $data->{'total'} = $object->getTotal(); - } - if (null !== $object->getCount()) { - $data->{'count'} = $object->getCount(); - } - if (null !== $object->getTotalPages()) { - $data->{'total_pages'} = $object->getTotalPages(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index 8f787a89..c9e4b4ec 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -45,18 +45,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getTitle()) { - $data->{'title'} = $object->getTitle(); - } - if (null !== $object->getShortDescription()) { - $data->{'shortDescription'} = $object->getShortDescription(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php index f5bdd1d5..ec43eb63 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index 6a260cd5..7cfec7f8 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -79,42 +79,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPaymentMethodId()) { - $data->{'paymentMethodId'} = $object->getPaymentMethodId(); - } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } - if (null !== $object->getActive()) { - $data->{'active'} = $object->getActive(); - } - if (null !== $object->getFee()) { - $data->{'fee'} = $object->getFee(); - } - if (null !== $object->getValidForCountries()) { - $data->{'validForCountries'} = $object->getValidForCountries(); - } - if (null !== $object->getValidCountriesSelected()) { - $values = array(); - foreach ($object->getValidCountriesSelected() as $value) { - $values[] = $value; - } - $data->{'validCountriesSelected'} = $values; - } - $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal(); - $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal(); - $data->{'validForMinWeight'} = $object->getValidForMinWeight(); - $data->{'validForMaxWeight'} = $object->getValidForMaxWeight(); - if (null !== $object->getValidForShippingMethods()) { - $data->{'validForShippingMethods'} = $object->getValidForShippingMethods(); - } - $data->{'validForCustomerType'} = $object->getValidForCustomerType(); - if (null !== $object->getIsClickAndCollect()) { - $data->{'isClickAndCollect'} = $object->getIsClickAndCollect(); - } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php index 108f0412..c54ec661 100644 --- a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index c1f0130b..23e6d5fa 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -67,31 +67,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPricelistId()) { - $data->{'pricelistId'} = $object->getPricelistId(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getIsMaster()) { - $data->{'isMaster'} = $object->getIsMaster(); - } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - if (null !== $object->getRegion()) { - $data->{'region'} = $object->getRegion(); - } - if (null !== $object->getCountryCodes()) { - $values = array(); - foreach ($object->getCountryCodes() as $value) { - $values[] = $value; - } - $data->{'countryCodes'} = $values; - } - if (null !== $object->getCurrencyCode()) { - $data->{'currencyCode'} = $object->getCurrencyCode(); - } if (null !== $object->getParentPricelistId()) { $data->{'parentPricelistId'} = $object->getParentPricelistId(); } diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php index a17082ff..6026b862 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php index 1c2c35e7..983e41c8 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php index c5837ff6..04ffc1ea 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php index 141196d8..3876d525 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index db80be90..9499c9b9 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -63,9 +63,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCategoryId()) { - $data->{'categoryId'} = $object->getCategoryId(); - } if (null !== $object->getParentId()) { $data->{'parentId'} = $object->getParentId(); } @@ -87,12 +84,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } - if (null !== $object->getHasChildren()) { - $data->{'hasChildren'} = $object->getHasChildren(); - } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index 92dce4a5..94a943bd 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -67,9 +67,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCategoryId()) { - $data->{'categoryId'} = $object->getCategoryId(); - } if (null !== $object->getParentId()) { $data->{'parentId'} = $object->getParentId(); } @@ -91,9 +88,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } - if (null !== $object->getHasChildren()) { - $data->{'hasChildren'} = $object->getHasChildren(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php index 55436d49..161b51f2 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php index 6670e94c..8f964918 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 03f11fe1..0be727ec 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -42,9 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getManufacturerId()) { - $data->{'manufacturerId'} = $object->getManufacturerId(); - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php index 8db97891..14fcfff1 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index a46e6587..8d0c92e1 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -45,18 +45,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductMediaFileId()) { - $data->{'productMediaFileId'} = $object->getProductMediaFileId(); - } if (null !== $object->getMediaFileId()) { $data->{'mediaFileId'} = $object->getMediaFileId(); } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php index 0bd54b86..041df003 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php index 2bda58b0..fffa4911 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php @@ -54,9 +54,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index af99e203..e39241da 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -49,9 +49,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getMetaDataId()) { - $data->{'metaDataId'} = $object->getMetaDataId(); - } if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php index 1ff559b6..ba432e14 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index e2939b5f..e0c3bc5b 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getMetaDataTypeId()) { - $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); - } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php index e7be3636..a3bd12af 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php index 7f6b97a8..840a73f3 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php index b8f098cc..ea83cc5d 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php index 228f9237..bcc89574 100644 --- a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 53db6282..76b43f4e 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -106,9 +106,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductId()) { - $data->{'productId'} = $object->getProductId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -139,36 +136,9 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getHasSeveralVariants()) { - $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getVariants()) { - $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context); - } - if (null !== $object->getBundledProducts()) { - $data->{'bundledProducts'} = $this->normalizer->normalize($object->getBundledProducts(), 'json', $context); - } - if (null !== $object->getMediaFiles()) { - $data->{'mediaFiles'} = $this->normalizer->normalize($object->getMediaFiles(), 'json', $context); - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - if (null !== $object->getVatRates()) { - $data->{'vatRates'} = $this->normalizer->normalize($object->getVatRates(), 'json', $context); - } - if (null !== $object->getCategories()) { - $data->{'categories'} = $this->normalizer->normalize($object->getCategories(), 'json', $context); - } - if (null !== $object->getUnit()) { - $data->{'unit'} = $this->normalizer->normalize($object->getUnit(), 'json', $context); - } - if (null !== $object->getMetaData()) { - $data->{'metaData'} = $this->normalizer->normalize($object->getMetaData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 253025ba..4823e3b4 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -117,9 +117,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductId()) { - $data->{'productId'} = $object->getProductId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -150,12 +147,6 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getHasSeveralVariants()) { - $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } if (null !== $object->getMediaFiles()) { $values_1 = array(); foreach ($object->getMediaFiles() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 5c33fc23..4691450d 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -131,9 +131,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductId()) { - $data->{'productId'} = $object->getProductId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -164,12 +161,6 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getHasSeveralVariants()) { - $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } if (null !== $object->getVariants()) { $values_1 = array(); foreach ($object->getVariants() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index 51190bde..aee9d9c3 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php index 9b96d99a..334d78a2 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php @@ -58,12 +58,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php index 91b1da2c..f4d3bbe4 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php index d6415033..f1812b21 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index 5c68b5ca..aa873feb 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -46,12 +46,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getTagId()) { - $data->{'tagId'} = $object->getTagId(); - } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php index 36a4b262..f1468bec 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index 058bb37b..018bd13e 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -49,12 +49,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getTagOptionId()) { - $data->{'tagOptionId'} = $object->getTagOptionId(); - } - if (null !== $object->getValue()) { - $data->{'value'} = $object->getValue(); - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } diff --git a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php index 7056bc2d..29bec22e 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index f7516b13..e07ab929 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getUnitId()) { - $data->{'unitId'} = $object->getUnitId(); - } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php index 066f2ad9..0143bbb1 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index a751b3c0..0f1872b2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -43,9 +43,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getAttributeId()) { - $data->{'attributeId'} = $object->getAttributeId(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php index 25a677a7..98436199 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index 15cb6c96..5dabefb6 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php index e14984fd..97ecd267 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php index 725d0316..ed4000a9 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index 185b087f..312036b2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -42,9 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStockLocationId()) { - $data->{'stockLocationId'} = $object->getStockLocationId(); - } if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php index 7ed90c45..6a46149a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php index 1cf8724f..1020624a 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index fb5110de..6d6fc5ef 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -45,18 +45,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getTitle()) { - $data->{'title'} = $object->getTitle(); - } - if (null !== $object->getShortDescription()) { - $data->{'shortDescription'} = $object->getShortDescription(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php index 18ba63b1..b0d80b86 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index 1c91b5e5..63f868d3 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -76,35 +76,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getShippingMethodId()) { - $data->{'shippingMethodId'} = $object->getShippingMethodId(); - } - if (null !== $object->getActive()) { - $data->{'active'} = $object->getActive(); - } - if (null !== $object->getValidForCountries()) { - $data->{'validForCountries'} = $object->getValidForCountries(); - } - if (null !== $object->getValidCountriesSelected()) { - $values = array(); - foreach ($object->getValidCountriesSelected() as $value) { - $values[] = $value; - } - $data->{'validCountriesSelected'} = $values; - } - $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal(); - $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal(); - $data->{'validForMinWeight'} = $object->getValidForMinWeight(); - $data->{'validForMaxWeight'} = $object->getValidForMaxWeight(); - $data->{'validForCustomerType'} = $object->getValidForCustomerType(); - $data->{'freeShippingMinItemsSubtotal'} = $object->getFreeShippingMinItemsSubtotal(); - $data->{'freeShippingMinWeight'} = $object->getFreeShippingMinWeight(); - if (null !== $object->getIsClickAndCollect()) { - $data->{'isClickAndCollect'} = $object->getIsClickAndCollect(); - } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index ea415e22..b395ffae 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopItemNormalizer.php b/src/Api/Generated/Normalizer/ShopItemNormalizer.php index 52b00a89..9ccafa3c 100644 --- a/src/Api/Generated/Normalizer/ShopItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index 1039906f..0aec93d5 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -85,58 +85,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } - if (null !== $object->getStatus()) { - $data->{'status'} = $object->getStatus(); - } - if (null !== $object->getDefaultLangCode()) { - $data->{'defaultLangCode'} = $object->getDefaultLangCode(); - } - if (null !== $object->getActiveLangCodes()) { - $values = array(); - foreach ($object->getActiveLangCodes() as $value) { - $values[] = $value; - } - $data->{'activeLangCodes'} = $values; - } - if (null !== $object->getBaseCurrency()) { - $data->{'baseCurrency'} = $object->getBaseCurrency(); - } - if (null !== $object->getDefaultCustomerCountryCode()) { - $data->{'defaultCustomerCountryCode'} = $object->getDefaultCustomerCountryCode(); - } - if (null !== $object->getGeneralDefaultVatRate()) { - $data->{'generalDefaultVatRate'} = $object->getGeneralDefaultVatRate(); - } - if (null !== $object->getShopCompanyName()) { - $data->{'shopCompanyName'} = $object->getShopCompanyName(); - } - if (null !== $object->getShopAddress()) { - $data->{'shopAddress'} = $object->getShopAddress(); - } - if (null !== $object->getShopPostalCode()) { - $data->{'shopPostalCode'} = $object->getShopPostalCode(); - } - if (null !== $object->getShopCity()) { - $data->{'shopCity'} = $object->getShopCity(); - } - if (null !== $object->getShopOrgNo()) { - $data->{'shopOrgNo'} = $object->getShopOrgNo(); - } - if (null !== $object->getShopPhoneNo()) { - $data->{'shopPhoneNo'} = $object->getShopPhoneNo(); - } - if (null !== $object->getShopVatNo()) { - $data->{'shopVatNo'} = $object->getShopVatNo(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php index fc4b39c5..da62426e 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index d931ed8e..4ccb169d 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -48,9 +48,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStockLocationId()) { - $data->{'stockLocationId'} = $object->getStockLocationId(); - } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } @@ -60,9 +57,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index d3c4079d..8d51ef60 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -54,9 +54,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index bb11432f..2f5f4ea0 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -54,9 +54,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index f01894e3..2dd508d8 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -42,15 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getAccessToken()) { - $data->{'access_token'} = $object->getAccessToken(); - } - if (null !== $object->getScope()) { - $data->{'scope'} = $object->getScope(); - } - if (null !== $object->getExpiresIn()) { - $data->{'expires_in'} = $object->getExpiresIn(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php index 681c9890..8ad771b8 100644 --- a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php index 811c78ad..dd641aba 100644 --- a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php @@ -36,9 +36,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index 913dddf5..c5010245 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -48,9 +48,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getWebHookId()) { - $data->{'webHookId'} = $object->getWebHookId(); - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } From e1a85d7c63684f3f469dc2e2a64ebd95eabafe49 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 2 Oct 2019 10:06:00 +0200 Subject: [PATCH 05/87] use the forked bugfix branch only for dev --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9fc9f047..d56b26ab 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "php-http/guzzle6-adapter": "^1.0", "guzzlehttp/psr7": "^1.4", "php-http/mock-client": "^1.1", - "squizlabs/php_codesniffer": "^3.3" + "squizlabs/php_codesniffer": "^3.3", }, "autoload": { "psr-4": {"Starweb\\": "src/"} From 90bbd13b6d096830230f7633106c7d9e216c3ddf Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 2 Oct 2019 11:18:31 +0200 Subject: [PATCH 06/87] use the forked bugfix branch only for dev --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d56b26ab..9fc9f047 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "php-http/guzzle6-adapter": "^1.0", "guzzlehttp/psr7": "^1.4", "php-http/mock-client": "^1.1", - "squizlabs/php_codesniffer": "^3.3", + "squizlabs/php_codesniffer": "^3.3" }, "autoload": { "psr-4": {"Starweb\\": "src/"} From 5e1a687f00ec5f23bea03e6da25941f753ada958 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 22 Oct 2019 11:23:32 +0200 Subject: [PATCH 07/87] regenerate endpoints removing invalid mixed paramater type hinting --- src/Api/Generated/Client.php | 8 ++++---- src/Api/Generated/Endpoint/CreatePricelist.php | 2 +- src/Api/Generated/Endpoint/PatchPricelist.php | 2 +- src/Api/Generated/Endpoint/PatchStockLocation.php | 2 +- src/Api/Generated/Endpoint/PutPricelist.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index e4b552f8..59ce0173 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -942,7 +942,7 @@ public function getPricelists(string $fetch = self::FETCH_OBJECT) * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface */ - public function createPricelist(mixed $requestBody, string $fetch = self::FETCH_OBJECT) + public function createPricelist($requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreatePricelist($requestBody), $fetch); } @@ -984,7 +984,7 @@ public function getPricelist(int $pricelistId, string $fetch = self::FETCH_OBJEC * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchPricelist(int $pricelistId, mixed $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchPricelist(int $pricelistId, $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchPricelist($pricelistId, $requestBody), $fetch); } @@ -999,7 +999,7 @@ public function patchPricelist(int $pricelistId, mixed $requestBody, string $fet * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface */ - public function putPricelist(int $pricelistId, mixed $requestBody, string $fetch = self::FETCH_OBJECT) + public function putPricelist(int $pricelistId, $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutPricelist($pricelistId, $requestBody), $fetch); } @@ -2979,7 +2979,7 @@ public function getStockLocation(int $stockLocationId, string $fetch = self::FET * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchStockLocation(int $stockLocationId, mixed $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchStockLocation(int $stockLocationId, $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchStockLocation($stockLocationId, $requestBody), $fetch); } diff --git a/src/Api/Generated/Endpoint/CreatePricelist.php b/src/Api/Generated/Endpoint/CreatePricelist.php index 312cda2c..694194a4 100644 --- a/src/Api/Generated/Endpoint/CreatePricelist.php +++ b/src/Api/Generated/Endpoint/CreatePricelist.php @@ -9,7 +9,7 @@ class CreatePricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implement * * @param mixed $requestBody */ - public function __construct(mixed $requestBody) + public function __construct($requestBody) { $this->body = $requestBody; } diff --git a/src/Api/Generated/Endpoint/PatchPricelist.php b/src/Api/Generated/Endpoint/PatchPricelist.php index 358ea809..75a40dd4 100644 --- a/src/Api/Generated/Endpoint/PatchPricelist.php +++ b/src/Api/Generated/Endpoint/PatchPricelist.php @@ -11,7 +11,7 @@ class PatchPricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements * @param int $pricelistId The pricelist id * @param mixed $requestBody */ - public function __construct(int $pricelistId, mixed $requestBody) + public function __construct(int $pricelistId, $requestBody) { $this->pricelistId = $pricelistId; $this->body = $requestBody; diff --git a/src/Api/Generated/Endpoint/PatchStockLocation.php b/src/Api/Generated/Endpoint/PatchStockLocation.php index 9534aa01..2cad2dd3 100644 --- a/src/Api/Generated/Endpoint/PatchStockLocation.php +++ b/src/Api/Generated/Endpoint/PatchStockLocation.php @@ -11,7 +11,7 @@ class PatchStockLocation extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem * @param int $stockLocationId The stock location id * @param mixed $requestBody */ - public function __construct(int $stockLocationId, mixed $requestBody) + public function __construct(int $stockLocationId, $requestBody) { $this->stockLocationId = $stockLocationId; $this->body = $requestBody; diff --git a/src/Api/Generated/Endpoint/PutPricelist.php b/src/Api/Generated/Endpoint/PutPricelist.php index 20a79269..05f4b036 100644 --- a/src/Api/Generated/Endpoint/PutPricelist.php +++ b/src/Api/Generated/Endpoint/PutPricelist.php @@ -11,7 +11,7 @@ class PutPricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \ * @param int $pricelistId The pricelist id * @param mixed $requestBody */ - public function __construct(int $pricelistId, mixed $requestBody) + public function __construct(int $pricelistId, $requestBody) { $this->pricelistId = $pricelistId; $this->body = $requestBody; From 8e5ea04bff026da6fd3ac5e4e2dd7b1a4622f16e Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 25 Oct 2019 12:56:49 +0200 Subject: [PATCH 08/87] regenarate models with latest updates and fixes --- resources/specification/openapi.json | 243 ++++++++++++++---- src/Api/Generated/Client.php | 106 ++++++-- .../Endpoint/CreateProductManufacturer.php | 52 ++++ .../Generated/Endpoint/CreateProductUnit.php | 52 ++++ .../CreateProductVariantPricelistPrice.php | 15 +- .../Generated/Endpoint/DeleteProductUnit.php | 50 ++++ .../DeleteProductsVariantsPricelistPrice.php | 15 +- .../GetProductsVariantsPricelistPrice.php | 15 +- .../ListProductsVariantsPricelistPrices.php | 15 +- .../Generated/Endpoint/PatchProductUnit.php | 55 ++++ .../PatchProductsVariantsPricelistPrice.php | 15 +- src/Api/Generated/Endpoint/PutProductUnit.php | 55 ++++ .../PutProductsVariantsPricelistPrice.php | 15 +- ...ProductManufacturerBadRequestException.php | 17 ++ .../CreateProductUnitBadRequestException.php | 17 ++ .../DeleteProductUnitNotFoundException.php | 17 ++ .../PatchProductUnitNotFoundException.php | 17 ++ .../PutProductUnitNotFoundException.php | 17 ++ src/Api/Generated/Model/PricelistModel.php | 10 +- .../Model/ProductVariantPriceModel.php | 27 ++ src/Api/Generated/Model/WebHookModel.php | 10 +- .../Normalizer/PricelistModelNormalizer.php | 4 +- .../ProductVariantPriceModelNormalizer.php | 14 + .../Normalizer/WebHookModelNormalizer.php | 4 +- 24 files changed, 777 insertions(+), 80 deletions(-) create mode 100644 src/Api/Generated/Endpoint/CreateProductManufacturer.php create mode 100644 src/Api/Generated/Endpoint/CreateProductUnit.php create mode 100644 src/Api/Generated/Endpoint/DeleteProductUnit.php create mode 100644 src/Api/Generated/Endpoint/PatchProductUnit.php create mode 100644 src/Api/Generated/Endpoint/PutProductUnit.php create mode 100644 src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php create mode 100644 src/Api/Generated/Exception/CreateProductUnitBadRequestException.php create mode 100644 src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php create mode 100644 src/Api/Generated/Exception/PatchProductUnitNotFoundException.php create mode 100644 src/Api/Generated/Exception/PutProductUnitNotFoundException.php diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 2a1b76ed..262d26c9 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "Starweb Shop API v.2", - "description": "This API is only allowed to be used by partners of Starweb AB and further requires explicit permission from both Starweb AB and the shop owner. If you are interested in using it, please contact us at starwebapi@starweb.se . Change log for this API can be found at: https:\/\/starwebserver.se\/API-CHANGELOG.md", + "description": "This API is only allowed to be used by partners of Starweb AB and further requires explicit permission from both Starweb AB and the shop owner. If you are interested in using it, please contact us at starwebapi@starweb.se . Change log for this API can be found at: https:\/\/sws.local\/API-CHANGELOG.md", "contact": { "name": "Starweb API support", "url": "https:\/\/www.starweb.se\/starweb-api", @@ -17,7 +17,7 @@ }, "servers": [ { - "url": "https:\/\/{shopId}.starwebserver.se\/api\/v2", + "url": "https:\/\/{shopId}.sws.local\/api\/v2", "description": "Shop API", "variables": { "shopId": { @@ -412,7 +412,7 @@ "name": "createdSince", "in": "query", "description": "Use this to only fetch customers that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "schema": { "type": "string" } @@ -421,7 +421,7 @@ "name": "updatedSince", "in": "query", "description": "Use this to only fetch customers that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "schema": { "type": "string" } @@ -2918,7 +2918,7 @@ "description": "Retrieves the `VatRate` object.", "responses": { "200": { - "description": "A country\u0027s default vat rates are returned", + "description": "A country's default vat rates are returned", "content": { "application\/json": { "schema": { @@ -3647,7 +3647,7 @@ ] }, "post": { - "operationId": "createProductManufacturers", + "operationId": "createProductManufacturer", "summary": "Create a product manufacturer", "description": "Creates a product manufacturer.", "responses": { @@ -3656,7 +3656,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductManufacturerModelCollection" + "$ref": "#\/components\/schemas\/ProductManufacturerModelItem" } } } @@ -3829,6 +3829,40 @@ "tags": [ "Product Units" ] + }, + "post": { + "operationId": "createProductUnit", + "summary": "Create a product unit", + "description": "Creates a product unit.", + "responses": { + "200": { + "description": "The created product unit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductUnitModelCollection" + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + } + }, + "requestBody": { + "description": "Product unit data", + "required": true, + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductUnitModel" + } + } + } + }, + "tags": [ + "Product Units" + ] } }, "\/product-units\/{unitId}": { @@ -3856,6 +3890,90 @@ "Product Units" ] }, + "delete": { + "operationId": "deleteProductUnit", + "summary": "Deletes a product unit", + "description": "Deletes the `ProductUnit` object.", + "responses": { + "204": { + "$ref": "#\/components\/responses\/ItemDeleted" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + } + }, + "tags": [ + "Product Units" + ] + }, + "put": { + "operationId": "putProductUnit", + "summary": "Update a product unit", + "description": "Updates the `ProductUnit` object.", + "responses": { + "200": { + "description": "The updated product unit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductUnitModelItem" + } + } + } + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + } + }, + "requestBody": { + "description": "Product unit data", + "required": true, + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductUnitModel" + } + } + } + }, + "tags": [ + "Product Units" + ] + }, + "patch": { + "operationId": "patchProductUnit", + "summary": "Update a product unit", + "description": "Updates the `ProductUnit` object.", + "responses": { + "200": { + "description": "The updated product unit", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductUnitModelItem" + } + } + } + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + } + }, + "requestBody": { + "description": "Product unit data", + "required": true, + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductUnitModel" + } + } + } + }, + "tags": [ + "Product Units" + ] + }, "parameters": [ { "name": "unitId", @@ -4707,7 +4825,7 @@ "name": "createdSince", "in": "query", "description": "Use this to only fetch products that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "schema": { "type": "string" } @@ -4716,7 +4834,7 @@ "name": "updatedSince", "in": "query", "description": "Use this to only fetch products that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "schema": { "type": "string" } @@ -4744,7 +4862,7 @@ "in": "query", "style": "form", "explode": false, - "description": "If you want to include child data in the result. Example: ?include=primaryVariant (to include primary product variant);?include=primaryVariant,languages (to include both primary product variant and languages). \u003Cbr \/\u003E\u003Cbr \/\u003EAvailable includes: `primaryVariant`, `primaryVariant.prices`, `primaryVariant.attributeValues`, `attributes`, `mediaFiles`, `languages`, `vatRates`, `categories`, `unit`, `metaData`, `bundledProducts`, `bundledProducts.prices`, `tags`.\u003Cbr \/\u003E\u003Cbr \/\u003ENOTE! Only one variant and language is included in the result for performance reason. To fetch all variants, instead use \/products\/x\/variants(unnecessary if hasSeveralVariants is false) and to fetch all languages for an object, instead use the individual objects language endpoint", + "description": "If you want to include child data in the result. Example: ?include=primaryVariant (to include primary product variant);?include=primaryVariant,languages (to include both primary product variant and languages).

Available includes: `primaryVariant`, `primaryVariant.prices`, `primaryVariant.attributeValues`, `attributes`, `mediaFiles`, `languages`, `vatRates`, `categories`, `unit`, `metaData`, `bundledProducts`, `bundledProducts.prices`, `tags`.

NOTE! Only one variant and language is included in the result for performance reason. To fetch all variants, instead use \/products\/x\/variants(unnecessary if hasSeveralVariants is false) and to fetch all languages for an object, instead use the individual objects language endpoint", "examples": { "primaryVariant": { "value": "primaryVariant", @@ -6779,6 +6897,22 @@ "format": "int32", "example": 101 } + }, + { + "name": "include", + "in": "query", + "style": "form", + "explode": false, + "description": "If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices", + "examples": { + "volumePrices": { + "value": "volumePrices", + "summary": "include volume prices" + } + }, + "schema": { + "type": "string" + } } ] }, @@ -6933,6 +7067,22 @@ "format": "int32", "example": 1 } + }, + { + "name": "include", + "in": "query", + "style": "form", + "explode": false, + "description": "If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices", + "examples": { + "volumePrices": { + "value": "volumePrices", + "summary": "include volume prices" + } + }, + "schema": { + "type": "string" + } } ] }, @@ -8132,7 +8282,7 @@ } }, "requestBody": { - "description": "Web hook data\n---\nPlease note that you should always use HTTPS when adding Webhooks in order to ensure security.\n\n\n\n\nAlso, there is no way to validate that the request originate from Starweb, so it is important that you always validate\nthese event with an API call. For example, if you receive a Webhook event regarding an order status update,\nvalidate this and retrieve the actual data of that order using a GET to `\/api\/v2\/orders\/{order-id}`\n\n\n\n\nAll Webhook events will retry up to 10 times or until they get a 20x response. If they don\u0027t get a 20x response they\nwill retry again after 30 min.\n\n---\n\nAll webhooks will POST to the URL and contain a JSON payload with the following fields:\n---\n- uuid (a UUID of this event, will be the same even if the event is resent due to none 20x response)\n- eventId\n- shopIdCode\n- eventTimestamp\n\nAdditional fields depend on the event:\n---\n**product created \/ updated \/ deleted:**\n- productId\n\n**order created \/ updated \/ status-changed:**\n- orderId\n- shippingMethodId\n- paymentMethodId\n- orderStatusId\n- orderStatusIdCode\n- totalAmount\n- currencyCode", + "description": "Web hook data\n---\nPlease note that you should always use HTTPS when adding Webhooks in order to ensure security.\n\n\n\n\nAlso, there is no way to validate that the request originate from Starweb, so it is important that you always validate\nthese event with an API call. For example, if you receive a Webhook event regarding an order status update,\nvalidate this and retrieve the actual data of that order using a GET to `\/api\/v2\/orders\/{order-id}`\n\n\n\n\nAll Webhook events will retry up to 10 times or until they get a 20x response. If they don't get a 20x response they\nwill retry again after 30 min.\n\n---\n\nAll webhooks will POST to the URL and contain a JSON payload with the following fields:\n---\n- uuid (a UUID of this event, will be the same even if the event is resent due to none 20x response)\n- eventId\n- shopIdCode\n- eventTimestamp\n\nAdditional fields depend on the event:\n---\n**product created \/ updated \/ deleted:**\n- productId\n\n**order created \/ updated \/ status-changed:**\n- orderId\n- shippingMethodId\n- paymentMethodId\n- orderStatusId\n- orderStatusIdCode\n- totalAmount\n- currencyCode", "required": true, "content": { "application\/json": { @@ -8208,7 +8358,7 @@ } }, "requestBody": { - "description": "Web hook data\n---\nPlease note that you should always use HTTPS when adding Webhooks in order to ensure security.\n\n\n\n\nAlso, there is no way to validate that the request originate from Starweb, so it is important that you always validate\nthese event with an API call. For example, if you receive a Webhook event regarding an order status update,\nvalidate this and retrieve the actual data of that order using a GET to `\/api\/v2\/orders\/{order-id}`\n\n\n\n\nAll Webhook events will retry up to 10 times or until they get a 20x response. If they don\u0027t get a 20x response they\nwill retry again after 30 min.\n\n---\n\nAll webhooks will POST to the URL and contain a JSON payload with the following fields:\n---\n- uuid (a UUID of this event, will be the same even if the event is resent due to none 20x response)\n- eventId\n- shopIdCode\n- eventTimestamp\n\nAdditional fields depend on the event:\n---\n**product created \/ updated \/ deleted:**\n- productId\n\n**order created \/ updated \/ status-changed:**\n- orderId\n- shippingMethodId\n- paymentMethodId\n- orderStatusId\n- orderStatusIdCode\n- totalAmount\n- currencyCode", + "description": "Web hook data\n---\nPlease note that you should always use HTTPS when adding Webhooks in order to ensure security.\n\n\n\n\nAlso, there is no way to validate that the request originate from Starweb, so it is important that you always validate\nthese event with an API call. For example, if you receive a Webhook event regarding an order status update,\nvalidate this and retrieve the actual data of that order using a GET to `\/api\/v2\/orders\/{order-id}`\n\n\n\n\nAll Webhook events will retry up to 10 times or until they get a 20x response. If they don't get a 20x response they\nwill retry again after 30 min.\n\n---\n\nAll webhooks will POST to the URL and contain a JSON payload with the following fields:\n---\n- uuid (a UUID of this event, will be the same even if the event is resent due to none 20x response)\n- eventId\n- shopIdCode\n- eventTimestamp\n\nAdditional fields depend on the event:\n---\n**product created \/ updated \/ deleted:**\n- productId\n\n**order created \/ updated \/ status-changed:**\n- orderId\n- shippingMethodId\n- paymentMethodId\n- orderStatusId\n- orderStatusIdCode\n- totalAmount\n- currencyCode", "required": true, "content": { "application\/json": { @@ -8244,7 +8394,7 @@ } }, "requestBody": { - "description": "Web hook data\n---\nPlease note that you should always use HTTPS when adding Webhooks in order to ensure security.\n\n\n\n\nAlso, there is no way to validate that the request originate from Starweb, so it is important that you always validate\nthese event with an API call. For example, if you receive a Webhook event regarding an order status update,\nvalidate this and retrieve the actual data of that order using a GET to `\/api\/v2\/orders\/{order-id}`\n\n\n\n\nAll Webhook events will retry up to 10 times or until they get a 20x response. If they don\u0027t get a 20x response they\nwill retry again after 30 min.\n\n---\n\nAll webhooks will POST to the URL and contain a JSON payload with the following fields:\n---\n- uuid (a UUID of this event, will be the same even if the event is resent due to none 20x response)\n- eventId\n- shopIdCode\n- eventTimestamp\n\nAdditional fields depend on the event:\n---\n**product created \/ updated \/ deleted:**\n- productId\n\n**order created \/ updated \/ status-changed:**\n- orderId\n- shippingMethodId\n- paymentMethodId\n- orderStatusId\n- orderStatusIdCode\n- totalAmount\n- currencyCode", + "description": "Web hook data\n---\nPlease note that you should always use HTTPS when adding Webhooks in order to ensure security.\n\n\n\n\nAlso, there is no way to validate that the request originate from Starweb, so it is important that you always validate\nthese event with an API call. For example, if you receive a Webhook event regarding an order status update,\nvalidate this and retrieve the actual data of that order using a GET to `\/api\/v2\/orders\/{order-id}`\n\n\n\n\nAll Webhook events will retry up to 10 times or until they get a 20x response. If they don't get a 20x response they\nwill retry again after 30 min.\n\n---\n\nAll webhooks will POST to the URL and contain a JSON payload with the following fields:\n---\n- uuid (a UUID of this event, will be the same even if the event is resent due to none 20x response)\n- eventId\n- shopIdCode\n- eventTimestamp\n\nAdditional fields depend on the event:\n---\n**product created \/ updated \/ deleted:**\n- productId\n\n**order created \/ updated \/ status-changed:**\n- orderId\n- shippingMethodId\n- paymentMethodId\n- orderStatusId\n- orderStatusIdCode\n- totalAmount\n- currencyCode", "required": true, "content": { "application\/json": { @@ -8345,7 +8495,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "baseCurrencyCode": { @@ -8399,7 +8549,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "customerId": { "type": "integer", @@ -8637,7 +8787,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "baseCurrencyCode": { @@ -8691,7 +8841,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "customerId": { "type": "integer", @@ -8921,7 +9071,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "baseCurrencyCode": { @@ -8975,7 +9125,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "customerId": { "type": "integer", @@ -9602,7 +9752,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "type": { "type": "string", @@ -9669,7 +9819,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "type": { "type": "string", @@ -9705,7 +9855,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the customer was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "approved": { @@ -9717,7 +9867,7 @@ "approvedAt": { "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "pricelistId": { @@ -9748,7 +9898,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "type": { "type": "string", @@ -9784,7 +9934,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the customer was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "approved": { @@ -9796,7 +9946,7 @@ "approvedAt": { "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "pricelistId": { @@ -10149,7 +10299,7 @@ "readOnly": true, "nullable": false, "example": false, - "description": "Tells whether this method is a \u0022click and collect\u0022 or not" + "description": "Tells whether this method is a \"click and collect\" or not" }, "languages": { "$ref": "#\/components\/schemas\/PaymentMethodLanguageModelCollection" @@ -10316,7 +10466,7 @@ "readOnly": true, "nullable": false, "example": false, - "description": "Tells whether this method is a \u0022click and collect\u0022 or not" + "description": "Tells whether this method is a \"click and collect\" or not" }, "languages": { "$ref": "#\/components\/schemas\/ShippingMethodLanguageModelCollection" @@ -10405,7 +10555,8 @@ "parentPricelistId": { "type": "integer", "example": null, - "description": "Does this pricelist has a parent price list. " + "description": "Does this pricelist has a parent price list. ", + "nullable": true }, "isCustomerPricelist": { "type": "boolean", @@ -10798,7 +10949,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the comment was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "text": { "type": "string", @@ -10858,13 +11009,13 @@ "createdAt": { "type": "string", "description": "A timestamp of when the media file was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "modifiedAt": { "type": "string", "description": "A timestamp of when the media file was modifies. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "size": { @@ -11138,7 +11289,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "defaultVatRate": { "type": "string", @@ -11177,7 +11328,7 @@ "sortIndex": { "type": "integer", "nullable": true, - "minimum": 1, + "minimum": 0, "maximum": 10000, "description": "Sort index for this product in a list" }, @@ -11216,7 +11367,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "variants": { @@ -11264,7 +11415,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "defaultVatRate": { "type": "string", @@ -11342,7 +11493,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "variants": { @@ -11407,7 +11558,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00" + "example": "2019-10-25T12:54:11+02:00" }, "defaultVatRate": { "type": "string", @@ -11485,7 +11636,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-09-11T07:15:21+02:00", + "example": "2019-10-25T12:54:11+02:00", "readOnly": true }, "mediaFiles": { @@ -12071,6 +12222,13 @@ "nullable": true, "example": 13.6, "description": "The special price excluding vat (a discounted price)" + }, + "volumePrices": { + "type": "array", + "description": "A collection of volume prices", + "items": { + "$ref": "#\/components\/schemas\/ProductVariantVolumePriceModel" + } } }, "required": [ @@ -12271,7 +12429,7 @@ "type": "boolean", "default": false, "example": true, - "description": "Should the product be displayed as \u0022in stock\u0022 when this status is set?" + "description": "Should the product be displayed as \"in stock\" when this status is set?" }, "languages": { "type": "array", @@ -12690,7 +12848,6 @@ "type": "integer", "minimum": 1, "description": "The id of an order status. Only used with the order-status-changes event.", - "nullable": true, "example": 1 }, "url": { @@ -13430,7 +13587,7 @@ "description": "OAuth 2.0 using Client Credentials", "flows": { "clientCredentials": { - "tokenUrl": "https:\/\/leksaker.starweb.se\/api\/v2\/token", + "tokenUrl": "http:\/\/dev-shop.sws.local\/api\/v2\/token", "scopes": {} } } @@ -13482,4 +13639,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 59ce0173..ccaa2006 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -1306,13 +1306,13 @@ public function listProductManufacturers(string $fetch = self::FETCH_OBJECT) * * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Starweb\Api\Generated\Exception\CreateProductManufacturersBadRequestException + * @throws \Starweb\Api\Generated\Exception\CreateProductManufacturerBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelCollection|\Psr\Http\Message\ResponseInterface + * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductManufacturers(\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductManufacturer(\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturers($requestBody), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturer($requestBody), $fetch); } /** * Deletes the `ProductManufacturer` object. @@ -1378,6 +1378,32 @@ public function listProductUnits(string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductUnits(), $fetch); } + /** + * Creates a product unit. + * + * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException + * + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelCollection|\Psr\Http\Message\ResponseInterface + */ + public function createProductUnit(\Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) + { + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductUnit($requestBody), $fetch); + } + /** + * Deletes the `ProductUnit` object. + * + * @param int $unitId The units id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Starweb\Api\Generated\Exception\DeleteProductUnitNotFoundException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function deleteProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT) + { + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductUnit($unitId), $fetch); + } /** * Retrieves the `ProductUnit` object. * @@ -1391,6 +1417,34 @@ public function getProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductUnit($unitId), $fetch); } + /** + * Updates the `ProductUnit` object. + * + * @param int $unitId The units id + * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException + * + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface + */ + public function patchProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) + { + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductUnit($unitId, $requestBody), $fetch); + } + /** + * Updates the `ProductUnit` object. + * + * @param int $unitId The units id + * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException + * + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface + */ + public function putProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) + { + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductUnit($unitId, $requestBody), $fetch); + } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\ListProductMetaDataTypesBadRequestException @@ -2469,14 +2523,17 @@ public function getProductsAttribute(int $productId, int $attributeId, string $f * * @param int $productId The products id * @param int $variantId The products variants id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistPricesBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelCollection|\Psr\Http\Message\ResponseInterface */ - public function listProductsVariantsPricelistPrices(int $productId, int $variantId, string $fetch = self::FETCH_OBJECT) + public function listProductsVariantsPricelistPrices(int $productId, int $variantId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistPrices($productId, $variantId), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistPrices($productId, $variantId, $queryParameters), $fetch); } /** * Creates a product variant pricelist price. @@ -2485,14 +2542,17 @@ public function listProductsVariantsPricelistPrices(int $productId, int $variant * @param int $productId The products id * @param int $variantId The products variants id * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductVariantPricelistPriceBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductVariantPricelistPrice(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductVariantPricelistPrice(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody, $queryParameters), $fetch); } /** * Deletes a product variant pricelist price permanently. @@ -2500,14 +2560,17 @@ public function createProductVariantPricelistPrice(int $productId, int $variantI * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistPriceNotFoundException * * @return null|\Psr\Http\Message\ResponseInterface */ - public function deleteProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, string $fetch = self::FETCH_OBJECT) + public function deleteProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistPrice($productId, $variantId, $pricelistId), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch); } /** * Retrieves the `ProductVariantPricelistPrice` object @@ -2515,14 +2578,17 @@ public function deleteProductsVariantsPricelistPrice(int $productId, int $varian * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistPriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function getProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, string $fetch = self::FETCH_OBJECT) + public function getProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistPrice($productId, $variantId, $pricelistId), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch); } /** * Updates a product variant pricelist price. @@ -2532,15 +2598,18 @@ public function getProductsVariantsPricelistPrice(int $productId, int $variantId * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch); } /** * Updates a product variant pricelist price. @@ -2550,15 +2619,18 @@ public function patchProductsVariantsPricelistPrice(int $productId, int $variant * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch); } /** * Returns a list of product variant pricelist prices @@ -3088,7 +3160,7 @@ public static function create($httpClient = null) if (null === $httpClient) { $httpClient = \Http\Discovery\HttpClientDiscovery::find(); $plugins = array(); - $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('https://{shopId}.starwebserver.se/api/v2'); + $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('https://{shopId}.sws.local/api/v2'); $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri); $plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri); $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); diff --git a/src/Api/Generated/Endpoint/CreateProductManufacturer.php b/src/Api/Generated/Endpoint/CreateProductManufacturer.php new file mode 100644 index 00000000..003750fe --- /dev/null +++ b/src/Api/Generated/Endpoint/CreateProductManufacturer.php @@ -0,0 +1,52 @@ +body = $requestBody; + } + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + public function getMethod() : string + { + return 'POST'; + } + public function getUri() : string + { + return '/product-manufacturers'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array + { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductManufacturerModel) { + return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); + } + return array(array(), null); + } + public function getExtraHeaders() : array + { + return array('Accept' => array('application/json')); + } + /** + * {@inheritdoc} + * + * @throws \Starweb\Api\Generated\Exception\CreateProductManufacturerBadRequestException + * + * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem', 'json'); + } + if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\CreateProductManufacturerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + } +} \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductUnit.php b/src/Api/Generated/Endpoint/CreateProductUnit.php new file mode 100644 index 00000000..8dc5e30c --- /dev/null +++ b/src/Api/Generated/Endpoint/CreateProductUnit.php @@ -0,0 +1,52 @@ +body = $requestBody; + } + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + public function getMethod() : string + { + return 'POST'; + } + public function getUri() : string + { + return '/product-units'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array + { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModel) { + return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); + } + return array(array(), null); + } + public function getExtraHeaders() : array + { + return array('Accept' => array('application/json')); + } + /** + * {@inheritdoc} + * + * @throws \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException + * + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelCollection + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection', 'json'); + } + if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + } +} \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php b/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php index 05c86f3f..e08c9802 100644 --- a/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php +++ b/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php @@ -13,12 +13,16 @@ class CreateProductVariantPricelistPrice extends \Jane\OpenApiRuntime\Client\Bas * @param int $productId The products id * @param int $variantId The products variants id * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } */ - public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody) + public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; $this->body = $requestBody; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -40,6 +44,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Endpoint/DeleteProductUnit.php b/src/Api/Generated/Endpoint/DeleteProductUnit.php new file mode 100644 index 00000000..1dc30430 --- /dev/null +++ b/src/Api/Generated/Endpoint/DeleteProductUnit.php @@ -0,0 +1,50 @@ +unitId = $unitId; + } + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + public function getMethod() : string + { + return 'DELETE'; + } + public function getUri() : string + { + return str_replace(array('{unitId}'), array($this->unitId), '/product-units/{unitId}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array + { + return array(array(), null); + } + public function getExtraHeaders() : array + { + return array('Accept' => array('application/json')); + } + /** + * {@inheritdoc} + * + * @throws \Starweb\Api\Generated\Exception\DeleteProductUnitNotFoundException + * + * @return null + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (204 === $status) { + return null; + } + if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\DeleteProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + } +} \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php index 4f9f4d97..ddec764c 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php @@ -13,12 +13,16 @@ class DeleteProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\B * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } */ - public function __construct(int $productId, int $variantId, int $pricelistId) + public function __construct(int $productId, int $variantId, int $pricelistId, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; $this->pricelistId = $pricelistId; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -37,6 +41,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php index e4a5423f..8f04973f 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php @@ -13,12 +13,16 @@ class GetProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\Base * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } */ - public function __construct(int $productId, int $variantId, int $pricelistId) + public function __construct(int $productId, int $variantId, int $pricelistId, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; $this->pricelistId = $pricelistId; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -37,6 +41,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php b/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php index a22201be..79538de4 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php +++ b/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php @@ -11,11 +11,15 @@ class ListProductsVariantsPricelistPrices extends \Jane\OpenApiRuntime\Client\Ba * * @param int $productId The products id * @param int $variantId The products variants id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } */ - public function __construct(int $productId, int $variantId) + public function __construct(int $productId, int $variantId, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -34,6 +38,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Endpoint/PatchProductUnit.php b/src/Api/Generated/Endpoint/PatchProductUnit.php new file mode 100644 index 00000000..9f02f3cb --- /dev/null +++ b/src/Api/Generated/Endpoint/PatchProductUnit.php @@ -0,0 +1,55 @@ +unitId = $unitId; + $this->body = $requestBody; + } + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + public function getMethod() : string + { + return 'PATCH'; + } + public function getUri() : string + { + return str_replace(array('{unitId}'), array($this->unitId), '/product-units/{unitId}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array + { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModel) { + return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); + } + return array(array(), null); + } + public function getExtraHeaders() : array + { + return array('Accept' => array('application/json')); + } + /** + * {@inheritdoc} + * + * @throws \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException + * + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); + } + if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + } +} \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php index e7c46566..9e4f44c9 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php @@ -15,13 +15,17 @@ class PatchProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\Ba * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } */ - public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody) + public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; $this->pricelistId = $pricelistId; $this->body = $requestBody; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -43,6 +47,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Endpoint/PutProductUnit.php b/src/Api/Generated/Endpoint/PutProductUnit.php new file mode 100644 index 00000000..57777e17 --- /dev/null +++ b/src/Api/Generated/Endpoint/PutProductUnit.php @@ -0,0 +1,55 @@ +unitId = $unitId; + $this->body = $requestBody; + } + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + public function getMethod() : string + { + return 'PUT'; + } + public function getUri() : string + { + return str_replace(array('{unitId}'), array($this->unitId), '/product-units/{unitId}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array + { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModel) { + return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); + } + return array(array(), null); + } + public function getExtraHeaders() : array + { + return array('Accept' => array('application/json')); + } + /** + * {@inheritdoc} + * + * @throws \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException + * + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); + } + if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + } +} \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php index 153d6af4..2f300601 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php @@ -15,13 +15,17 @@ class PutProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\Base * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices + * } */ - public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody) + public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; $this->pricelistId = $pricelistId; $this->body = $requestBody; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -43,6 +47,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php b/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php new file mode 100644 index 00000000..5b1a1ec6 --- /dev/null +++ b/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php b/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php new file mode 100644 index 00000000..d69fca74 --- /dev/null +++ b/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php b/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php new file mode 100644 index 00000000..f7942474 --- /dev/null +++ b/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php b/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php new file mode 100644 index 00000000..0b895524 --- /dev/null +++ b/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductUnitNotFoundException.php b/src/Api/Generated/Exception/PutProductUnitNotFoundException.php new file mode 100644 index 00000000..15dcb367 --- /dev/null +++ b/src/Api/Generated/Exception/PutProductUnitNotFoundException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/PricelistModel.php b/src/Api/Generated/Model/PricelistModel.php index 535042e5..d4d689d1 100644 --- a/src/Api/Generated/Model/PricelistModel.php +++ b/src/Api/Generated/Model/PricelistModel.php @@ -49,7 +49,7 @@ class PricelistModel /** * Does this pricelist has a parent price list. * - * @var int + * @var int|null */ protected $parentPricelistId; /** @@ -214,20 +214,20 @@ public function setCurrencyCode(string $currencyCode) : self /** * Does this pricelist has a parent price list. * - * @return int + * @return int|null */ - public function getParentPricelistId() : int + public function getParentPricelistId() : ?int { return $this->parentPricelistId; } /** * Does this pricelist has a parent price list. * - * @param int $parentPricelistId + * @param int|null $parentPricelistId * * @return self */ - public function setParentPricelistId(int $parentPricelistId) : self + public function setParentPricelistId(?int $parentPricelistId) : self { $this->parentPricelistId = $parentPricelistId; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPriceModel.php b/src/Api/Generated/Model/ProductVariantPriceModel.php index 7177a68f..69eab861 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModel.php +++ b/src/Api/Generated/Model/ProductVariantPriceModel.php @@ -22,6 +22,12 @@ class ProductVariantPriceModel * @var float|null */ protected $specialPriceExVat; + /** + * A collection of volume prices + * + * @var ProductVariantVolumePriceModel[] + */ + protected $volumePrices; /** * The pricelist this price is for * @@ -85,4 +91,25 @@ public function setSpecialPriceExVat(?float $specialPriceExVat) : self $this->specialPriceExVat = $specialPriceExVat; return $this; } + /** + * A collection of volume prices + * + * @return ProductVariantVolumePriceModel[] + */ + public function getVolumePrices() : array + { + return $this->volumePrices; + } + /** + * A collection of volume prices + * + * @param ProductVariantVolumePriceModel[] $volumePrices + * + * @return self + */ + public function setVolumePrices(array $volumePrices) : self + { + $this->volumePrices = $volumePrices; + return $this; + } } \ No newline at end of file diff --git a/src/Api/Generated/Model/WebHookModel.php b/src/Api/Generated/Model/WebHookModel.php index b6d129e0..ca028eb6 100644 --- a/src/Api/Generated/Model/WebHookModel.php +++ b/src/Api/Generated/Model/WebHookModel.php @@ -25,7 +25,7 @@ class WebHookModel /** * The id of an order status. Only used with the order-status-changes event. * - * @var int|null + * @var int */ protected $statusId; /** @@ -100,20 +100,20 @@ public function setEvent(string $event) : self /** * The id of an order status. Only used with the order-status-changes event. * - * @return int|null + * @return int */ - public function getStatusId() : ?int + public function getStatusId() : int { return $this->statusId; } /** * The id of an order status. Only used with the order-status-changes event. * - * @param int|null $statusId + * @param int $statusId * * @return self */ - public function setStatusId(?int $statusId) : self + public function setStatusId(int $statusId) : self { $this->statusId = $statusId; return $this; diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 23e6d5fa..993378de 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -67,9 +67,7 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getParentPricelistId()) { - $data->{'parentPricelistId'} = $object->getParentPricelistId(); - } + $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index 7eb458b3..4a4a06c8 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -37,6 +37,13 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'specialPriceExVat')) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } + if (property_exists($data, 'volumePrices')) { + $values = array(); + foreach ($data->{'volumePrices'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context); + } + $object->setVolumePrices($values); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -49,6 +56,13 @@ public function normalize($object, $format = null, array $context = array()) $data->{'priceExVat'} = $object->getPriceExVat(); } $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); + if (null !== $object->getVolumePrices()) { + $values = array(); + foreach ($object->getVolumePrices() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'volumePrices'} = $values; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index c5010245..44bf4243 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -54,7 +54,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEvent()) { $data->{'event'} = $object->getEvent(); } - $data->{'statusId'} = $object->getStatusId(); + if (null !== $object->getStatusId()) { + $data->{'statusId'} = $object->getStatusId(); + } if (null !== $object->getUrl()) { $data->{'url'} = $object->getUrl(); } From 13a3942307d3a7c70ed0eb67fd9223ef0dd12c92 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 25 Oct 2019 13:18:26 +0200 Subject: [PATCH 09/87] webhook status id needs to nullable as well --- resources/specification/openapi.json | 3 ++- src/Api/Generated/Model/WebHookModel.php | 10 +++++----- .../Generated/Normalizer/WebHookModelNormalizer.php | 4 +--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 262d26c9..02d43e2f 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12848,7 +12848,8 @@ "type": "integer", "minimum": 1, "description": "The id of an order status. Only used with the order-status-changes event.", - "example": 1 + "example": 1, + "nullable": true }, "url": { "type": "string", diff --git a/src/Api/Generated/Model/WebHookModel.php b/src/Api/Generated/Model/WebHookModel.php index ca028eb6..b6d129e0 100644 --- a/src/Api/Generated/Model/WebHookModel.php +++ b/src/Api/Generated/Model/WebHookModel.php @@ -25,7 +25,7 @@ class WebHookModel /** * The id of an order status. Only used with the order-status-changes event. * - * @var int + * @var int|null */ protected $statusId; /** @@ -100,20 +100,20 @@ public function setEvent(string $event) : self /** * The id of an order status. Only used with the order-status-changes event. * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The id of an order status. Only used with the order-status-changes event. * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index 44bf4243..c5010245 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -54,9 +54,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEvent()) { $data->{'event'} = $object->getEvent(); } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); - } + $data->{'statusId'} = $object->getStatusId(); if (null !== $object->getUrl()) { $data->{'url'} = $object->getUrl(); } From 7ccf0d3c7ab53d885fffbae20614bf969107d670 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 7 Nov 2019 14:19:31 +0100 Subject: [PATCH 10/87] fixes the return type models for POST, PUT and PATCH operations of product variant attribute values --- resources/specification/openapi.json | 6 +++--- src/Api/Generated/Client.php | 6 +++--- .../Endpoint/CreateProductsVariantsAttributeValues.php | 4 ++-- .../Endpoint/PatchProductsVariantsAttributeValues.php | 4 ++-- .../Endpoint/PutProductsVariantsAttributeValues.php | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 02d43e2f..dc2562ef 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -3180,7 +3180,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelCollection" + "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelItem" } } } @@ -3267,7 +3267,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelCollection" + "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelItem" } } } @@ -3301,7 +3301,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelCollection" + "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelItem" } } } diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index ccaa2006..eb2894a4 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -1131,7 +1131,7 @@ public function listProductsVariantsAttributeValues(int $attributeId, array $que * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface + * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface */ public function createProductsVariantsAttributeValues(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) { @@ -1178,7 +1178,7 @@ public function getProductsVariantsAttributeValue(int $attributeId, int $attribu * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface + * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface */ public function patchProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) { @@ -1194,7 +1194,7 @@ public function patchProductsVariantsAttributeValues(int $attributeId, int $attr * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection|\Psr\Http\Message\ResponseInterface + * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface */ public function putProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) { diff --git a/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php index fc8c3b6c..5bd2fd36 100644 --- a/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php @@ -42,12 +42,12 @@ public function getExtraHeaders() : array * * @throws \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection + * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { - return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json'); + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { throw new \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); diff --git a/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php index 0f7a3f0d..95260e3e 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php @@ -45,12 +45,12 @@ public function getExtraHeaders() : array * * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection + * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { - return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json'); + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); diff --git a/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php index 6aedbaaa..59307c91 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php @@ -45,12 +45,12 @@ public function getExtraHeaders() : array * * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection + * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { - return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json'); + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { throw new \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); From 4fb78eed75e8dedd6ef58fc0f5b633bc06482654 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 14 Nov 2019 10:36:58 +0100 Subject: [PATCH 11/87] fixes languages on stock location request models --- resources/specification/openapi.json | 10 ++++++++-- .../Model/StockLocationPostRequestModel.php | 10 +++++----- .../Model/StockLocationPutRequestModel.php | 10 +++++----- .../StockLocationPostRequestModelNormalizer.php | 13 ++++++++++++- .../StockLocationPutRequestModelNormalizer.php | 13 ++++++++++++- 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index dc2562ef..fa036a10 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12997,7 +12997,10 @@ "default": false }, "languages": { - "$ref": "#\/components\/schemas\/StockLocationLanguagesModelCollection" + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/StockLocationLanguagesModel" + } } }, "required": [ @@ -13031,7 +13034,10 @@ "default": false }, "languages": { - "$ref": "#\/components\/schemas\/StockLocationLanguagesModelCollection" + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/StockLocationLanguagesModel" + } } }, "required": [ diff --git a/src/Api/Generated/Model/StockLocationPostRequestModel.php b/src/Api/Generated/Model/StockLocationPostRequestModel.php index 422e7a9f..ae13bde2 100644 --- a/src/Api/Generated/Model/StockLocationPostRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php @@ -25,7 +25,7 @@ class StockLocationPostRequestModel /** * * - * @var StockLocationLanguagesModelCollection + * @var StockLocationLanguagesModel[] */ protected $languages; /** @@ -94,20 +94,20 @@ public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self /** * * - * @return StockLocationLanguagesModelCollection + * @return StockLocationLanguagesModel[] */ - public function getLanguages() : StockLocationLanguagesModelCollection + public function getLanguages() : array { return $this->languages; } /** * * - * @param StockLocationLanguagesModelCollection $languages + * @param StockLocationLanguagesModel[] $languages * * @return self */ - public function setLanguages(StockLocationLanguagesModelCollection $languages) : self + public function setLanguages(array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/StockLocationPutRequestModel.php b/src/Api/Generated/Model/StockLocationPutRequestModel.php index 21be4695..218aab4b 100644 --- a/src/Api/Generated/Model/StockLocationPutRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php @@ -25,7 +25,7 @@ class StockLocationPutRequestModel /** * * - * @var StockLocationLanguagesModelCollection + * @var StockLocationLanguagesModel[] */ protected $languages; /** @@ -94,20 +94,20 @@ public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self /** * * - * @return StockLocationLanguagesModelCollection + * @return StockLocationLanguagesModel[] */ - public function getLanguages() : StockLocationLanguagesModelCollection + public function getLanguages() : array { return $this->languages; } /** * * - * @param StockLocationLanguagesModelCollection $languages + * @param StockLocationLanguagesModel[] $languages * * @return self */ - public function setLanguages(StockLocationLanguagesModelCollection $languages) : self + public function setLanguages(array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index 8d51ef60..e6c98e84 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -38,7 +38,11 @@ public function denormalize($data, $class, $format = null, array $context = arra $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } if (property_exists($data, 'languages')) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context)); + $values = array(); + foreach ($data->{'languages'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); + } + $object->setLanguages($values); } return $object; } @@ -54,6 +58,13 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } + if (null !== $object->getLanguages()) { + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'languages'} = $values; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index 2f5f4ea0..e53426a8 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -38,7 +38,11 @@ public function denormalize($data, $class, $format = null, array $context = arra $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } if (property_exists($data, 'languages')) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context)); + $values = array(); + foreach ($data->{'languages'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); + } + $object->setLanguages($values); } return $object; } @@ -54,6 +58,13 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } + if (null !== $object->getLanguages()) { + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'languages'} = $values; + } return $data; } } \ No newline at end of file From a2c879b132df30bf7af487de99a09b4801081014 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 14 Nov 2019 15:56:54 +0100 Subject: [PATCH 12/87] make url of manufacturer nullable --- resources/specification/openapi.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index fa036a10..85e8dfea 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12317,7 +12317,8 @@ "type": "string", "maxLength": 255, "description": "The URL to the manufacturers website", - "example": "https:\/\/example.net" + "example": "https:\/\/example.net", + "nullable": true } }, "required": [ From 43b595251312c97a08d4d94e87f67d086f1b913d Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 14 Nov 2019 15:57:31 +0100 Subject: [PATCH 13/87] regenerate models --- src/Api/Generated/Model/ProductManufacturerModel.php | 10 +++++----- .../Normalizer/ProductManufacturerModelNormalizer.php | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Api/Generated/Model/ProductManufacturerModel.php b/src/Api/Generated/Model/ProductManufacturerModel.php index fd9ba412..8327d6c2 100644 --- a/src/Api/Generated/Model/ProductManufacturerModel.php +++ b/src/Api/Generated/Model/ProductManufacturerModel.php @@ -19,7 +19,7 @@ class ProductManufacturerModel /** * The URL to the manufacturers website * - * @var string + * @var string|null */ protected $url; /** @@ -67,20 +67,20 @@ public function setName(string $name) : self /** * The URL to the manufacturers website * - * @return string + * @return string|null */ - public function getUrl() : string + public function getUrl() : ?string { return $this->url; } /** * The URL to the manufacturers website * - * @param string $url + * @param string|null $url * * @return self */ - public function setUrl(string $url) : self + public function setUrl(?string $url) : self { $this->url = $url; return $this; diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 0be727ec..5b50bdff 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -45,9 +45,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - if (null !== $object->getUrl()) { - $data->{'url'} = $object->getUrl(); - } + $data->{'url'} = $object->getUrl(); return $data; } } \ No newline at end of file From fdc1e7035ac5c83d49de18dcbea5ce557725a713 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 28 Nov 2019 12:56:48 +0100 Subject: [PATCH 14/87] update openapi specification to latest develop version, stocklocation languages array issue is still present, so do not override --- resources/specification/openapi.json | 196 ++++++++++++++++++++++----- 1 file changed, 162 insertions(+), 34 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 85e8dfea..c6a045e3 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -8,7 +8,7 @@ "url": "https:\/\/www.starweb.se\/starweb-api", "email": "starwebapi@starweb.se" }, - "version": "2.11.0", + "version": "2.12.0", "x-logo": { "url": "https:\/\/www.starweb.se\/content\/themes\/starweb\/dist\/images\/starweb-header-logo-2x.png", "backgroundColor": "#551F63", @@ -412,7 +412,7 @@ "name": "createdSince", "in": "query", "description": "Use this to only fetch customers that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "schema": { "type": "string" } @@ -421,7 +421,7 @@ "name": "updatedSince", "in": "query", "description": "Use this to only fetch customers that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "schema": { "type": "string" } @@ -1400,7 +1400,7 @@ "in": "query", "style": "form", "explode": false, - "description": "If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). Available includes: items, externalServices, status, customer, addresses", + "description": "If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). or ?include=items.bundledItems (to include items and bundled items)Available includes: items, externalServices, status, customer, addresses", "examples": { "items": { "value": "items", @@ -2301,6 +2301,19 @@ "operationId": "getOrderItem", "summary": "Retrieve an order item", "description": "Retrieves the `OrderItem` object", + "parameters": [ + { + "name": "include", + "in": "query", + "style": "form", + "explode": false, + "description": "If you want to include child data in the result. Example: ?include=bundledItems (to include bundled items). Available includes: bundledItems", + "example": "bundledItems", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "An order item is returned", @@ -4825,7 +4838,7 @@ "name": "createdSince", "in": "query", "description": "Use this to only fetch products that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "schema": { "type": "string" } @@ -4834,7 +4847,7 @@ "name": "updatedSince", "in": "query", "description": "Use this to only fetch products that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "schema": { "type": "string" } @@ -8495,7 +8508,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "baseCurrencyCode": { @@ -8549,7 +8562,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "customerId": { "type": "integer", @@ -8787,7 +8800,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "baseCurrencyCode": { @@ -8841,7 +8854,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "customerId": { "type": "integer", @@ -9071,7 +9084,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "baseCurrencyCode": { @@ -9125,7 +9138,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "customerId": { "type": "integer", @@ -9649,13 +9662,35 @@ } } }, + "OrderItemBundledModelItem": { + "properties": { + "bundledItems": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/OrderItemModel" + } + } + } + } + } + }, "OrderItemModelCollection": { "properties": { "data": { "type": "array", "description": "A list of order items", "items": { - "$ref": "#\/components\/schemas\/OrderItemModel" + "allOf": [ + { + "$ref": "#\/components\/schemas\/OrderItemModel" + }, + { + "$ref": "#\/components\/schemas\/OrderItemBundledModelItem" + } + ] } } } @@ -9752,7 +9787,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "type": { "type": "string", @@ -9819,7 +9854,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "type": { "type": "string", @@ -9855,7 +9890,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the customer was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "approved": { @@ -9867,7 +9902,7 @@ "approvedAt": { "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "pricelistId": { @@ -9898,7 +9933,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "type": { "type": "string", @@ -9934,7 +9969,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the customer was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "approved": { @@ -9946,7 +9981,7 @@ "approvedAt": { "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "pricelistId": { @@ -10500,6 +10535,13 @@ "example": 1, "description": "The pricelist id" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, "name": { "type": "string", "maxLength": 30, @@ -10949,7 +10991,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the comment was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "text": { "type": "string", @@ -11009,13 +11051,13 @@ "createdAt": { "type": "string", "description": "A timestamp of when the media file was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "modifiedAt": { "type": "string", "description": "A timestamp of when the media file was modifies. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "size": { @@ -11088,7 +11130,8 @@ "parentId": { "type": "integer", "description": "The category`s parent`s Id", - "example": null + "example": null, + "nullable": true }, "visibility": { "type": "string", @@ -11108,7 +11151,8 @@ "imageFileId": { "type": "integer", "description": "The Id to the category`s image file. Has to be an existing mediaFile", - "example": null + "example": null, + "nullable": true }, "externalType": { "type": "string", @@ -11145,7 +11189,8 @@ "parentId": { "type": "integer", "description": "The category`s parent`s Id", - "example": null + "example": null, + "nullable": true }, "visibility": { "type": "string", @@ -11165,7 +11210,8 @@ "imageFileId": { "type": "integer", "description": "The Id to the category`s image file. Has to be an existing mediaFile", - "example": null + "example": null, + "nullable": true }, "externalType": { "type": "string", @@ -11289,7 +11335,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "defaultVatRate": { "type": "string", @@ -11367,7 +11413,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "variants": { @@ -11415,7 +11461,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "defaultVatRate": { "type": "string", @@ -11493,7 +11539,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "variants": { @@ -11558,7 +11604,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00" + "example": "2019-11-28T12:53:20+01:00" }, "defaultVatRate": { "type": "string", @@ -11636,7 +11682,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-10-25T12:54:11+02:00", + "example": "2019-11-28T12:53:20+01:00", "readOnly": true }, "mediaFiles": { @@ -12144,8 +12190,18 @@ "format": "int32", "example": 1 }, + "externalId": { + "type": "string", + "description": "The external id of this unit", + "example": "101", + "maxLength": 40, + "default": "" + }, "languages": { - "$ref": "#\/components\/schemas\/ProductUnitLanguageModelCollection" + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/ProductUnitLanguageModel" + } } } }, @@ -12307,6 +12363,13 @@ "description": "The id of this manufacturer", "example": 2 }, + "externalId": { + "type": "string", + "description": "The external id of this manufacturer", + "example": "101", + "maxLength": 40, + "default": "" + }, "name": { "type": "string", "maxLength": 30, @@ -12614,6 +12677,18 @@ "ProductVariantAttributeValueModelUpdatable": { "type": "object", "properties": { + "skuSuffix": { + "type": "string", + "description": "The suggested suffix for new Variants using this attribute value", + "example": "W" + }, + "sortIndex": { + "type": "integer", + "minimum": 0, + "default": 0, + "example": 9, + "description": "The sort order for this attribute value" + }, "languages": { "type": "array", "description": "A collection of attribute value languages", @@ -12644,6 +12719,13 @@ "type": "integer", "description": "The id for this attribute value" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this attribute value" + }, "skuSuffix": { "type": "string", "description": "The suggested suffix for new Variants using this attribute value", @@ -12691,6 +12773,13 @@ "readOnly": true, "example": 1 }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this attribute" + }, "languages": { "type": "array", "description": "A collection of attribute languages", @@ -12721,6 +12810,10 @@ "type": "integer", "description": "The id for this attribute" }, + "externalId": { + "type": "string", + "description": "The external id of this attribute" + }, "languages": { "type": "object", "description": "A collection of attribute languages", @@ -12847,6 +12940,7 @@ }, "statusId": { "type": "integer", + "nullable": true, "minimum": 1, "description": "The id of an order status. Only used with the order-status-changes event.", "example": 1, @@ -12947,6 +13041,13 @@ "readOnly": true, "example": 101 }, + "externalId": { + "type": "string", + "description": "The external id of this stock location", + "example": "101", + "maxLength": 40, + "default": "" + }, "visibility": { "type": "string", "enum": [ @@ -12976,6 +13077,13 @@ "StockLocationPostRequestModel": { "type": "object", "properties": { + "externalId": { + "type": "string", + "description": "The external id of this stock location", + "example": "101", + "maxLength": 40, + "default": "" + }, "visibility": { "type": "string", "enum": [ @@ -13013,6 +13121,13 @@ "StockLocationPutRequestModel": { "type": "object", "properties": { + "externalId": { + "type": "string", + "description": "The external id of this stock location", + "example": "101", + "maxLength": 40, + "default": "" + }, "visibility": { "type": "string", "enum": [ @@ -13051,6 +13166,13 @@ "allOf": [ { "properties": { + "externalId": { + "type": "string", + "description": "The external id of this stock location", + "example": "101", + "maxLength": 40, + "default": "" + }, "visibility": { "type": "string", "enum": [ @@ -13080,6 +13202,12 @@ { "title": "Property update", "anyOf": [ + { + "title": "externalId update", + "required": [ + "externalId" + ] + }, { "title": "visibility update", "required": [ From e3dc5b562e28cf38fc608c8a78e9f9d42ee86431 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 28 Nov 2019 12:58:29 +0100 Subject: [PATCH 15/87] regenerate models --- src/Api/Generated/Client.php | 9 +- src/Api/Generated/Endpoint/GetOrderItem.php | 15 +- src/Api/Generated/Endpoint/ListOrders.php | 2 +- .../Model/OrderItemBundledModelItem.php | 34 ++ .../OrderItemBundledModelItemBundledItems.php | 34 ++ .../Model/OrderItemModelCollection.php | 6 +- .../OrderItemModelCollectionDataItem.php | 304 ++++++++++++++++++ src/Api/Generated/Model/PricelistModel.php | 27 ++ .../Generated/Model/ProductCategoryModel.php | 20 +- .../Model/ProductCategoryModelUpdatable.php | 20 +- .../Model/ProductManufacturerModel.php | 27 ++ src/Api/Generated/Model/ProductUnitModel.php | 37 ++- .../Model/ProductVariantAttributeModel.php | 27 ++ .../ProductVariantAttributeModelUpdatable.php | 27 ++ .../ProductVariantAttributeValueModel.php | 27 ++ ...uctVariantAttributeValueModelUpdatable.php | 54 ++++ .../Generated/Model/StockLocationModel.php | 27 ++ .../Model/StockLocationPostRequestModel.php | 27 ++ .../Model/StockLocationPutRequestModel.php | 27 ++ .../Normalizer/NormalizerFactory.php | 3 + ...BundledModelItemBundledItemsNormalizer.php | 52 +++ .../OrderItemBundledModelItemNormalizer.php | 44 +++ ...rItemModelCollectionDataItemNormalizer.php | 101 ++++++ .../OrderItemModelCollectionNormalizer.php | 2 +- .../Normalizer/PricelistModelNormalizer.php | 6 + .../ProductCategoryModelNormalizer.php | 8 +- ...roductCategoryModelUpdatableNormalizer.php | 8 +- .../ProductManufacturerModelNormalizer.php | 6 + .../Normalizer/ProductUnitModelNormalizer.php | 19 +- ...ProductVariantAttributeModelNormalizer.php | 6 + ...riantAttributeModelUpdatableNormalizer.php | 6 + ...ctVariantAttributeValueModelNormalizer.php | 6 + ...AttributeValueModelUpdatableNormalizer.php | 12 + .../StockLocationModelNormalizer.php | 6 + ...tockLocationPostRequestModelNormalizer.php | 6 + ...StockLocationPutRequestModelNormalizer.php | 6 + 36 files changed, 1001 insertions(+), 47 deletions(-) create mode 100644 src/Api/Generated/Model/OrderItemBundledModelItem.php create mode 100644 src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php create mode 100644 src/Api/Generated/Model/OrderItemModelCollectionDataItem.php create mode 100644 src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php create mode 100644 src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php create mode 100644 src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index eb2894a4..52deddf9 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -404,7 +404,7 @@ public function putMediaFile(int $mediaFileId, \Starweb\Api\Generated\Model\Medi * @var int $statusFilter Only fetch orders with the specifiec order status. Use order status ID * @var string $sortBy Sort the result using a specified field. orderId is default * @var string $sortOrder ASC for an ascending sort order; or DESC for a descending sort order. DESC is default - * @var string $include If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). Available includes: items, externalServices, status, customer, addresses + * @var string $include If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). or ?include=items.bundledItems (to include items and bundled items)Available includes: items, externalServices, status, customer, addresses * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\ListOrdersBadRequestException @@ -777,14 +777,17 @@ public function deleteOrderItem(int $orderId, int $orderItemId, string $fetch = * * @param int $orderId The orders id * @param int $orderItemId The order item id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=bundledItems (to include bundled items). Available includes: bundledItems + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\GetOrderItemNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface */ - public function getOrderItem(int $orderId, int $orderItemId, string $fetch = self::FETCH_OBJECT) + public function getOrderItem(int $orderId, int $orderItemId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItem($orderId, $orderItemId), $fetch); + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItem($orderId, $orderItemId, $queryParameters), $fetch); } /** * Updates an order item. Retrieves the updated `OrderItem` object diff --git a/src/Api/Generated/Endpoint/GetOrderItem.php b/src/Api/Generated/Endpoint/GetOrderItem.php index bb8fb6f5..b3e3b88d 100644 --- a/src/Api/Generated/Endpoint/GetOrderItem.php +++ b/src/Api/Generated/Endpoint/GetOrderItem.php @@ -11,11 +11,15 @@ class GetOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \ * * @param int $orderId The orders id * @param int $orderItemId The order item id + * @param array $queryParameters { + * @var string $include If you want to include child data in the result. Example: ?include=bundledItems (to include bundled items). Available includes: bundledItems + * } */ - public function __construct(int $orderId, int $orderItemId) + public function __construct(int $orderId, int $orderItemId, array $queryParameters = array()) { $this->orderId = $orderId; $this->orderItemId = $orderItemId; + $this->queryParameters = $queryParameters; } use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; public function getMethod() : string @@ -34,6 +38,15 @@ public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } + protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(array('include')); + $optionsResolver->setRequired(array()); + $optionsResolver->setDefaults(array()); + $optionsResolver->setAllowedTypes('include', array('string')); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/src/Api/Generated/Endpoint/ListOrders.php b/src/Api/Generated/Endpoint/ListOrders.php index dcfe62c6..2452ace7 100644 --- a/src/Api/Generated/Endpoint/ListOrders.php +++ b/src/Api/Generated/Endpoint/ListOrders.php @@ -18,7 +18,7 @@ class ListOrders extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Ja * @var int $statusFilter Only fetch orders with the specifiec order status. Use order status ID * @var string $sortBy Sort the result using a specified field. orderId is default * @var string $sortOrder ASC for an ascending sort order; or DESC for a descending sort order. DESC is default - * @var string $include If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). Available includes: items, externalServices, status, customer, addresses + * @var string $include If you want to include child data in the result. Example: ?include=items (to include order items) or ?include=items,externalServices (to include order items as well as external ids). or ?include=items.bundledItems (to include items and bundled items)Available includes: items, externalServices, status, customer, addresses * } */ public function __construct(array $queryParameters = array()) diff --git a/src/Api/Generated/Model/OrderItemBundledModelItem.php b/src/Api/Generated/Model/OrderItemBundledModelItem.php new file mode 100644 index 00000000..ecc7b3e7 --- /dev/null +++ b/src/Api/Generated/Model/OrderItemBundledModelItem.php @@ -0,0 +1,34 @@ +bundledItems; + } + /** + * + * + * @param OrderItemBundledModelItemBundledItems $bundledItems + * + * @return self + */ + public function setBundledItems(OrderItemBundledModelItemBundledItems $bundledItems) : self + { + $this->bundledItems = $bundledItems; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php new file mode 100644 index 00000000..19a7f776 --- /dev/null +++ b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php @@ -0,0 +1,34 @@ +data; + } + /** + * + * + * @param OrderItemModel[] $data + * + * @return self + */ + public function setData(array $data) : self + { + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/OrderItemModelCollection.php b/src/Api/Generated/Model/OrderItemModelCollection.php index 3a4d7a21..84f33837 100644 --- a/src/Api/Generated/Model/OrderItemModelCollection.php +++ b/src/Api/Generated/Model/OrderItemModelCollection.php @@ -7,13 +7,13 @@ class OrderItemModelCollection /** * A list of order items * - * @var OrderItemModel[] + * @var OrderItemModelCollectionDataItem[] */ protected $data; /** * A list of order items * - * @return OrderItemModel[] + * @return OrderItemModelCollectionDataItem[] */ public function getData() : array { @@ -22,7 +22,7 @@ public function getData() : array /** * A list of order items * - * @param OrderItemModel[] $data + * @param OrderItemModelCollectionDataItem[] $data * * @return self */ diff --git a/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php new file mode 100644 index 00000000..95e865c4 --- /dev/null +++ b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php @@ -0,0 +1,304 @@ +itemId; + } + /** + * The id of the order item + * + * @param int $itemId + * + * @return self + */ + public function setItemId(int $itemId) : self + { + $this->itemId = $itemId; + return $this; + } + /** + * The SKU of the order item + * + * @return string + */ + public function getSku() : string + { + return $this->sku; + } + /** + * The SKU of the order item + * + * @param string $sku + * + * @return self + */ + public function setSku(string $sku) : self + { + $this->sku = $sku; + return $this; + } + /** + * The description of the order item + * + * @return string + */ + public function getDescription() : string + { + return $this->description; + } + /** + * The description of the order item + * + * @param string $description + * + * @return self + */ + public function setDescription(string $description) : self + { + $this->description = $description; + return $this; + } + /** + * The quantity of the order item + * + * @return int + */ + public function getQuantity() : int + { + return $this->quantity; + } + /** + * The quantity of the order item + * + * @param int $quantity + * + * @return self + */ + public function setQuantity(int $quantity) : self + { + $this->quantity = $quantity; + return $this; + } + /** + * The unit symbol of the order item + * + * @return string + */ + public function getUnitSymbol() : string + { + return $this->unitSymbol; + } + /** + * The unit symbol of the order item + * + * @param string $unitSymbol + * + * @return self + */ + public function setUnitSymbol(string $unitSymbol) : self + { + $this->unitSymbol = $unitSymbol; + return $this; + } + /** + * The price per unit excluding VAT + * + * @return float + */ + public function getUnitPrice() : float + { + return $this->unitPrice; + } + /** + * The price per unit excluding VAT + * + * @param float $unitPrice + * + * @return self + */ + public function setUnitPrice(float $unitPrice) : self + { + $this->unitPrice = $unitPrice; + return $this; + } + /** + * The items VAT rate in percent. 25.0 = 25% VAT + * + * @return float + */ + public function getVatRate() : float + { + return $this->vatRate; + } + /** + * The items VAT rate in percent. 25.0 = 25% VAT + * + * @param float $vatRate + * + * @return self + */ + public function setVatRate(float $vatRate) : self + { + $this->vatRate = $vatRate; + return $this; + } + /** + * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. + * + * @return float + */ + public function getDiscount() : float + { + return $this->discount; + } + /** + * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. + * + * @param float $discount + * + * @return self + */ + public function setDiscount(float $discount) : self + { + $this->discount = $discount; + return $this; + } + /** + * The type of discount. Either ”amount” or ”percent”. Default is ”percent” + * + * @return string + */ + public function getDiscountType() : string + { + return $this->discountType; + } + /** + * The type of discount. Either ”amount” or ”percent”. Default is ”percent” + * + * @param string $discountType + * + * @return self + */ + public function setDiscountType(string $discountType) : self + { + $this->discountType = $discountType; + return $this; + } + /** + * The sort order of the order items + * + * @return int + */ + public function getSortIndex() : int + { + return $this->sortIndex; + } + /** + * The sort order of the order items + * + * @param int $sortIndex + * + * @return self + */ + public function setSortIndex(int $sortIndex) : self + { + $this->sortIndex = $sortIndex; + return $this; + } + /** + * + * + * @return OrderItemBundledModelItemBundledItems + */ + public function getBundledItems() : OrderItemBundledModelItemBundledItems + { + return $this->bundledItems; + } + /** + * + * + * @param OrderItemBundledModelItemBundledItems $bundledItems + * + * @return self + */ + public function setBundledItems(OrderItemBundledModelItemBundledItems $bundledItems) : self + { + $this->bundledItems = $bundledItems; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/PricelistModel.php b/src/Api/Generated/Model/PricelistModel.php index d4d689d1..f2589373 100644 --- a/src/Api/Generated/Model/PricelistModel.php +++ b/src/Api/Generated/Model/PricelistModel.php @@ -10,6 +10,12 @@ class PricelistModel * @var int */ protected $pricelistId; + /** + * The external id of this pricelist + * + * @var string + */ + protected $externalId = ''; /** * The name of this pricelist * @@ -85,6 +91,27 @@ public function setPricelistId(int $pricelistId) : self $this->pricelistId = $pricelistId; return $this; } + /** + * The external id of this pricelist + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The name of this pricelist * diff --git a/src/Api/Generated/Model/ProductCategoryModel.php b/src/Api/Generated/Model/ProductCategoryModel.php index ec5bd5b4..f6646140 100644 --- a/src/Api/Generated/Model/ProductCategoryModel.php +++ b/src/Api/Generated/Model/ProductCategoryModel.php @@ -13,7 +13,7 @@ class ProductCategoryModel /** * The category`s parent`s Id * - * @var int + * @var int|null */ protected $parentId; /** @@ -37,7 +37,7 @@ class ProductCategoryModel /** * The Id to the category`s image file. Has to be an existing mediaFile * - * @var int + * @var int|null */ protected $imageFileId; /** @@ -88,20 +88,20 @@ public function setCategoryId(int $categoryId) : self /** * The category`s parent`s Id * - * @return int + * @return int|null */ - public function getParentId() : int + public function getParentId() : ?int { return $this->parentId; } /** * The category`s parent`s Id * - * @param int $parentId + * @param int|null $parentId * * @return self */ - public function setParentId(int $parentId) : self + public function setParentId(?int $parentId) : self { $this->parentId = $parentId; return $this; @@ -172,20 +172,20 @@ public function setOpenPage(bool $openPage) : self /** * The Id to the category`s image file. Has to be an existing mediaFile * - * @return int + * @return int|null */ - public function getImageFileId() : int + public function getImageFileId() : ?int { return $this->imageFileId; } /** * The Id to the category`s image file. Has to be an existing mediaFile * - * @param int $imageFileId + * @param int|null $imageFileId * * @return self */ - public function setImageFileId(int $imageFileId) : self + public function setImageFileId(?int $imageFileId) : self { $this->imageFileId = $imageFileId; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php index 717695dd..eade2aa7 100644 --- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php +++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php @@ -13,7 +13,7 @@ class ProductCategoryModelUpdatable /** * The category`s parent`s Id * - * @var int + * @var int|null */ protected $parentId; /** @@ -37,7 +37,7 @@ class ProductCategoryModelUpdatable /** * The Id to the category`s image file. Has to be an existing mediaFile * - * @var int + * @var int|null */ protected $imageFileId; /** @@ -88,20 +88,20 @@ public function setCategoryId(int $categoryId) : self /** * The category`s parent`s Id * - * @return int + * @return int|null */ - public function getParentId() : int + public function getParentId() : ?int { return $this->parentId; } /** * The category`s parent`s Id * - * @param int $parentId + * @param int|null $parentId * * @return self */ - public function setParentId(int $parentId) : self + public function setParentId(?int $parentId) : self { $this->parentId = $parentId; return $this; @@ -172,20 +172,20 @@ public function setOpenPage(bool $openPage) : self /** * The Id to the category`s image file. Has to be an existing mediaFile * - * @return int + * @return int|null */ - public function getImageFileId() : int + public function getImageFileId() : ?int { return $this->imageFileId; } /** * The Id to the category`s image file. Has to be an existing mediaFile * - * @param int $imageFileId + * @param int|null $imageFileId * * @return self */ - public function setImageFileId(int $imageFileId) : self + public function setImageFileId(?int $imageFileId) : self { $this->imageFileId = $imageFileId; return $this; diff --git a/src/Api/Generated/Model/ProductManufacturerModel.php b/src/Api/Generated/Model/ProductManufacturerModel.php index 8327d6c2..79acd718 100644 --- a/src/Api/Generated/Model/ProductManufacturerModel.php +++ b/src/Api/Generated/Model/ProductManufacturerModel.php @@ -10,6 +10,12 @@ class ProductManufacturerModel * @var int */ protected $manufacturerId; + /** + * The external id of this manufacturer + * + * @var string + */ + protected $externalId = ''; /** * The name of this manufacturer * @@ -43,6 +49,27 @@ public function setManufacturerId(int $manufacturerId) : self $this->manufacturerId = $manufacturerId; return $this; } + /** + * The external id of this manufacturer + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this manufacturer + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The name of this manufacturer * diff --git a/src/Api/Generated/Model/ProductUnitModel.php b/src/Api/Generated/Model/ProductUnitModel.php index c40d97f9..325c5c51 100644 --- a/src/Api/Generated/Model/ProductUnitModel.php +++ b/src/Api/Generated/Model/ProductUnitModel.php @@ -10,10 +10,16 @@ class ProductUnitModel * @var int */ protected $unitId; + /** + * The external id of this unit + * + * @var string + */ + protected $externalId = ''; /** * * - * @var ProductUnitLanguageModelCollection + * @var ProductUnitLanguageModel[] */ protected $languages; /** @@ -37,23 +43,44 @@ public function setUnitId(int $unitId) : self $this->unitId = $unitId; return $this; } + /** + * The external id of this unit + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this unit + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * * - * @return ProductUnitLanguageModelCollection + * @return ProductUnitLanguageModel[] */ - public function getLanguages() : ProductUnitLanguageModelCollection + public function getLanguages() : array { return $this->languages; } /** * * - * @param ProductUnitLanguageModelCollection $languages + * @param ProductUnitLanguageModel[] $languages * * @return self */ - public function setLanguages(ProductUnitLanguageModelCollection $languages) : self + public function setLanguages(array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModel.php b/src/Api/Generated/Model/ProductVariantAttributeModel.php index 57038c36..c71a1661 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModel.php @@ -10,6 +10,12 @@ class ProductVariantAttributeModel * @var int */ protected $attributeId; + /** + * The external id of this attribute + * + * @var string + */ + protected $externalId; /** * A collection of attribute languages * @@ -37,6 +43,27 @@ public function setAttributeId(int $attributeId) : self $this->attributeId = $attributeId; return $this; } + /** + * The external id of this attribute + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this attribute + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * A collection of attribute languages * diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php index 39673ccd..4c2cfe55 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php @@ -10,6 +10,12 @@ class ProductVariantAttributeModelUpdatable * @var int */ protected $attributeId; + /** + * The external id of this attribute + * + * @var string + */ + protected $externalId = ''; /** * A collection of attribute languages * @@ -37,6 +43,27 @@ public function setAttributeId(int $attributeId) : self $this->attributeId = $attributeId; return $this; } + /** + * The external id of this attribute + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this attribute + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * A collection of attribute languages * diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php index e71bd116..cf9f0c55 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php @@ -10,6 +10,12 @@ class ProductVariantAttributeValueModel * @var int */ protected $attributeValueId; + /** + * The external id of this attribute value + * + * @var string + */ + protected $externalId = ''; /** * The suggested suffix for new Variants using this attribute value * @@ -49,6 +55,27 @@ public function setAttributeValueId(int $attributeValueId) : self $this->attributeValueId = $attributeValueId; return $this; } + /** + * The external id of this attribute value + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this attribute value + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The suggested suffix for new Variants using this attribute value * diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php index 22a69ab2..3251d3f9 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php @@ -4,12 +4,66 @@ class ProductVariantAttributeValueModelUpdatable { + /** + * The suggested suffix for new Variants using this attribute value + * + * @var string + */ + protected $skuSuffix; + /** + * The sort order for this attribute value + * + * @var int + */ + protected $sortIndex = 0; /** * A collection of attribute value languages * * @var ProductVariantAttributeValueLanguageModel[] */ protected $languages; + /** + * The suggested suffix for new Variants using this attribute value + * + * @return string + */ + public function getSkuSuffix() : string + { + return $this->skuSuffix; + } + /** + * The suggested suffix for new Variants using this attribute value + * + * @param string $skuSuffix + * + * @return self + */ + public function setSkuSuffix(string $skuSuffix) : self + { + $this->skuSuffix = $skuSuffix; + return $this; + } + /** + * The sort order for this attribute value + * + * @return int + */ + public function getSortIndex() : int + { + return $this->sortIndex; + } + /** + * The sort order for this attribute value + * + * @param int $sortIndex + * + * @return self + */ + public function setSortIndex(int $sortIndex) : self + { + $this->sortIndex = $sortIndex; + return $this; + } /** * A collection of attribute value languages * diff --git a/src/Api/Generated/Model/StockLocationModel.php b/src/Api/Generated/Model/StockLocationModel.php index 0f1ccc86..fc7fd6b7 100644 --- a/src/Api/Generated/Model/StockLocationModel.php +++ b/src/Api/Generated/Model/StockLocationModel.php @@ -10,6 +10,12 @@ class StockLocationModel * @var int */ protected $stockLocationId; + /** + * The external id of this stock location + * + * @var string + */ + protected $externalId = ''; /** * The stock location`s visibility settings. * @@ -55,6 +61,27 @@ public function setStockLocationId(int $stockLocationId) : self $this->stockLocationId = $stockLocationId; return $this; } + /** + * The external id of this stock location + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this stock location + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The stock location`s visibility settings. * diff --git a/src/Api/Generated/Model/StockLocationPostRequestModel.php b/src/Api/Generated/Model/StockLocationPostRequestModel.php index ae13bde2..93af1b18 100644 --- a/src/Api/Generated/Model/StockLocationPostRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php @@ -4,6 +4,12 @@ class StockLocationPostRequestModel { + /** + * The external id of this stock location + * + * @var string + */ + protected $externalId = ''; /** * The stock location`s visibility settings. * @@ -28,6 +34,27 @@ class StockLocationPostRequestModel * @var StockLocationLanguagesModel[] */ protected $languages; + /** + * The external id of this stock location + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this stock location + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The stock location`s visibility settings. * diff --git a/src/Api/Generated/Model/StockLocationPutRequestModel.php b/src/Api/Generated/Model/StockLocationPutRequestModel.php index 218aab4b..4b7befa4 100644 --- a/src/Api/Generated/Model/StockLocationPutRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php @@ -4,6 +4,12 @@ class StockLocationPutRequestModel { + /** + * The external id of this stock location + * + * @var string + */ + protected $externalId = ''; /** * The stock location`s visibility settings. * @@ -28,6 +34,27 @@ class StockLocationPutRequestModel * @var StockLocationLanguagesModel[] */ protected $languages; + /** + * The external id of this stock location + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this stock location + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The stock location`s visibility settings. * diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index 3965b044..6031c31b 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -28,7 +28,10 @@ public static function create() $normalizers[] = new OrderStatusModelCollectionNormalizer(); $normalizers[] = new OrderItemModelNormalizer(); $normalizers[] = new OrderItemModelItemNormalizer(); + $normalizers[] = new OrderItemBundledModelItemNormalizer(); + $normalizers[] = new OrderItemBundledModelItemBundledItemsNormalizer(); $normalizers[] = new OrderItemModelCollectionNormalizer(); + $normalizers[] = new OrderItemModelCollectionDataItemNormalizer(); $normalizers[] = new OrderExternalServiceModelNormalizer(); $normalizers[] = new OrderExternalServicesModelItemNormalizer(); $normalizers[] = new OrderExternalServiceModelCollectionNormalizer(); diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php new file mode 100644 index 00000000..6ae5b55e --- /dev/null +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php @@ -0,0 +1,52 @@ +{'data'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); + } + $object->setData($values); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getData()) { + $values = array(); + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'data'} = $values; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php new file mode 100644 index 00000000..3aaf787a --- /dev/null +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php @@ -0,0 +1,44 @@ +setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getBundledItems()) { + $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php new file mode 100644 index 00000000..68cdd3ed --- /dev/null +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -0,0 +1,101 @@ +setItemId($data->{'itemId'}); + } + if (property_exists($data, 'sku')) { + $object->setSku($data->{'sku'}); + } + if (property_exists($data, 'description')) { + $object->setDescription($data->{'description'}); + } + if (property_exists($data, 'quantity')) { + $object->setQuantity($data->{'quantity'}); + } + if (property_exists($data, 'unitSymbol')) { + $object->setUnitSymbol($data->{'unitSymbol'}); + } + if (property_exists($data, 'unitPrice')) { + $object->setUnitPrice($data->{'unitPrice'}); + } + if (property_exists($data, 'vatRate')) { + $object->setVatRate($data->{'vatRate'}); + } + if (property_exists($data, 'discount')) { + $object->setDiscount($data->{'discount'}); + } + if (property_exists($data, 'discountType')) { + $object->setDiscountType($data->{'discountType'}); + } + if (property_exists($data, 'sortIndex')) { + $object->setSortIndex($data->{'sortIndex'}); + } + if (property_exists($data, 'bundledItems')) { + $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getSku()) { + $data->{'sku'} = $object->getSku(); + } + if (null !== $object->getDescription()) { + $data->{'description'} = $object->getDescription(); + } + if (null !== $object->getQuantity()) { + $data->{'quantity'} = $object->getQuantity(); + } + if (null !== $object->getUnitSymbol()) { + $data->{'unitSymbol'} = $object->getUnitSymbol(); + } + if (null !== $object->getUnitPrice()) { + $data->{'unitPrice'} = $object->getUnitPrice(); + } + if (null !== $object->getVatRate()) { + $data->{'vatRate'} = $object->getVatRate(); + } + if (null !== $object->getDiscount()) { + $data->{'discount'} = $object->getDiscount(); + } + if (null !== $object->getDiscountType()) { + $data->{'discountType'} = $object->getDiscountType(); + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + if (null !== $object->getBundledItems()) { + $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php index 5bb41f50..ba0d9696 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php @@ -31,7 +31,7 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data')) { $values = array(); foreach ($data->{'data'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem', 'json', $context); } $object->setData($values); } diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 993378de..b7a1095d 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } @@ -67,6 +70,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 9499c9b9..40a72c4e 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -63,9 +63,7 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getParentId()) { - $data->{'parentId'} = $object->getParentId(); - } + $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } @@ -75,9 +73,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOpenPage()) { $data->{'openPage'} = $object->getOpenPage(); } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } + $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getExternalType()) { $data->{'externalType'} = $object->getExternalType(); } diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index 94a943bd..8b9e50ac 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -67,9 +67,7 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getParentId()) { - $data->{'parentId'} = $object->getParentId(); - } + $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } @@ -79,9 +77,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOpenPage()) { $data->{'openPage'} = $object->getOpenPage(); } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } + $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getExternalType()) { $data->{'externalType'} = $object->getExternalType(); } diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 5b50bdff..357315f5 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'manufacturerId')) { $object->setManufacturerId($data->{'manufacturerId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } @@ -42,6 +45,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index e07ab929..ed8170b2 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -31,14 +31,31 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'unitId')) { $object->setUnitId($data->{'unitId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'languages')) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); + $values = array(); + foreach ($data->{'languages'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); + } + $object->setLanguages($values); } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + if (null !== $object->getLanguages()) { + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'languages'} = $values; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index c2e76f1c..1051e6d8 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeId')) { $object->setAttributeId($data->{'attributeId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'languages')) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); } @@ -42,6 +45,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeId()) { $data->{'attributeId'} = $object->getAttributeId(); } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index 0f1872b2..36df5806 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeId')) { $object->setAttributeId($data->{'attributeId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'languages')) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -43,6 +46,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index 8f9784f7..a17367f2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeValueId')) { $object->setAttributeValueId($data->{'attributeValueId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'skuSuffix')) { $object->setSkuSuffix($data->{'skuSuffix'}); } @@ -52,6 +55,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeValueId()) { $data->{'attributeValueId'} = $object->getAttributeValueId(); } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 4403ed8f..06b2ddd9 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -28,6 +28,12 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable(); + if (property_exists($data, 'skuSuffix')) { + $object->setSkuSuffix($data->{'skuSuffix'}); + } + if (property_exists($data, 'sortIndex')) { + $object->setSortIndex($data->{'sortIndex'}); + } if (property_exists($data, 'languages')) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -40,6 +46,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getSkuSuffix()) { + $data->{'skuSuffix'} = $object->getSkuSuffix(); + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 4ccb169d..ea638ce7 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'stockLocationId')) { $object->setStockLocationId($data->{'stockLocationId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -48,6 +51,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index e6c98e84..de621e74 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -28,6 +28,9 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\StockLocationPostRequestModel(); + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -49,6 +52,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index e53426a8..c02b924a 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -28,6 +28,9 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\StockLocationPutRequestModel(); + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -49,6 +52,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } From 4b324194513783c0ec51fe2e6ab1dac29c423cbf Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 28 Nov 2019 13:39:22 +0100 Subject: [PATCH 16/87] updates OAS to fix patch model for stock location languages --- resources/specification/openapi.json | 60 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index c6a045e3..fd4cf11f 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -412,7 +412,7 @@ "name": "createdSince", "in": "query", "description": "Use this to only fetch customers that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "schema": { "type": "string" } @@ -421,7 +421,7 @@ "name": "updatedSince", "in": "query", "description": "Use this to only fetch customers that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "schema": { "type": "string" } @@ -4838,7 +4838,7 @@ "name": "createdSince", "in": "query", "description": "Use this to only fetch products that has been created since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "schema": { "type": "string" } @@ -4847,7 +4847,7 @@ "name": "updatedSince", "in": "query", "description": "Use this to only fetch products that has been modified since a certain time. The time should be formatted using ISO-8601 (url encoded)", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "schema": { "type": "string" } @@ -8508,7 +8508,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "baseCurrencyCode": { @@ -8562,7 +8562,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "customerId": { "type": "integer", @@ -8800,7 +8800,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "baseCurrencyCode": { @@ -8854,7 +8854,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "customerId": { "type": "integer", @@ -9084,7 +9084,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the order was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "baseCurrencyCode": { @@ -9138,7 +9138,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the order was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "customerId": { "type": "integer", @@ -9787,7 +9787,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "type": { "type": "string", @@ -9854,7 +9854,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "type": { "type": "string", @@ -9890,7 +9890,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the customer was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "approved": { @@ -9902,7 +9902,7 @@ "approvedAt": { "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "pricelistId": { @@ -9933,7 +9933,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the customer was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "type": { "type": "string", @@ -9969,7 +9969,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the customer was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "approved": { @@ -9981,7 +9981,7 @@ "approvedAt": { "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "pricelistId": { @@ -10991,7 +10991,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the comment was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "text": { "type": "string", @@ -11051,13 +11051,13 @@ "createdAt": { "type": "string", "description": "A timestamp of when the media file was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "modifiedAt": { "type": "string", "description": "A timestamp of when the media file was modifies. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "size": { @@ -11335,7 +11335,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "defaultVatRate": { "type": "string", @@ -11413,7 +11413,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "variants": { @@ -11461,7 +11461,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "defaultVatRate": { "type": "string", @@ -11539,7 +11539,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "variants": { @@ -11604,7 +11604,7 @@ "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00" + "example": "2019-11-28T13:38:17+01:00" }, "defaultVatRate": { "type": "string", @@ -11682,7 +11682,7 @@ "modifiedAt": { "type": "string", "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T12:53:20+01:00", + "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, "mediaFiles": { @@ -12943,8 +12943,7 @@ "nullable": true, "minimum": 1, "description": "The id of an order status. Only used with the order-status-changes event.", - "example": 1, - "nullable": true + "example": 1 }, "url": { "type": "string", @@ -13195,7 +13194,10 @@ "default": false }, "languages": { - "$ref": "#\/components\/schemas\/StockLocationLanguagesModelCollection" + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/StockLocationLanguagesModel" + } } } }, From 7a963ae2f50e44c9b3ff23fbd8dd54f4dee8b76d Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 28 Nov 2019 14:36:18 +0100 Subject: [PATCH 17/87] fixes the response code for the createProductManufacturer operation --- resources/specification/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index fd4cf11f..00b9fac9 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -3664,7 +3664,7 @@ "summary": "Create a product manufacturer", "description": "Creates a product manufacturer.", "responses": { - "200": { + "201": { "description": "The created product manufacturer", "content": { "application\/json": { From 0c06204bb18d04c618d5a06a686137da9ff1e468 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 28 Nov 2019 14:37:30 +0100 Subject: [PATCH 18/87] regenerate models --- src/Api/Generated/Endpoint/CreateProductManufacturer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Generated/Endpoint/CreateProductManufacturer.php b/src/Api/Generated/Endpoint/CreateProductManufacturer.php index 003750fe..c7e3aaf0 100644 --- a/src/Api/Generated/Endpoint/CreateProductManufacturer.php +++ b/src/Api/Generated/Endpoint/CreateProductManufacturer.php @@ -42,7 +42,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { From 0d374493f8ade769a226c0b40b51f882587d74e2 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 29 Nov 2019 12:32:37 +0100 Subject: [PATCH 19/87] adds missing external id --- resources/specification/openapi.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 00b9fac9..283f8386 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12677,6 +12677,13 @@ "ProductVariantAttributeValueModelUpdatable": { "type": "object", "properties": { + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this attribute value" + }, "skuSuffix": { "type": "string", "description": "The suggested suffix for new Variants using this attribute value", From fa598b74d99156c79239ac0751d4bbb9b2e6b472 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 29 Nov 2019 12:32:54 +0100 Subject: [PATCH 20/87] regenerate models --- ...uctVariantAttributeValueModelUpdatable.php | 27 +++++++++++++++++++ ...AttributeValueModelUpdatableNormalizer.php | 6 +++++ 2 files changed, 33 insertions(+) diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php index 3251d3f9..27388c93 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php @@ -4,6 +4,12 @@ class ProductVariantAttributeValueModelUpdatable { + /** + * The external id of this attribute value + * + * @var string + */ + protected $externalId = ''; /** * The suggested suffix for new Variants using this attribute value * @@ -22,6 +28,27 @@ class ProductVariantAttributeValueModelUpdatable * @var ProductVariantAttributeValueLanguageModel[] */ protected $languages; + /** + * The external id of this attribute value + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this attribute value + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * The suggested suffix for new Variants using this attribute value * diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 06b2ddd9..7e91eb5b 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -28,6 +28,9 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable(); + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'skuSuffix')) { $object->setSkuSuffix($data->{'skuSuffix'}); } @@ -46,6 +49,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } From 986dddc7efe3926f05d1a83aeac48b4b9088d1c3 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 2 Dec 2019 06:37:49 +0100 Subject: [PATCH 21/87] adds external ids to product and product variants --- resources/specification/openapi.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 283f8386..a3afe766 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11332,6 +11332,13 @@ "readOnly": true, "example": 101 }, + "externalId": { + "type": "string", + "description": "The external id of this unit", + "example": "101", + "maxLength": 40, + "default": "" + }, "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", @@ -11458,6 +11465,13 @@ "readOnly": true, "example": 101 }, + "externalId": { + "type": "string", + "description": "The external id of this unit", + "example": "101", + "maxLength": 40, + "default": "" + }, "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", @@ -11774,6 +11788,13 @@ "maxLength": 40, "description": "The product variants SKU (stock keeping unit)" }, + "externalId": { + "type": "string", + "description": "The external id of this unit", + "example": "101", + "maxLength": 40, + "default": "" + }, "isActive": { "type": "boolean", "default": true, From 9197c776d53f543d1dbc1878a3a9a3e69a9e3125 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 2 Dec 2019 06:38:39 +0100 Subject: [PATCH 22/87] regenerate models --- src/Api/Generated/Model/ProductModel.php | 27 +++++++++++++++++++ .../Generated/Model/ProductModelUpdatable.php | 27 +++++++++++++++++++ .../Generated/Model/ProductVariantModel.php | 27 +++++++++++++++++++ .../Normalizer/ProductModelNormalizer.php | 6 +++++ .../ProductModelUpdatableNormalizer.php | 6 +++++ .../ProductVariantModelNormalizer.php | 6 +++++ 6 files changed, 99 insertions(+) diff --git a/src/Api/Generated/Model/ProductModel.php b/src/Api/Generated/Model/ProductModel.php index fe7cf1e1..86e9beb3 100644 --- a/src/Api/Generated/Model/ProductModel.php +++ b/src/Api/Generated/Model/ProductModel.php @@ -10,6 +10,12 @@ class ProductModel * @var int */ protected $productId; + /** + * The external id of this unit + * + * @var string + */ + protected $externalId = ''; /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * @@ -163,6 +169,27 @@ public function setProductId(int $productId) : self $this->productId = $productId; return $this; } + /** + * The external id of this unit + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this unit + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index b3ca1ca9..e4794085 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -10,6 +10,12 @@ class ProductModelUpdatable * @var int */ protected $productId; + /** + * The external id of this unit + * + * @var string + */ + protected $externalId = ''; /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * @@ -157,6 +163,27 @@ public function setProductId(int $productId) : self $this->productId = $productId; return $this; } + /** + * The external id of this unit + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this unit + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * diff --git a/src/Api/Generated/Model/ProductVariantModel.php b/src/Api/Generated/Model/ProductVariantModel.php index 3f487a61..cdb36d8c 100644 --- a/src/Api/Generated/Model/ProductVariantModel.php +++ b/src/Api/Generated/Model/ProductVariantModel.php @@ -10,6 +10,12 @@ class ProductVariantModel * @var string */ protected $sku; + /** + * The external id of this unit + * + * @var string + */ + protected $externalId = ''; /** * Is this variant active? Only active variants are visible to customers * @@ -109,6 +115,27 @@ public function setSku(string $sku) : self $this->sku = $sku; return $this; } + /** + * The external id of this unit + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this unit + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * Is this variant active? Only active variants are visible to customers * diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 76b43f4e..079e26c1 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'productId')) { $object->setProductId($data->{'productId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } @@ -106,6 +109,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 4691450d..eec74bf7 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'productId')) { $object->setProductId($data->{'productId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } @@ -131,6 +134,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php index 2b872ee5..cee520b6 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -94,6 +97,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getIsActive()) { $data->{'isActive'} = $object->getIsActive(); } From 59818abcad9d6a6563c9b1c035ccf944bcedc392 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 3 Dec 2019 12:55:14 +0100 Subject: [PATCH 23/87] updates specification with externalId and externalIdType fields --- resources/specification/openapi.json | 281 +++++++++++++++++++++++---- 1 file changed, 243 insertions(+), 38 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index a3afe766..f7864632 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -10542,6 +10542,12 @@ "example": "101", "description": "The external id of this pricelist" }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "name": { "type": "string", "maxLength": 30, @@ -10622,6 +10628,19 @@ "example": "My pricelist", "description": "The unique name of this pricelist. Can only be set and updated for non master pricelits." }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "currencyCode": { "type": "string", "minLength": 3, @@ -10675,6 +10694,19 @@ "example": "My pricelist", "description": "The unique name of this pricelist. Can only be set and updated for non master pricelits." }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "parentPricelistId": { "type": "integer", "example": null, @@ -10768,6 +10800,19 @@ "example": "My pricelist", "description": "The unique name of this pricelist. Can only be set and updated for non master pricelits." }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "currencyCode": { "type": "string", "minLength": 3, @@ -10821,6 +10866,19 @@ "example": "My pricelist", "description": "The unique name of this pricelist. Can only be set and updated for non master pricelits." }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "parentPricelistId": { "type": "integer", "example": null, @@ -10880,6 +10938,19 @@ "example": true, "default": false, "description": "Enter product prices in admin incl. VAT, defaults to `false`" + }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" } }, "required": [ @@ -10896,6 +10967,19 @@ "example": "My pricelist", "description": "The unique name of this pricelist. Can only be set and updated for non master pricelits." }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "currencyCode": { "type": "string", "minLength": 3, @@ -10949,6 +11033,19 @@ "example": "My pricelist", "description": "The unique name of this pricelist. Can only be set and updated for non master pricelits." }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "parentPricelistId": { "type": "integer", "example": null, @@ -11154,17 +11251,24 @@ "example": null, "nullable": true }, + "externalId": { + "type": "string", + "description": "The external Id for this category for the system named in externalType", + "maxLength": 40, + "example": "123" + }, "externalType": { "type": "string", - "description": "The system name the externalId belongs to.", + "deprecated": true, + "description": "Deprecated: use `externalIdType` instead", "maxLength": 20, "example": "Fortnox" }, - "externalId": { + "externalIdType": { "type": "string", - "description": "The external Id for this category for the system named in externalType", - "maxLength": 40, - "example": "123" + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "Fortnox" }, "hasChildren": { "type": "boolean", @@ -11213,17 +11317,24 @@ "example": null, "nullable": true }, + "externalId": { + "type": "string", + "description": "The external Id for this category for the system named in externalType", + "maxLength": 40, + "example": "123" + }, "externalType": { "type": "string", - "description": "The system name the externalId belongs to.", + "deprecated": true, + "description": "Deprecated: use `externalIdType` instead", "maxLength": 20, "example": "Fortnox" }, - "externalId": { + "externalIdType": { "type": "string", - "description": "The external Id for this category for the system named in externalType", - "maxLength": 40, - "example": "123" + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "Fortnox" }, "hasChildren": { "type": "boolean", @@ -11334,10 +11445,16 @@ }, "externalId": { "type": "string", - "description": "The external id of this unit", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "createdAt": { "type": "string", @@ -11467,10 +11584,16 @@ }, "externalId": { "type": "string", - "description": "The external id of this unit", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "createdAt": { "type": "string", @@ -11615,6 +11738,19 @@ "readOnly": true, "example": 101 }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" + }, "createdAt": { "type": "string", "description": "A timestamp of when the product was created. The time should be formatted using ISO-8601", @@ -12213,10 +12349,16 @@ }, "externalId": { "type": "string", - "description": "The external id of this unit", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "languages": { "type": "array", @@ -12386,10 +12528,16 @@ }, "externalId": { "type": "string", - "description": "The external id of this manufacturer", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "name": { "type": "string", @@ -12703,7 +12851,13 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this attribute value" + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "skuSuffix": { "type": "string", @@ -12752,7 +12906,13 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this attribute value" + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "skuSuffix": { "type": "string", @@ -12806,7 +12966,13 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this attribute" + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "languages": { "type": "array", @@ -12840,7 +13006,16 @@ }, "externalId": { "type": "string", - "description": "The external id of this attribute" + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "languages": { "type": "object", @@ -13070,10 +13245,16 @@ }, "externalId": { "type": "string", - "description": "The external id of this stock location", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "visibility": { "type": "string", @@ -13106,10 +13287,16 @@ "properties": { "externalId": { "type": "string", - "description": "The external id of this stock location", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "visibility": { "type": "string", @@ -13150,10 +13337,16 @@ "properties": { "externalId": { "type": "string", - "description": "The external id of this stock location", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "visibility": { "type": "string", @@ -13195,10 +13388,16 @@ "properties": { "externalId": { "type": "string", - "description": "The external id of this stock location", - "example": "101", "maxLength": 40, - "default": "" + "default": "", + "example": "101", + "description": "The external id of this pricelist" + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system" }, "visibility": { "type": "string", @@ -13238,6 +13437,12 @@ "externalId" ] }, + { + "title": "externalIdType update", + "required": [ + "externalIdType" + ] + }, { "title": "visibility update", "required": [ From 1b6111f621707dc66ae8b165e53efe8034120fd8 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 3 Dec 2019 12:55:53 +0100 Subject: [PATCH 24/87] regenerates models --- src/Api/Generated/Model/PricelistModel.php | 27 ++++++++++ .../Generated/Model/ProductCategoryModel.php | 51 +++++++++++++----- .../Model/ProductCategoryModelUpdatable.php | 51 +++++++++++++----- .../Model/ProductManufacturerModel.php | 33 ++++++++++-- src/Api/Generated/Model/ProductModel.php | 33 ++++++++++-- .../Generated/Model/ProductModelPatchable.php | 54 +++++++++++++++++++ .../Generated/Model/ProductModelUpdatable.php | 33 ++++++++++-- src/Api/Generated/Model/ProductUnitModel.php | 33 ++++++++++-- .../Model/ProductVariantAttributeModel.php | 35 ++++++++++-- .../ProductVariantAttributeModelUpdatable.php | 33 ++++++++++-- .../ProductVariantAttributeValueModel.php | 33 ++++++++++-- ...uctVariantAttributeValueModelUpdatable.php | 33 ++++++++++-- .../Generated/Model/StockLocationModel.php | 33 ++++++++++-- .../Model/StockLocationPostRequestModel.php | 33 ++++++++++-- .../Model/StockLocationPutRequestModel.php | 33 ++++++++++-- .../Normalizer/PricelistModelNormalizer.php | 6 +++ .../ProductCategoryModelNormalizer.php | 14 +++-- ...roductCategoryModelUpdatableNormalizer.php | 14 +++-- .../ProductManufacturerModelNormalizer.php | 6 +++ .../Normalizer/ProductModelNormalizer.php | 6 +++ .../ProductModelPatchableNormalizer.php | 12 +++++ .../ProductModelUpdatableNormalizer.php | 6 +++ .../Normalizer/ProductUnitModelNormalizer.php | 6 +++ ...ProductVariantAttributeModelNormalizer.php | 6 +++ ...riantAttributeModelUpdatableNormalizer.php | 6 +++ ...ctVariantAttributeValueModelNormalizer.php | 6 +++ ...AttributeValueModelUpdatableNormalizer.php | 6 +++ .../StockLocationModelNormalizer.php | 6 +++ ...tockLocationPostRequestModelNormalizer.php | 6 +++ ...StockLocationPutRequestModelNormalizer.php | 6 +++ 30 files changed, 594 insertions(+), 66 deletions(-) diff --git a/src/Api/Generated/Model/PricelistModel.php b/src/Api/Generated/Model/PricelistModel.php index f2589373..876641fc 100644 --- a/src/Api/Generated/Model/PricelistModel.php +++ b/src/Api/Generated/Model/PricelistModel.php @@ -16,6 +16,12 @@ class PricelistModel * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The name of this pricelist * @@ -112,6 +118,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The name of this pricelist * diff --git a/src/Api/Generated/Model/ProductCategoryModel.php b/src/Api/Generated/Model/ProductCategoryModel.php index f6646140..36d14e22 100644 --- a/src/Api/Generated/Model/ProductCategoryModel.php +++ b/src/Api/Generated/Model/ProductCategoryModel.php @@ -41,17 +41,23 @@ class ProductCategoryModel */ protected $imageFileId; /** - * The system name the externalId belongs to. + * The external Id for this category for the system named in externalType + * + * @var string + */ + protected $externalId; + /** + * Deprecated: use `externalIdType` instead * * @var string */ protected $externalType; /** - * The external Id for this category for the system named in externalType + * The system name the externalId belongs to. * * @var string */ - protected $externalId; + protected $externalIdType; /** * Whether or not the category has any children categories * @@ -191,7 +197,28 @@ public function setImageFileId(?int $imageFileId) : self return $this; } /** - * The system name the externalId belongs to. + * The external Id for this category for the system named in externalType + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external Id for this category for the system named in externalType + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Deprecated: use `externalIdType` instead * * @return string */ @@ -200,7 +227,7 @@ public function getExternalType() : string return $this->externalType; } /** - * The system name the externalId belongs to. + * Deprecated: use `externalIdType` instead * * @param string $externalType * @@ -212,24 +239,24 @@ public function setExternalType(string $externalType) : self return $this; } /** - * The external Id for this category for the system named in externalType + * The system name the externalId belongs to. * * @return string */ - public function getExternalId() : string + public function getExternalIdType() : string { - return $this->externalId; + return $this->externalIdType; } /** - * The external Id for this category for the system named in externalType + * The system name the externalId belongs to. * - * @param string $externalId + * @param string $externalIdType * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalIdType(string $externalIdType) : self { - $this->externalId = $externalId; + $this->externalIdType = $externalIdType; return $this; } /** diff --git a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php index eade2aa7..e5997e38 100644 --- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php +++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php @@ -41,17 +41,23 @@ class ProductCategoryModelUpdatable */ protected $imageFileId; /** - * The system name the externalId belongs to. + * The external Id for this category for the system named in externalType + * + * @var string + */ + protected $externalId; + /** + * Deprecated: use `externalIdType` instead * * @var string */ protected $externalType; /** - * The external Id for this category for the system named in externalType + * The system name the externalId belongs to. * * @var string */ - protected $externalId; + protected $externalIdType; /** * Whether or not the category has any children categories * @@ -191,7 +197,28 @@ public function setImageFileId(?int $imageFileId) : self return $this; } /** - * The system name the externalId belongs to. + * The external Id for this category for the system named in externalType + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external Id for this category for the system named in externalType + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Deprecated: use `externalIdType` instead * * @return string */ @@ -200,7 +227,7 @@ public function getExternalType() : string return $this->externalType; } /** - * The system name the externalId belongs to. + * Deprecated: use `externalIdType` instead * * @param string $externalType * @@ -212,24 +239,24 @@ public function setExternalType(string $externalType) : self return $this; } /** - * The external Id for this category for the system named in externalType + * The system name the externalId belongs to. * * @return string */ - public function getExternalId() : string + public function getExternalIdType() : string { - return $this->externalId; + return $this->externalIdType; } /** - * The external Id for this category for the system named in externalType + * The system name the externalId belongs to. * - * @param string $externalId + * @param string $externalIdType * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalIdType(string $externalIdType) : self { - $this->externalId = $externalId; + $this->externalIdType = $externalIdType; return $this; } /** diff --git a/src/Api/Generated/Model/ProductManufacturerModel.php b/src/Api/Generated/Model/ProductManufacturerModel.php index 79acd718..6f28ae3d 100644 --- a/src/Api/Generated/Model/ProductManufacturerModel.php +++ b/src/Api/Generated/Model/ProductManufacturerModel.php @@ -11,11 +11,17 @@ class ProductManufacturerModel */ protected $manufacturerId; /** - * The external id of this manufacturer + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The name of this manufacturer * @@ -50,7 +56,7 @@ public function setManufacturerId(int $manufacturerId) : self return $this; } /** - * The external id of this manufacturer + * The external id of this pricelist * * @return string */ @@ -59,7 +65,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this manufacturer + * The external id of this pricelist * * @param string $externalId * @@ -70,6 +76,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The name of this manufacturer * diff --git a/src/Api/Generated/Model/ProductModel.php b/src/Api/Generated/Model/ProductModel.php index 86e9beb3..5288bbef 100644 --- a/src/Api/Generated/Model/ProductModel.php +++ b/src/Api/Generated/Model/ProductModel.php @@ -11,11 +11,17 @@ class ProductModel */ protected $productId; /** - * The external id of this unit + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * @@ -170,7 +176,7 @@ public function setProductId(int $productId) : self return $this; } /** - * The external id of this unit + * The external id of this pricelist * * @return string */ @@ -179,7 +185,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this unit + * The external id of this pricelist * * @param string $externalId * @@ -190,6 +196,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index 98f7641a..9203e0c6 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -10,6 +10,18 @@ class ProductModelPatchable * @var int */ protected $productId; + /** + * The external id of this pricelist + * + * @var string + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * @@ -145,6 +157,48 @@ public function setProductId(int $productId) : self $this->productId = $productId; return $this; } + /** + * The external id of this pricelist + * + * @return string + */ + public function getExternalId() : string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string $externalId + * + * @return self + */ + public function setExternalId(string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index e4794085..c87bbb53 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -11,11 +11,17 @@ class ProductModelUpdatable */ protected $productId; /** - * The external id of this unit + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * @@ -164,7 +170,7 @@ public function setProductId(int $productId) : self return $this; } /** - * The external id of this unit + * The external id of this pricelist * * @return string */ @@ -173,7 +179,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this unit + * The external id of this pricelist * * @param string $externalId * @@ -184,6 +190,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * diff --git a/src/Api/Generated/Model/ProductUnitModel.php b/src/Api/Generated/Model/ProductUnitModel.php index 325c5c51..038fd8f7 100644 --- a/src/Api/Generated/Model/ProductUnitModel.php +++ b/src/Api/Generated/Model/ProductUnitModel.php @@ -11,11 +11,17 @@ class ProductUnitModel */ protected $unitId; /** - * The external id of this unit + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * * @@ -44,7 +50,7 @@ public function setUnitId(int $unitId) : self return $this; } /** - * The external id of this unit + * The external id of this pricelist * * @return string */ @@ -53,7 +59,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this unit + * The external id of this pricelist * * @param string $externalId * @@ -64,6 +70,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * * diff --git a/src/Api/Generated/Model/ProductVariantAttributeModel.php b/src/Api/Generated/Model/ProductVariantAttributeModel.php index c71a1661..9b9151a7 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModel.php @@ -11,11 +11,17 @@ class ProductVariantAttributeModel */ protected $attributeId; /** - * The external id of this attribute + * The external id of this pricelist * * @var string */ - protected $externalId; + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * A collection of attribute languages * @@ -44,7 +50,7 @@ public function setAttributeId(int $attributeId) : self return $this; } /** - * The external id of this attribute + * The external id of this pricelist * * @return string */ @@ -53,7 +59,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this attribute + * The external id of this pricelist * * @param string $externalId * @@ -64,6 +70,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * A collection of attribute languages * diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php index 4c2cfe55..ae5a662e 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php @@ -11,11 +11,17 @@ class ProductVariantAttributeModelUpdatable */ protected $attributeId; /** - * The external id of this attribute + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * A collection of attribute languages * @@ -44,7 +50,7 @@ public function setAttributeId(int $attributeId) : self return $this; } /** - * The external id of this attribute + * The external id of this pricelist * * @return string */ @@ -53,7 +59,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this attribute + * The external id of this pricelist * * @param string $externalId * @@ -64,6 +70,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * A collection of attribute languages * diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php index cf9f0c55..e047458a 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php @@ -11,11 +11,17 @@ class ProductVariantAttributeValueModel */ protected $attributeValueId; /** - * The external id of this attribute value + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The suggested suffix for new Variants using this attribute value * @@ -56,7 +62,7 @@ public function setAttributeValueId(int $attributeValueId) : self return $this; } /** - * The external id of this attribute value + * The external id of this pricelist * * @return string */ @@ -65,7 +71,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this attribute value + * The external id of this pricelist * * @param string $externalId * @@ -76,6 +82,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The suggested suffix for new Variants using this attribute value * diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php index 27388c93..b83e9aae 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php @@ -5,11 +5,17 @@ class ProductVariantAttributeValueModelUpdatable { /** - * The external id of this attribute value + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The suggested suffix for new Variants using this attribute value * @@ -29,7 +35,7 @@ class ProductVariantAttributeValueModelUpdatable */ protected $languages; /** - * The external id of this attribute value + * The external id of this pricelist * * @return string */ @@ -38,7 +44,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this attribute value + * The external id of this pricelist * * @param string $externalId * @@ -49,6 +55,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The suggested suffix for new Variants using this attribute value * diff --git a/src/Api/Generated/Model/StockLocationModel.php b/src/Api/Generated/Model/StockLocationModel.php index fc7fd6b7..6789be22 100644 --- a/src/Api/Generated/Model/StockLocationModel.php +++ b/src/Api/Generated/Model/StockLocationModel.php @@ -11,11 +11,17 @@ class StockLocationModel */ protected $stockLocationId; /** - * The external id of this stock location + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The stock location`s visibility settings. * @@ -62,7 +68,7 @@ public function setStockLocationId(int $stockLocationId) : self return $this; } /** - * The external id of this stock location + * The external id of this pricelist * * @return string */ @@ -71,7 +77,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this stock location + * The external id of this pricelist * * @param string $externalId * @@ -82,6 +88,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The stock location`s visibility settings. * diff --git a/src/Api/Generated/Model/StockLocationPostRequestModel.php b/src/Api/Generated/Model/StockLocationPostRequestModel.php index 93af1b18..ce6d21c5 100644 --- a/src/Api/Generated/Model/StockLocationPostRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php @@ -5,11 +5,17 @@ class StockLocationPostRequestModel { /** - * The external id of this stock location + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The stock location`s visibility settings. * @@ -35,7 +41,7 @@ class StockLocationPostRequestModel */ protected $languages; /** - * The external id of this stock location + * The external id of this pricelist * * @return string */ @@ -44,7 +50,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this stock location + * The external id of this pricelist * * @param string $externalId * @@ -55,6 +61,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The stock location`s visibility settings. * diff --git a/src/Api/Generated/Model/StockLocationPutRequestModel.php b/src/Api/Generated/Model/StockLocationPutRequestModel.php index 4b7befa4..b530939c 100644 --- a/src/Api/Generated/Model/StockLocationPutRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php @@ -5,11 +5,17 @@ class StockLocationPutRequestModel { /** - * The external id of this stock location + * The external id of this pricelist * * @var string */ protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string + */ + protected $externalIdType; /** * The stock location`s visibility settings. * @@ -35,7 +41,7 @@ class StockLocationPutRequestModel */ protected $languages; /** - * The external id of this stock location + * The external id of this pricelist * * @return string */ @@ -44,7 +50,7 @@ public function getExternalId() : string return $this->externalId; } /** - * The external id of this stock location + * The external id of this pricelist * * @param string $externalId * @@ -55,6 +61,27 @@ public function setExternalId(string $externalId) : self $this->externalId = $externalId; return $this; } + /** + * The system name the externalId belongs to. + * + * @return string + */ + public function getExternalIdType() : string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string $externalIdType + * + * @return self + */ + public function setExternalIdType(string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The stock location`s visibility settings. * diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index b7a1095d..df125c74 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } @@ -73,6 +76,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 40a72c4e..8d1c6568 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -46,11 +46,14 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'imageFileId')) { $object->setImageFileId($data->{'imageFileId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'externalType')) { $object->setExternalType($data->{'externalType'}); } - if (property_exists($data, 'externalId')) { - $object->setExternalId($data->{'externalId'}); + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); } if (property_exists($data, 'hasChildren')) { $object->setHasChildren($data->{'hasChildren'}); @@ -74,11 +77,14 @@ public function normalize($object, $format = null, array $context = array()) $data->{'openPage'} = $object->getOpenPage(); } $data->{'imageFileId'} = $object->getImageFileId(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getExternalType()) { $data->{'externalType'} = $object->getExternalType(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); } return $data; } diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index 8b9e50ac..c1362446 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -46,11 +46,14 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'imageFileId')) { $object->setImageFileId($data->{'imageFileId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'externalType')) { $object->setExternalType($data->{'externalType'}); } - if (property_exists($data, 'externalId')) { - $object->setExternalId($data->{'externalId'}); + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); } if (property_exists($data, 'hasChildren')) { $object->setHasChildren($data->{'hasChildren'}); @@ -78,11 +81,14 @@ public function normalize($object, $format = null, array $context = array()) $data->{'openPage'} = $object->getOpenPage(); } $data->{'imageFileId'} = $object->getImageFileId(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } if (null !== $object->getExternalType()) { $data->{'externalType'} = $object->getExternalType(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); } if (null !== $object->getLanguages()) { $values = array(); diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 357315f5..d60d5dd2 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } @@ -48,6 +51,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 079e26c1..c6512fef 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } @@ -112,6 +115,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 4823e3b4..ac0131e3 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'productId')) { $object->setProductId($data->{'productId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } @@ -117,6 +123,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index eec74bf7..55608aa6 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } @@ -137,6 +140,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index ed8170b2..33ffb8b6 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'languages')) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -49,6 +52,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index 1051e6d8..84e95124 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'languages')) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); } @@ -48,6 +51,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index 36df5806..f3ff2f9e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'languages')) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -49,6 +52,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index a17367f2..094d19f8 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'skuSuffix')) { $object->setSkuSuffix($data->{'skuSuffix'}); } @@ -58,6 +61,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 7e91eb5b..80139206 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'skuSuffix')) { $object->setSkuSuffix($data->{'skuSuffix'}); } @@ -52,6 +55,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index ea638ce7..5c2fb43b 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -54,6 +57,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index de621e74..83b92fd0 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -55,6 +58,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index c02b924a..dec77775 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -31,6 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -55,6 +58,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalId()) { $data->{'externalId'} = $object->getExternalId(); } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } From 29f515f0e3cfdccb38abc004e598ee866ac7c017 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 4 Dec 2019 07:25:50 +0100 Subject: [PATCH 25/87] make external ids and external id types nullable --- resources/specification/openapi.json | 123 ++++++++++++++++++--------- 1 file changed, 82 insertions(+), 41 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index f7864632..4f00a7c9 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -10540,13 +10540,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "name": { "type": "string", @@ -10633,13 +10635,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "currencyCode": { "type": "string", @@ -10699,13 +10703,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "parentPricelistId": { "type": "integer", @@ -10805,13 +10811,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "currencyCode": { "type": "string", @@ -10871,13 +10879,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "parentPricelistId": { "type": "integer", @@ -10944,7 +10954,8 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", @@ -10972,13 +10983,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "currencyCode": { "type": "string", @@ -11038,13 +11051,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "parentPricelistId": { "type": "integer", @@ -11448,13 +11463,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "createdAt": { "type": "string", @@ -11587,13 +11604,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "createdAt": { "type": "string", @@ -11743,13 +11762,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "createdAt": { "type": "string", @@ -12352,13 +12373,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "languages": { "type": "array", @@ -12531,13 +12554,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "name": { "type": "string", @@ -12851,13 +12876,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "skuSuffix": { "type": "string", @@ -12906,13 +12933,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "skuSuffix": { "type": "string", @@ -12966,13 +12995,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "languages": { "type": "array", @@ -13009,13 +13040,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "languages": { "type": "object", @@ -13248,13 +13281,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "visibility": { "type": "string", @@ -13290,13 +13325,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "visibility": { "type": "string", @@ -13340,13 +13377,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "visibility": { "type": "string", @@ -13391,13 +13430,15 @@ "maxLength": 40, "default": "", "example": "101", - "description": "The external id of this pricelist" + "description": "The external id of this pricelist", + "nullable": true }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system" + "example": "ERP system", + "nullable": true }, "visibility": { "type": "string", From f757577f1582a2d45e31ad418c212e271983fbf3 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 4 Dec 2019 07:27:22 +0100 Subject: [PATCH 26/87] regenerate models --- src/Api/Generated/Model/PricelistModel.php | 20 +++++++++---------- .../Model/ProductManufacturerModel.php | 20 +++++++++---------- src/Api/Generated/Model/ProductModel.php | 20 +++++++++---------- .../Generated/Model/ProductModelPatchable.php | 20 +++++++++---------- .../Generated/Model/ProductModelUpdatable.php | 20 +++++++++---------- src/Api/Generated/Model/ProductUnitModel.php | 20 +++++++++---------- .../Model/ProductVariantAttributeModel.php | 20 +++++++++---------- .../ProductVariantAttributeModelUpdatable.php | 20 +++++++++---------- .../ProductVariantAttributeValueModel.php | 20 +++++++++---------- ...uctVariantAttributeValueModelUpdatable.php | 20 +++++++++---------- .../Generated/Model/StockLocationModel.php | 20 +++++++++---------- .../Model/StockLocationPostRequestModel.php | 20 +++++++++---------- .../Model/StockLocationPutRequestModel.php | 20 +++++++++---------- .../Normalizer/PricelistModelNormalizer.php | 8 ++------ .../ProductManufacturerModelNormalizer.php | 8 ++------ .../Normalizer/ProductModelNormalizer.php | 8 ++------ .../ProductModelPatchableNormalizer.php | 8 ++------ .../ProductModelUpdatableNormalizer.php | 8 ++------ .../Normalizer/ProductUnitModelNormalizer.php | 8 ++------ ...ProductVariantAttributeModelNormalizer.php | 8 ++------ ...riantAttributeModelUpdatableNormalizer.php | 8 ++------ ...ctVariantAttributeValueModelNormalizer.php | 8 ++------ ...AttributeValueModelUpdatableNormalizer.php | 8 ++------ .../StockLocationModelNormalizer.php | 8 ++------ ...tockLocationPostRequestModelNormalizer.php | 8 ++------ ...StockLocationPutRequestModelNormalizer.php | 8 ++------ 26 files changed, 156 insertions(+), 208 deletions(-) diff --git a/src/Api/Generated/Model/PricelistModel.php b/src/Api/Generated/Model/PricelistModel.php index 876641fc..234f971f 100644 --- a/src/Api/Generated/Model/PricelistModel.php +++ b/src/Api/Generated/Model/PricelistModel.php @@ -13,13 +13,13 @@ class PricelistModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -100,20 +100,20 @@ public function setPricelistId(int $pricelistId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -121,20 +121,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductManufacturerModel.php b/src/Api/Generated/Model/ProductManufacturerModel.php index 6f28ae3d..89dc4ef3 100644 --- a/src/Api/Generated/Model/ProductManufacturerModel.php +++ b/src/Api/Generated/Model/ProductManufacturerModel.php @@ -13,13 +13,13 @@ class ProductManufacturerModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -58,20 +58,20 @@ public function setManufacturerId(int $manufacturerId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -79,20 +79,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductModel.php b/src/Api/Generated/Model/ProductModel.php index 5288bbef..9f81bb28 100644 --- a/src/Api/Generated/Model/ProductModel.php +++ b/src/Api/Generated/Model/ProductModel.php @@ -13,13 +13,13 @@ class ProductModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -178,20 +178,20 @@ public function setProductId(int $productId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -199,20 +199,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index 9203e0c6..b38918dc 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -13,13 +13,13 @@ class ProductModelPatchable /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -160,20 +160,20 @@ public function setProductId(int $productId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -181,20 +181,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index c87bbb53..f4292725 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -13,13 +13,13 @@ class ProductModelUpdatable /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -172,20 +172,20 @@ public function setProductId(int $productId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -193,20 +193,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductUnitModel.php b/src/Api/Generated/Model/ProductUnitModel.php index 038fd8f7..5c34bc14 100644 --- a/src/Api/Generated/Model/ProductUnitModel.php +++ b/src/Api/Generated/Model/ProductUnitModel.php @@ -13,13 +13,13 @@ class ProductUnitModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -52,20 +52,20 @@ public function setUnitId(int $unitId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -73,20 +73,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModel.php b/src/Api/Generated/Model/ProductVariantAttributeModel.php index 9b9151a7..2eaac519 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModel.php @@ -13,13 +13,13 @@ class ProductVariantAttributeModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -52,20 +52,20 @@ public function setAttributeId(int $attributeId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -73,20 +73,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php index ae5a662e..91690725 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php @@ -13,13 +13,13 @@ class ProductVariantAttributeModelUpdatable /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -52,20 +52,20 @@ public function setAttributeId(int $attributeId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -73,20 +73,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php index e047458a..e723332f 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php @@ -13,13 +13,13 @@ class ProductVariantAttributeValueModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -64,20 +64,20 @@ public function setAttributeValueId(int $attributeValueId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -85,20 +85,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php index b83e9aae..33886dda 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php @@ -7,13 +7,13 @@ class ProductVariantAttributeValueModelUpdatable /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -37,20 +37,20 @@ class ProductVariantAttributeValueModelUpdatable /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -58,20 +58,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/StockLocationModel.php b/src/Api/Generated/Model/StockLocationModel.php index 6789be22..e4f4d893 100644 --- a/src/Api/Generated/Model/StockLocationModel.php +++ b/src/Api/Generated/Model/StockLocationModel.php @@ -13,13 +13,13 @@ class StockLocationModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -70,20 +70,20 @@ public function setStockLocationId(int $stockLocationId) : self /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -91,20 +91,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/StockLocationPostRequestModel.php b/src/Api/Generated/Model/StockLocationPostRequestModel.php index ce6d21c5..5e0b89f5 100644 --- a/src/Api/Generated/Model/StockLocationPostRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php @@ -7,13 +7,13 @@ class StockLocationPostRequestModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -43,20 +43,20 @@ class StockLocationPostRequestModel /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -64,20 +64,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/StockLocationPutRequestModel.php b/src/Api/Generated/Model/StockLocationPutRequestModel.php index b530939c..cadf2885 100644 --- a/src/Api/Generated/Model/StockLocationPutRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php @@ -7,13 +7,13 @@ class StockLocationPutRequestModel /** * The external id of this pricelist * - * @var string + * @var string|null */ protected $externalId = ''; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -43,20 +43,20 @@ class StockLocationPutRequestModel /** * The external id of this pricelist * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external id of this pricelist * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -64,20 +64,20 @@ public function setExternalId(string $externalId) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index df125c74..6060dc10 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -73,12 +73,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index d60d5dd2..3f59dd74 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -48,12 +48,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index c6512fef..2cc818e1 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -112,12 +112,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index ac0131e3..1694f2ce 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -123,12 +123,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 55608aa6..c0aac654 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -137,12 +137,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index 33ffb8b6..904ae912 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -49,12 +49,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index 84e95124..1d2f198d 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -48,12 +48,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeId()) { $data->{'attributeId'} = $object->getAttributeId(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index f3ff2f9e..b38207ee 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -49,12 +49,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index 094d19f8..bd825ad9 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -58,12 +58,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeValueId()) { $data->{'attributeValueId'} = $object->getAttributeValueId(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 80139206..4cc1c8a7 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -52,12 +52,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 5c2fb43b..cf3b98c0 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -54,12 +54,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index 83b92fd0..28a4ae66 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -55,12 +55,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index dec77775..f5d6f797 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -55,12 +55,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } From 6cfc550d2590115dc0600dda8f38394576b1bf2f Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 9 Dec 2019 07:55:54 +0100 Subject: [PATCH 27/87] make bundleUseManualPrice nullable --- resources/specification/openapi.json | 3 ++- src/Api/Generated/Model/ProductModelUpdatable.php | 10 +++++----- .../Normalizer/ProductModelUpdatableNormalizer.php | 4 +--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 4f00a7c9..ac70bc5f 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11677,7 +11677,8 @@ "bundleUseManualPrice": { "type": "boolean", "example": false, - "description": "Should all bundled products have a manually entered price? Only applies if type is bundle" + "description": "Should all bundled products have a manually entered price? Only applies if type is bundle", + "nullable": true }, "accounting": { "type": "integer", diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index f4292725..b95695a3 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -85,7 +85,7 @@ class ProductModelUpdatable /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @var bool + * @var bool|null */ protected $bundleUseManualPrice; /** @@ -424,20 +424,20 @@ public function setIsBackInStockWatchable(bool $isBackInStockWatchable) : self /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @return bool + * @return bool|null */ - public function getBundleUseManualPrice() : bool + public function getBundleUseManualPrice() : ?bool { return $this->bundleUseManualPrice; } /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @param bool $bundleUseManualPrice + * @param bool|null $bundleUseManualPrice * * @return self */ - public function setBundleUseManualPrice(bool $bundleUseManualPrice) : self + public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self { $this->bundleUseManualPrice = $bundleUseManualPrice; return $this; diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index c0aac654..3d4a7005 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -165,9 +165,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - if (null !== $object->getBundleUseManualPrice()) { - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - } + $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); $data->{'accounting'} = $object->getAccounting(); if (null !== $object->getVariants()) { $values_1 = array(); From 01a465fc64b6b16950b594e8d01d467d5e5e24df Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 9 Dec 2019 08:03:48 +0100 Subject: [PATCH 28/87] make bundledProducts nullable --- resources/specification/openapi.json | 3 ++- src/Api/Generated/Model/ProductModelUpdatable.php | 10 +++++----- .../Normalizer/ProductModelUpdatableNormalizer.php | 10 ++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index ac70bc5f..8968fa7d 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11711,7 +11711,8 @@ "description": "A collection of bundled products", "items": { "$ref": "#\/components\/schemas\/BundledProductsModel" - } + }, + "nullable": true }, "mediaFiles": { "type": "array", diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index b95695a3..41b8c3f2 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -115,7 +115,7 @@ class ProductModelUpdatable /** * A collection of bundled products * - * @var BundledProductsModel[] + * @var BundledProductsModel[]|null */ protected $bundledProducts; /** @@ -529,20 +529,20 @@ public function setVariants(array $variants) : self /** * A collection of bundled products * - * @return BundledProductsModel[] + * @return BundledProductsModel[]|null */ - public function getBundledProducts() : array + public function getBundledProducts() : ?array { return $this->bundledProducts; } /** * A collection of bundled products * - * @param BundledProductsModel[] $bundledProducts + * @param BundledProductsModel[]|null $bundledProducts * * @return self */ - public function setBundledProducts(array $bundledProducts) : self + public function setBundledProducts(?array $bundledProducts) : self { $this->bundledProducts = $bundledProducts; return $this; diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 3d4a7005..76612262 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -174,13 +174,11 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'variants'} = $values_1; } - if (null !== $object->getBundledProducts()) { - $values_2 = array(); - foreach ($object->getBundledProducts() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data->{'bundledProducts'} = $values_2; + $values_2 = array(); + foreach ($object->getBundledProducts() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } + $data->{'bundledProducts'} = $values_2; if (null !== $object->getMediaFiles()) { $values_3 = array(); foreach ($object->getMediaFiles() as $value_3) { From f48e43b2315b0d96e3514c8583f62ac6e7d51e24 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 9 Dec 2019 12:25:48 +0100 Subject: [PATCH 29/87] updates the branch for the readonly support of janephp lib --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9fc9f047..824a6d80 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "symfony/property-info": "^4.1", "symfony/options-resolver": "^4.1", "psr/simple-cache": "^1.0", - "jane-php/jane-php": "dev-readonly-properties" + "jane-php/jane-php": "dev-readonly-property-support" }, "require-dev": { "phpunit/phpunit": "^8.1", From 169637afc11ddce2b79efc08f31b1d47a4b19839 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 9 Dec 2019 12:43:53 +0100 Subject: [PATCH 30/87] regenerate models --- .../Endpoint/CreateProductManufacturers.php | 52 ---------------- ...roductManufacturersBadRequestException.php | 17 ------ .../Generated/Model/ProductCategoryModel.php | 6 ++ .../Model/ProductCategoryModelUpdatable.php | 6 ++ .../Normalizer/AddressModelItemNormalizer.php | 5 +- .../Normalizer/AddressModelNormalizer.php | 2 +- ...ndledProductsModelCollectionNormalizer.php | 2 +- .../BundledProductsModelItemNormalizer.php | 5 +- .../BundledProductsModelNormalizer.php | 2 +- .../ClientCredentialModelNormalizer.php | 2 +- .../CurrencyCollectionNormalizer.php | 2 +- .../CurrencyModelItemNormalizer.php | 5 +- .../Normalizer/CurrencyModelNormalizer.php | 5 +- ...tomerAddedTagModelCollectionNormalizer.php | 2 +- .../CustomerAddedTagModelItemNormalizer.php | 5 +- .../CustomerAddedTagModelNormalizer.php | 5 +- ...AddressesModelCollectionDataNormalizer.php | 8 ++- ...omerAddressesModelCollectionNormalizer.php | 2 +- .../CustomerAddressesModelItemNormalizer.php | 5 +- .../CustomerCreatedModelItemNormalizer.php | 5 +- .../CustomerCreatedModelNormalizer.php | 13 +++- ...ernalServicesModelCollectionNormalizer.php | 2 +- ...merExternalServicesModelItemNormalizer.php | 5 +- ...ustomerExternalServicesModelNormalizer.php | 2 +- .../CustomerModelCollectionMetaNormalizer.php | 5 +- .../CustomerModelCollectionNormalizer.php | 2 +- .../CustomerModelItemNormalizer.php | 5 +- .../Normalizer/CustomerModelNormalizer.php | 13 +++- .../CustomerTagModelCollectionNormalizer.php | 2 +- .../CustomerTagModelItemNormalizer.php | 5 +- .../Normalizer/CustomerTagModelNormalizer.php | 8 ++- ...CustomerUpdateModelAddressesNormalizer.php | 8 ++- .../CustomerUpdateModelNormalizer.php | 8 ++- .../Normalizer/ErrorModelNormalizer.php | 8 ++- ...MediaFileModelCollectionMetaNormalizer.php | 5 +- .../MediaFileModelCollectionNormalizer.php | 2 +- .../MediaFileModelItemNormalizer.php | 5 +- .../Normalizer/MediaFileModelNormalizer.php | 29 ++++++++- .../MediaFileUploadModelNormalizer.php | 2 +- .../OrderAddressCollectionNormalizer.php | 5 +- .../OrderAddressModelNormalizer.php | 20 ++++++- .../OrderCommentModelCollectionNormalizer.php | 2 +- .../OrderCommentModelItemNormalizer.php | 5 +- .../OrderCommentModelNormalizer.php | 5 +- ...ternalServiceModelCollectionNormalizer.php | 2 +- .../OrderExternalServiceModelNormalizer.php | 5 +- ...derExternalServicesModelItemNormalizer.php | 5 +- ...BundledModelItemBundledItemsNormalizer.php | 2 +- .../OrderItemBundledModelItemNormalizer.php | 2 +- ...rItemModelCollectionDataItemNormalizer.php | 5 +- .../OrderItemModelCollectionNormalizer.php | 2 +- .../OrderItemModelItemNormalizer.php | 5 +- .../Normalizer/OrderItemModelNormalizer.php | 5 +- .../OrderModelCollectionMetaNormalizer.php | 5 +- .../OrderModelCollectionNormalizer.php | 2 +- .../Normalizer/OrderModelItemNormalizer.php | 5 +- .../Normalizer/OrderModelNormalizer.php | 59 ++++++++++++++++++- .../Normalizer/OrderPutModelNormalizer.php | 47 ++++++++++++++- .../OrderStatusLanguageModelNormalizer.php | 2 +- .../OrderStatusModelCollectionNormalizer.php | 2 +- .../OrderStatusModelItemNormalizer.php | 5 +- .../Normalizer/OrderStatusModelNormalizer.php | 8 ++- .../Normalizer/OrderUpdateModelNormalizer.php | 47 ++++++++++++++- .../Normalizer/PaginationModelNormalizer.php | 17 +++++- ...ethodLanguageModelCollectionNormalizer.php | 2 +- .../PaymentMethodLanguageModelNormalizer.php | 14 ++++- ...PaymentMethodModelCollectionNormalizer.php | 2 +- .../PaymentMethodModelItemNormalizer.php | 5 +- .../PaymentMethodModelNormalizer.php | 38 +++++++++++- .../PricelistModelCollectionNormalizer.php | 2 +- .../PricelistModelItemNormalizer.php | 5 +- .../Normalizer/PricelistModelNormalizer.php | 27 ++++++++- ...eProductPriceModelCollectionNormalizer.php | 2 +- ...tBundleProductPriceModelItemNormalizer.php | 5 +- ...oductBundleProductPriceModelNormalizer.php | 2 +- ...goryLanguagesModelCollectionNormalizer.php | 2 +- ...roductCategoryLanguagesModelNormalizer.php | 2 +- ...tCategoryLinkModelCollectionNormalizer.php | 2 +- ...ProductCategoryLinkModelItemNormalizer.php | 5 +- .../ProductCategoryLinkModelNormalizer.php | 2 +- ...tCategoryModelCollectionMetaNormalizer.php | 5 +- ...oductCategoryModelCollectionNormalizer.php | 2 +- .../ProductCategoryModelItemNormalizer.php | 5 +- .../ProductCategoryModelNormalizer.php | 11 +++- ...roductCategoryModelUpdatableNormalizer.php | 8 ++- ...oductLanguageModelCollectionNormalizer.php | 2 +- .../ProductLanguageModelItemNormalizer.php | 5 +- .../ProductLanguageModelNormalizer.php | 2 +- .../ProductLanguageSlimModelNormalizer.php | 2 +- ...tManufacturerModelCollectionNormalizer.php | 2 +- ...ProductManufacturerModelItemNormalizer.php | 5 +- .../ProductManufacturerModelNormalizer.php | 5 +- ...MediaFileLinkModelCollectionNormalizer.php | 2 +- ...roductMediaFileLinkModelItemNormalizer.php | 5 +- .../ProductMediaFileLinkModelNormalizer.php | 8 ++- ...oductMetaDataModelCollectionNormalizer.php | 2 +- .../ProductMetaDataModelItemNormalizer.php | 5 +- .../ProductMetaDataModelNormalizer.php | 5 +- ...roductMetaDataModelUpdatableNormalizer.php | 5 +- ...aTypeLanguageModelCollectionNormalizer.php | 2 +- ...uctMetaDataTypeLanguageModelNormalizer.php | 2 +- ...tMetaDataTypeModelCollectionNormalizer.php | 2 +- ...ProductMetaDataTypeModelItemNormalizer.php | 5 +- .../ProductMetaDataTypeModelNormalizer.php | 8 ++- ...ctMetaDataTypeModelUpdatableNormalizer.php | 5 +- ...aLanguageDataModelCollectionNormalizer.php | 2 +- ...uctMetaLanguageDataModelItemNormalizer.php | 5 +- ...ProductMetaLanguageDataModelNormalizer.php | 2 +- .../ProductModelCollectionMetaNormalizer.php | 5 +- .../ProductModelCollectionNormalizer.php | 2 +- .../Normalizer/ProductModelItemNormalizer.php | 5 +- .../ProductModelLanguagesNormalizer.php | 2 +- .../Normalizer/ProductModelNormalizer.php | 32 +++++++++- .../ProductModelPatchableNormalizer.php | 11 +++- .../ProductModelUpdatableNormalizer.php | 11 +++- ...ductStockStatusLanguageModelNormalizer.php | 2 +- ...ctStockStatusModelCollectionNormalizer.php | 2 +- .../ProductStockStatusModelItemNormalizer.php | 5 +- .../ProductStockStatusModelNormalizer.php | 8 ++- .../ProductTagLanguageModelNormalizer.php | 2 +- ...roductTagLinkModelCollectionNormalizer.php | 2 +- .../ProductTagLinkModelItemNormalizer.php | 5 +- .../ProductTagLinkModelNormalizer.php | 2 +- ...oductTagLinkPostRequestModelNormalizer.php | 2 +- .../ProductTagModelCollectionNormalizer.php | 2 +- .../ProductTagModelItemNormalizer.php | 5 +- .../Normalizer/ProductTagModelNormalizer.php | 8 ++- ...roductTagOptionLanguageModelNormalizer.php | 2 +- ...ductTagOptionModelCollectionNormalizer.php | 2 +- .../ProductTagOptionModelItemNormalizer.php | 5 +- .../ProductTagOptionModelNormalizer.php | 8 ++- ...ctTagOptionPatchRequestModelNormalizer.php | 2 +- ...uctTagOptionPostRequestModelNormalizer.php | 2 +- ...ductTagOptionPutRequestModelNormalizer.php | 2 +- .../ProductTagPatchRequestModelNormalizer.php | 2 +- .../ProductTagPostRequestModelNormalizer.php | 2 +- .../ProductTagPutRequestModelNormalizer.php | 2 +- ...tUnitLanguageModelCollectionNormalizer.php | 2 +- .../ProductUnitLanguageModelNormalizer.php | 2 +- .../ProductUnitModelCollectionNormalizer.php | 2 +- .../ProductUnitModelItemNormalizer.php | 5 +- .../Normalizer/ProductUnitModelNormalizer.php | 5 +- ...ariantAttributeLanguageModelNormalizer.php | 2 +- ...iantAttributeModelCollectionNormalizer.php | 2 +- ...uctVariantAttributeModelItemNormalizer.php | 5 +- ...riantAttributeModelLanguagesNormalizer.php | 2 +- ...ProductVariantAttributeModelNormalizer.php | 2 +- ...riantAttributeModelUpdatableNormalizer.php | 5 +- ...tAttributeValueLanguageModelNormalizer.php | 2 +- ...ttributeValueModelCollectionNormalizer.php | 2 +- ...riantAttributeValueModelItemNormalizer.php | 5 +- ...ctVariantAttributeValueModelNormalizer.php | 2 +- ...AttributeValueModelUpdatableNormalizer.php | 2 +- ...roductVariantModelCollectionNormalizer.php | 2 +- .../ProductVariantModelItemNormalizer.php | 5 +- .../ProductVariantModelNormalizer.php | 2 +- ...tVariantPriceModelCollectionNormalizer.php | 2 +- ...ProductVariantPriceModelItemNormalizer.php | 5 +- .../ProductVariantPriceModelNormalizer.php | 2 +- ...tVariantStockModelCollectionNormalizer.php | 2 +- ...ProductVariantStockModelItemNormalizer.php | 5 +- ...tVariantStockPutRequestModelNormalizer.php | 2 +- ...uctVariantStockResponseModelNormalizer.php | 5 +- ...ntVolumePriceModelCollectionNormalizer.php | 2 +- ...tVariantVolumePriceModelItemNormalizer.php | 5 +- ...oductVariantVolumePriceModelNormalizer.php | 2 +- ...roductVatRateModelCollectionNormalizer.php | 2 +- .../ProductVatRateModelItemNormalizer.php | 5 +- .../ProductVatRateModelNormalizer.php | 2 +- .../ProductsAttributesModelItemNormalizer.php | 2 +- ...ethodLanguageModelCollectionNormalizer.php | 2 +- .../ShippingMethodLanguageModelNormalizer.php | 14 ++++- ...hippingMethodModelCollectionNormalizer.php | 2 +- .../ShippingMethodModelItemNormalizer.php | 5 +- .../ShippingMethodModelNormalizer.php | 31 +++++++++- ...gTrackingTypeModelCollectionNormalizer.php | 2 +- .../ShippingTrackingTypeModelNormalizer.php | 8 ++- .../Normalizer/ShopItemNormalizer.php | 5 +- .../Normalizer/ShopModelNormalizer.php | 54 ++++++++++++++++- ...tionLanguagesModelCollectionNormalizer.php | 2 +- .../StockLocationLanguagesModelNormalizer.php | 2 +- ...StockLocationModelCollectionNormalizer.php | 2 +- .../StockLocationModelItemNormalizer.php | 5 +- .../StockLocationModelNormalizer.php | 8 ++- ...tockLocationPostRequestModelNormalizer.php | 2 +- ...StockLocationPutRequestModelNormalizer.php | 2 +- .../Normalizer/TokenModelNormalizer.php | 11 +++- .../VatRateModelCollectionNormalizer.php | 2 +- .../Normalizer/VatRateModelItemNormalizer.php | 5 +- .../Normalizer/VatRateModelNormalizer.php | 2 +- .../WebHookModelCollectionNormalizer.php | 2 +- .../Normalizer/WebHookModelItemNormalizer.php | 5 +- .../Normalizer/WebHookModelNormalizer.php | 5 +- 193 files changed, 938 insertions(+), 258 deletions(-) delete mode 100644 src/Api/Generated/Endpoint/CreateProductManufacturers.php delete mode 100644 src/Api/Generated/Exception/CreateProductManufacturersBadRequestException.php diff --git a/src/Api/Generated/Endpoint/CreateProductManufacturers.php b/src/Api/Generated/Endpoint/CreateProductManufacturers.php deleted file mode 100644 index 8dd0f24a..00000000 --- a/src/Api/Generated/Endpoint/CreateProductManufacturers.php +++ /dev/null @@ -1,52 +0,0 @@ -body = $requestBody; - } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; - public function getMethod() : string - { - return 'POST'; - } - public function getUri() : string - { - return '/product-manufacturers'; - } - public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array - { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductManufacturerModel) { - return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); - } - return array(array(), null); - } - public function getExtraHeaders() : array - { - return array('Accept' => array('application/json')); - } - /** - * {@inheritdoc} - * - * @throws \Starweb\Api\Generated\Exception\CreateProductManufacturersBadRequestException - * - * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelCollection - */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) - { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { - return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection', 'json'); - } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductManufacturersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); - } - } -} \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductManufacturersBadRequestException.php b/src/Api/Generated/Exception/CreateProductManufacturersBadRequestException.php deleted file mode 100644 index a02985b3..00000000 --- a/src/Api/Generated/Exception/CreateProductManufacturersBadRequestException.php +++ /dev/null @@ -1,17 +0,0 @@ -errorModel = $errorModel; - } - public function getErrorModel() - { - return $this->errorModel; - } -} \ No newline at end of file diff --git a/src/Api/Generated/Model/ProductCategoryModel.php b/src/Api/Generated/Model/ProductCategoryModel.php index 36d14e22..8a5ab3a9 100644 --- a/src/Api/Generated/Model/ProductCategoryModel.php +++ b/src/Api/Generated/Model/ProductCategoryModel.php @@ -49,6 +49,8 @@ class ProductCategoryModel /** * Deprecated: use `externalIdType` instead * + * @deprecated + * * @var string */ protected $externalType; @@ -220,6 +222,8 @@ public function setExternalId(string $externalId) : self /** * Deprecated: use `externalIdType` instead * + * @deprecated + * * @return string */ public function getExternalType() : string @@ -231,6 +235,8 @@ public function getExternalType() : string * * @param string $externalType * + * @deprecated + * * @return self */ public function setExternalType(string $externalType) : self diff --git a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php index e5997e38..d593c0ec 100644 --- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php +++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php @@ -49,6 +49,8 @@ class ProductCategoryModelUpdatable /** * Deprecated: use `externalIdType` instead * + * @deprecated + * * @var string */ protected $externalType; @@ -220,6 +222,8 @@ public function setExternalId(string $externalId) : self /** * Deprecated: use `externalIdType` instead * + * @deprecated + * * @return string */ public function getExternalType() : string @@ -231,6 +235,8 @@ public function getExternalType() : string * * @param string $externalType * + * @deprecated + * * @return self */ public function setExternalType(string $externalType) : self diff --git a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php index 6df91825..97b89b70 100644 --- a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/AddressModelNormalizer.php b/src/Api/Generated/Normalizer/AddressModelNormalizer.php index cd752879..cdca0d71 100644 --- a/src/Api/Generated/Normalizer/AddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php index 727099b0..f65e1482 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php index 2addd86c..bf97d076 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php index 913340df..d11ffd95 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php index 904bfd67..27780b79 100644 --- a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php index 0a030d0d..06cf0918 100644 --- a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php index 1b3ebcd6..52f95844 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index c7df8a0c..cff54630 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -42,6 +42,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCode()) { + $data->{'code'} = $object->getCode(); + } if (null !== $object->getExchangeRate()) { $data->{'exchangeRate'} = $object->getExchangeRate(); } diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php index 66957891..e5a7763f 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php index 5a23385f..95322d08 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index 2b008240..18d6ba8f 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -42,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php index 7a09dbf5..1e3ede4f 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -39,6 +39,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getInvoice()) { + $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); + } + if (null !== $object->getDelivery()) { + $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php index bc482ac8..a99adfee 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php index 191cf9cf..9395ca1b 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php index f49e2781..ae6b040b 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 6304fc7c..571c5c5e 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -69,6 +69,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCustomerId()) { + $data->{'customerId'} = $object->getCustomerId(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -90,6 +93,14 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + $data->{'approved'} = $object->getApproved(); + if (null !== $object->getApprovedAt()) { + $data->{'approvedAt'} = $object->getApprovedAt(); + } + $data->{'pricelistId'} = $object->getPricelistId(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php index a4fa5db1..cd05c7d5 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php index 2163bc53..69d10c95 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php index 682cce92..55926839 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php index 0078ef31..2280eaae 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPagination()) { + $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php index 835e0e00..fc0d53ae 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php index 14e29e41..bbef612a 100644 --- a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index c0e3ee08..9643d103 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -69,6 +69,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCustomerId()) { + $data->{'customerId'} = $object->getCustomerId(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -90,6 +93,14 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + $data->{'approved'} = $object->getApproved(); + if (null !== $object->getApprovedAt()) { + $data->{'approvedAt'} = $object->getApprovedAt(); + } + $data->{'pricelistId'} = $object->getPricelistId(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php index 05e20b03..b67179c9 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php index 4bb6f431..7e4522ef 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index 80c6b298..5f0dce4a 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -39,6 +39,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getTagId()) { + $data->{'tagId'} = $object->getTagId(); + } + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php index f6a85f6e..e07d9a17 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -39,6 +39,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getInvoice()) { + $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); + } + if (null !== $object->getDelivery()) { + $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index af8afda6..0d3ef08a 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -66,6 +66,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCustomerId()) { + $data->{'customerId'} = $object->getCustomerId(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -88,6 +91,9 @@ public function normalize($object, $format = null, array $context = array()) $data->{'customInfo2'} = $object->getCustomInfo2(); } $data->{'pricelistId'} = $object->getPricelistId(); + if (null !== $object->getLangCode()) { + $data->{'langCode'} = $object->getLangCode(); + } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index 66ade103..fc9aeb5b 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ErrorModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ErrorModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -39,6 +39,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getError()) { + $data->{'error'} = $object->getError(); + } + if (null !== $object->getErrorDescription()) { + $data->{'error_description'} = $object->getErrorDescription(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php index 1d4eccc8..79eaac31 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPagination()) { + $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php index c83acf85..12190217 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php index 65cf0f2c..4833ff6b 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index 3c7c65a6..9eee8d90 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -60,6 +60,33 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getMediaFileId()) { + $data->{'mediaFileId'} = $object->getMediaFileId(); + } + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } + if (null !== $object->getCreatedAt()) { + $data->{'createdAt'} = $object->getCreatedAt(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + if (null !== $object->getSize()) { + $data->{'size'} = $object->getSize(); + } + if (null !== $object->getMime()) { + $data->{'mime'} = $object->getMime(); + } + if (null !== $object->getHeight()) { + $data->{'height'} = $object->getHeight(); + } + if (null !== $object->getWidth()) { + $data->{'width'} = $object->getWidth(); + } + if (null !== $object->getUrl()) { + $data->{'url'} = $object->getUrl(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php index 9c4d4a06..5d8eaf9c 100644 --- a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php index 8918da80..4cdbb0ae 100644 --- a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index 3115da98..1989bfc1 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderAddressModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderAddressModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -51,6 +51,24 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getOriginalInvoice()) { + $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); + } + if (null !== $object->getOriginalDelivery()) { + $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); + } + if (null !== $object->getCustomerInvoice()) { + $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); + } + if (null !== $object->getCustomerDelivery()) { + $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); + } + if (null !== $object->getPaymentMethodInvoice()) { + $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); + } + if (null !== $object->getPaymentMethodDelivery()) { + $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php index a8814e23..968dc9d4 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php index b7a8a18e..0d7b2aeb 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index 3135d6e0..9a88e067 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -45,6 +45,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCommentId()) { + $data->{'commentId'} = $object->getCommentId(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php index c5894c8b..2b5916f7 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index d507f80e..5ac08e46 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -48,6 +48,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } + if (null !== $object->getReadOnly()) { + $data->{'readOnly'} = $object->getReadOnly(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php index 8b461161..949932dd 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php index 6ae5b55e..c38592f8 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php index 3aaf787a..ae8e819a 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php index 68cdd3ed..eed99b7f 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -66,6 +66,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getItemId()) { + $data->{'itemId'} = $object->getItemId(); + } if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php index ba0d9696..b3f5f9ea 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php index d9a3eb4d..49fb8965 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index a353186a..7e368397 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -63,6 +63,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getItemId()) { + $data->{'itemId'} = $object->getItemId(); + } if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php index 972cafe4..c7f48ff5 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPagination()) { + $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php index ad0c4e32..8f309e84 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php index ec46a196..40d34d7b 100644 --- a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 188c67e0..9e66d38e 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -198,6 +198,36 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getOrderId()) { + $data->{'orderId'} = $object->getOrderId(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + if (null !== $object->getBaseCurrencyCode()) { + $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); + } + if (null !== $object->getShopCountryCode()) { + $data->{'shopCountryCode'} = $object->getShopCountryCode(); + } + if (null !== $object->getTotalAmount()) { + $data->{'totalAmount'} = $object->getTotalAmount(); + } + if (null !== $object->getTotalVat()) { + $data->{'totalVat'} = $object->getTotalVat(); + } + if (null !== $object->getAmountToPay()) { + $data->{'amountToPay'} = $object->getAmountToPay(); + } + if (null !== $object->getTotalAmountInBaseCurrency()) { + $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); + } + if (null !== $object->getTotalVatInBaseCurrency()) { + $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); + } + if (null !== $object->getAmountToPayInBaseCurrency()) { + $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -222,6 +252,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } + if (null !== $object->getPaymentMethodIdCode()) { + $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); + } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -240,6 +273,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } + if (null !== $object->getTotalWeight()) { + $data->{'totalWeight'} = $object->getTotalWeight(); + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -258,6 +294,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } + if (null !== $object->getAmountPaidInBaseCurrency()) { + $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); + } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -282,6 +321,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } + if (null !== $object->getHasComments()) { + $data->{'hasComments'} = $object->getHasComments(); + } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } @@ -306,6 +348,21 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } + if (null !== $object->getItems()) { + $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context); + } + if (null !== $object->getAddresses()) { + $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + } + if (null !== $object->getExternalServices()) { + $data->{'externalServices'} = $this->normalizer->normalize($object->getExternalServices(), 'json', $context); + } + if (null !== $object->getCustomer()) { + $data->{'customer'} = $this->normalizer->normalize($object->getCustomer(), 'json', $context); + } + if (null !== $object->getStatus()) { + $data->{'status'} = $this->normalizer->normalize($object->getStatus(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index e708e51f..362aef2d 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderPutModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderPutModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -190,6 +190,36 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getOrderId()) { + $data->{'orderId'} = $object->getOrderId(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + if (null !== $object->getBaseCurrencyCode()) { + $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); + } + if (null !== $object->getShopCountryCode()) { + $data->{'shopCountryCode'} = $object->getShopCountryCode(); + } + if (null !== $object->getTotalAmount()) { + $data->{'totalAmount'} = $object->getTotalAmount(); + } + if (null !== $object->getTotalVat()) { + $data->{'totalVat'} = $object->getTotalVat(); + } + if (null !== $object->getAmountToPay()) { + $data->{'amountToPay'} = $object->getAmountToPay(); + } + if (null !== $object->getTotalAmountInBaseCurrency()) { + $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); + } + if (null !== $object->getTotalVatInBaseCurrency()) { + $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); + } + if (null !== $object->getAmountToPayInBaseCurrency()) { + $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -211,6 +241,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } + if (null !== $object->getPaymentMethodIdCode()) { + $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); + } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -229,6 +262,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } + if (null !== $object->getTotalWeight()) { + $data->{'totalWeight'} = $object->getTotalWeight(); + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -247,6 +283,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } + if (null !== $object->getAmountPaidInBaseCurrency()) { + $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); + } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -271,6 +310,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } + if (null !== $object->getHasComment()) { + $data->{'hasComment'} = $object->getHasComment(); + } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } @@ -302,6 +344,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } + if (null !== $object->getAddresses()) { + $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php index 1cf3864a..9949241d 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php index aca9be5b..eb005f78 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php index eb1c4251..41c5cfa3 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index 70026add..63c6a59a 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -49,9 +49,15 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getStatusId()) { + $data->{'statusId'} = $object->getStatusId(); + } if (null !== $object->getShouldSendEmail()) { $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); } + if (null !== $object->getIdCode()) { + $data->{'idCode'} = $object->getIdCode(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index 9cee8c72..f318bfb4 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -190,6 +190,36 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getOrderId()) { + $data->{'orderId'} = $object->getOrderId(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + if (null !== $object->getBaseCurrencyCode()) { + $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); + } + if (null !== $object->getShopCountryCode()) { + $data->{'shopCountryCode'} = $object->getShopCountryCode(); + } + if (null !== $object->getTotalAmount()) { + $data->{'totalAmount'} = $object->getTotalAmount(); + } + if (null !== $object->getTotalVat()) { + $data->{'totalVat'} = $object->getTotalVat(); + } + if (null !== $object->getAmountToPay()) { + $data->{'amountToPay'} = $object->getAmountToPay(); + } + if (null !== $object->getTotalAmountInBaseCurrency()) { + $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); + } + if (null !== $object->getTotalVatInBaseCurrency()) { + $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); + } + if (null !== $object->getAmountToPayInBaseCurrency()) { + $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -211,6 +241,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } + if (null !== $object->getPaymentMethodIdCode()) { + $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); + } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -229,6 +262,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } + if (null !== $object->getTotalWeight()) { + $data->{'totalWeight'} = $object->getTotalWeight(); + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -247,6 +283,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } + if (null !== $object->getAmountPaidInBaseCurrency()) { + $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); + } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -271,6 +310,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } + if (null !== $object->getHasComment()) { + $data->{'hasComment'} = $object->getHasComment(); + } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } @@ -302,6 +344,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } + if (null !== $object->getAddresses()) { + $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index 26d4727f..c35209d4 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaginationModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaginationModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -48,6 +48,21 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCurrentPage()) { + $data->{'current_page'} = $object->getCurrentPage(); + } + if (null !== $object->getPerPage()) { + $data->{'per_page'} = $object->getPerPage(); + } + if (null !== $object->getTotal()) { + $data->{'total'} = $object->getTotal(); + } + if (null !== $object->getCount()) { + $data->{'count'} = $object->getCount(); + } + if (null !== $object->getTotalPages()) { + $data->{'total_pages'} = $object->getTotalPages(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php index c4588c27..c2034a2d 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index c9e4b4ec..decb55c0 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -45,6 +45,18 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getLangCode()) { + $data->{'langCode'} = $object->getLangCode(); + } + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } + if (null !== $object->getTitle()) { + $data->{'title'} = $object->getTitle(); + } + if (null !== $object->getShortDescription()) { + $data->{'shortDescription'} = $object->getShortDescription(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php index 4a301483..9b9ed629 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php index ec43eb63..3d761b82 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index 7cfec7f8..b96d9c3e 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -79,6 +79,42 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPaymentMethodId()) { + $data->{'paymentMethodId'} = $object->getPaymentMethodId(); + } + if (null !== $object->getIdCode()) { + $data->{'idCode'} = $object->getIdCode(); + } + if (null !== $object->getActive()) { + $data->{'active'} = $object->getActive(); + } + if (null !== $object->getFee()) { + $data->{'fee'} = $object->getFee(); + } + if (null !== $object->getValidForCountries()) { + $data->{'validForCountries'} = $object->getValidForCountries(); + } + if (null !== $object->getValidCountriesSelected()) { + $values = array(); + foreach ($object->getValidCountriesSelected() as $value) { + $values[] = $value; + } + $data->{'validCountriesSelected'} = $values; + } + $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal(); + $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal(); + $data->{'validForMinWeight'} = $object->getValidForMinWeight(); + $data->{'validForMaxWeight'} = $object->getValidForMaxWeight(); + if (null !== $object->getValidForShippingMethods()) { + $data->{'validForShippingMethods'} = $object->getValidForShippingMethods(); + } + $data->{'validForCustomerType'} = $object->getValidForCustomerType(); + if (null !== $object->getIsClickAndCollect()) { + $data->{'isClickAndCollect'} = $object->getIsClickAndCollect(); + } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php index 5707df38..cc89c20a 100644 --- a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php index c54ec661..45dcddfe 100644 --- a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 6060dc10..1cc58dc6 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -73,8 +73,33 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPricelistId()) { + $data->{'pricelistId'} = $object->getPricelistId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } + if (null !== $object->getIsMaster()) { + $data->{'isMaster'} = $object->getIsMaster(); + } + if (null !== $object->getIsActive()) { + $data->{'isActive'} = $object->getIsActive(); + } + if (null !== $object->getRegion()) { + $data->{'region'} = $object->getRegion(); + } + if (null !== $object->getCountryCodes()) { + $values = array(); + foreach ($object->getCountryCodes() as $value) { + $values[] = $value; + } + $data->{'countryCodes'} = $values; + } + if (null !== $object->getCurrencyCode()) { + $data->{'currencyCode'} = $object->getCurrencyCode(); + } $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php index 32e9add7..59e53e62 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php index 6026b862..3757a993 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php index acf0f868..75bcdca4 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php index c2d75783..efd2c698 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php index 0f1d905b..206cde97 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php index 0df07325..0d8dcf50 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php index 983e41c8..70909d40 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php index 07f9bcd4..77616a85 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php index 04ffc1ea..21b92ba9 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPagination()) { + $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php index 447513a8..dd5c3213 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php index 3876d525..a07acd34 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 8d1c6568..357e23e7 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -66,6 +66,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCategoryId()) { + $data->{'categoryId'} = $object->getCategoryId(); + } $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); @@ -86,6 +89,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdType()) { $data->{'externalIdType'} = $object->getExternalIdType(); } + if (null !== $object->getHasChildren()) { + $data->{'hasChildren'} = $object->getHasChildren(); + } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index c1362446..f141da7c 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -70,6 +70,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getCategoryId()) { + $data->{'categoryId'} = $object->getCategoryId(); + } $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); @@ -90,6 +93,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdType()) { $data->{'externalIdType'} = $object->getExternalIdType(); } + if (null !== $object->getHasChildren()) { + $data->{'hasChildren'} = $object->getHasChildren(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php index f5b84b9a..9b586428 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php index 161b51f2..b0372006 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php index ddad0cc4..aae2e9e2 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php index f639dfb3..8cb9f68e 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php index a2d13755..db1b2bdc 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php index 8f964918..b7174c7c 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 3f59dd74..21af2e63 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -48,6 +48,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getManufacturerId()) { + $data->{'manufacturerId'} = $object->getManufacturerId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getName()) { diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php index 27ee2080..3b193305 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php index 14fcfff1..6461dea7 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index 8d0c92e1..98246456 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -45,12 +45,18 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getProductMediaFileId()) { + $data->{'productMediaFileId'} = $object->getProductMediaFileId(); + } if (null !== $object->getMediaFileId()) { $data->{'mediaFileId'} = $object->getMediaFileId(); } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + if (null !== $object->getType()) { + $data->{'type'} = $object->getType(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php index 858ef76e..9cbe31a7 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php index 041df003..79b7b0be 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php index fffa4911..65bc5f96 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -54,6 +54,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index e39241da..fb353f24 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -49,6 +49,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getMetaDataId()) { + $data->{'metaDataId'} = $object->getMetaDataId(); + } if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php index 5f2715ad..c0cbcd0d 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php index 3c7c6fde..9af55bb6 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php index 8ab29f35..03765020 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php index ba432e14..43f52e7f 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index e0c3bc5b..bcde6b82 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -39,6 +39,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getMetaDataTypeId()) { + $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); + } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php index a3bd12af..7e880738 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php index f618c2ce..44f1cd2c 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php index 840a73f3..438f5774 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php index c93c82fa..8c4b9417 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php index ea83cc5d..54a7b6c9 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getPagination()) { + $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php index 29da32db..adce2bd5 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php index bcc89574..fe05ff1e 100644 --- a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php index 1e916376..a08ff9bc 100644 --- a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 2cc818e1..1170ba02 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -112,6 +112,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getProductId()) { + $data->{'productId'} = $object->getProductId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { @@ -144,9 +147,36 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); + if (null !== $object->getHasSeveralVariants()) { + $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } + if (null !== $object->getVariants()) { + $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context); + } + if (null !== $object->getBundledProducts()) { + $data->{'bundledProducts'} = $this->normalizer->normalize($object->getBundledProducts(), 'json', $context); + } + if (null !== $object->getMediaFiles()) { + $data->{'mediaFiles'} = $this->normalizer->normalize($object->getMediaFiles(), 'json', $context); + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + if (null !== $object->getVatRates()) { + $data->{'vatRates'} = $this->normalizer->normalize($object->getVatRates(), 'json', $context); + } + if (null !== $object->getCategories()) { + $data->{'categories'} = $this->normalizer->normalize($object->getCategories(), 'json', $context); + } + if (null !== $object->getUnit()) { + $data->{'unit'} = $this->normalizer->normalize($object->getUnit(), 'json', $context); + } + if (null !== $object->getMetaData()) { + $data->{'metaData'} = $this->normalizer->normalize($object->getMetaData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 1694f2ce..ef92f3b1 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -123,6 +123,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getProductId()) { + $data->{'productId'} = $object->getProductId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { @@ -155,6 +158,12 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); + if (null !== $object->getHasSeveralVariants()) { + $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } if (null !== $object->getMediaFiles()) { $values_1 = array(); foreach ($object->getMediaFiles() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 76612262..32e2be90 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -137,6 +137,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getProductId()) { + $data->{'productId'} = $object->getProductId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { @@ -167,6 +170,12 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); $data->{'accounting'} = $object->getAccounting(); + if (null !== $object->getHasSeveralVariants()) { + $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); + } + if (null !== $object->getModifiedAt()) { + $data->{'modifiedAt'} = $object->getModifiedAt(); + } if (null !== $object->getVariants()) { $values_1 = array(); foreach ($object->getVariants() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php index 3e61de1b..4d85ba60 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php index cd118ac4..4e31082f 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index aee9d9c3..6aa63ec4 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php index 334d78a2..a32eeb7f 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -58,6 +58,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + if (null !== $object->getIdCode()) { + $data->{'idCode'} = $object->getIdCode(); + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } diff --git a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php index b762c28d..8f238450 100644 --- a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php index ced40998..00212005 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php index f4d3bbe4..161010c7 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php index 5e78089c..6d11c13d 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php index 772c9b4f..f56e4a4b 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php index 0f787d37..6b4dc2d8 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php index f1812b21..6aee33a8 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index aa873feb..d785a307 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -46,6 +46,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getTagId()) { + $data->{'tagId'} = $object->getTagId(); + } + if (null !== $object->getType()) { + $data->{'type'} = $object->getType(); + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php index 4f3f9a5d..8e4774ba 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php index 9a9436c5..7baa78b0 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php index f1468bec..dfb85120 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index 018bd13e..bd129b09 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -49,6 +49,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getTagOptionId()) { + $data->{'tagOptionId'} = $object->getTagOptionId(); + } + if (null !== $object->getValue()) { + $data->{'value'} = $object->getValue(); + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php index 939711cc..a81ba652 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php index 4b84300e..9e6b93bd 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php index 4e2c2364..0171447b 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php index 76bec644..e5824ec8 100644 --- a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php index 884d6428..0ab3dcd3 100644 --- a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php index 24f90a5f..af4005fe 100644 --- a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php index 68d793ac..17736f96 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php index 359d176e..1354fad9 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php index 4157525f..365ffafa 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php index 29bec22e..ca61525a 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index 904ae912..d016bed4 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -49,6 +49,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getUnitId()) { + $data->{'unitId'} = $object->getUnitId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php index b0814b43..00315cb8 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php index 5014b9d3..67dcdb13 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php index 0143bbb1..70f80066 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php index 69e1d780..5f89f8bf 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index 1d2f198d..d64c135a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index b38207ee..2244ecdf 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -49,6 +49,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getAttributeId()) { + $data->{'attributeId'} = $object->getAttributeId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php index 4b870b75..32a4f78f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php index 97825f7e..2e3e1001 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php index 98436199..48259ba5 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index bd825ad9..dbde2974 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 4cc1c8a7..038d892e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php index 17897890..fb89fcaa 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index 5dabefb6..fafbb5cd 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php index cee520b6..8a7c4fe0 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php index 74269c1f..cde36dc6 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php index 97ecd267..9ab62e96 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index 4a4a06c8..1fa1ff1c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php index 61c4f323..07de7f27 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php index ed4000a9..ed9e4f9a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php index ca08bd21..50317921 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index 312036b2..499efdf5 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -42,6 +42,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getStockLocationId()) { + $data->{'stockLocationId'} = $object->getStockLocationId(); + } if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php index 9192bfbc..c299586e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php index 6a46149a..f4eaec25 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php index 67c67993..d1b624c8 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php index d794a72c..a286c4bc 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php index 1020624a..e768901a 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php index 32ea576f..d73ff55e 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php index 5cbd8a98..f2182aa5 100644 --- a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php index 9f6d01f2..d95506cf 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index 6d6fc5ef..ef906819 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -45,6 +45,18 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getLangCode()) { + $data->{'langCode'} = $object->getLangCode(); + } + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } + if (null !== $object->getTitle()) { + $data->{'title'} = $object->getTitle(); + } + if (null !== $object->getShortDescription()) { + $data->{'shortDescription'} = $object->getShortDescription(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php index a2e72741..7f50d8f4 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php index b0d80b86..e47cee70 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index 63f868d3..6a237825 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -76,6 +76,35 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getShippingMethodId()) { + $data->{'shippingMethodId'} = $object->getShippingMethodId(); + } + if (null !== $object->getActive()) { + $data->{'active'} = $object->getActive(); + } + if (null !== $object->getValidForCountries()) { + $data->{'validForCountries'} = $object->getValidForCountries(); + } + if (null !== $object->getValidCountriesSelected()) { + $values = array(); + foreach ($object->getValidCountriesSelected() as $value) { + $values[] = $value; + } + $data->{'validCountriesSelected'} = $values; + } + $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal(); + $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal(); + $data->{'validForMinWeight'} = $object->getValidForMinWeight(); + $data->{'validForMaxWeight'} = $object->getValidForMaxWeight(); + $data->{'validForCustomerType'} = $object->getValidForCustomerType(); + $data->{'freeShippingMinItemsSubtotal'} = $object->getFreeShippingMinItemsSubtotal(); + $data->{'freeShippingMinWeight'} = $object->getFreeShippingMinWeight(); + if (null !== $object->getIsClickAndCollect()) { + $data->{'isClickAndCollect'} = $object->getIsClickAndCollect(); + } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php index 0134c92b..c7fdb7c2 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index b395ffae..c0c82bd6 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -39,6 +39,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getType()) { + $data->{'type'} = $object->getType(); + } + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopItemNormalizer.php b/src/Api/Generated/Normalizer/ShopItemNormalizer.php index 9ccafa3c..ea87072d 100644 --- a/src/Api/Generated/Normalizer/ShopItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index 0aec93d5..e2386d9b 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -85,6 +85,58 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getName()) { + $data->{'name'} = $object->getName(); + } + if (null !== $object->getIdCode()) { + $data->{'idCode'} = $object->getIdCode(); + } + if (null !== $object->getStatus()) { + $data->{'status'} = $object->getStatus(); + } + if (null !== $object->getDefaultLangCode()) { + $data->{'defaultLangCode'} = $object->getDefaultLangCode(); + } + if (null !== $object->getActiveLangCodes()) { + $values = array(); + foreach ($object->getActiveLangCodes() as $value) { + $values[] = $value; + } + $data->{'activeLangCodes'} = $values; + } + if (null !== $object->getBaseCurrency()) { + $data->{'baseCurrency'} = $object->getBaseCurrency(); + } + if (null !== $object->getDefaultCustomerCountryCode()) { + $data->{'defaultCustomerCountryCode'} = $object->getDefaultCustomerCountryCode(); + } + if (null !== $object->getGeneralDefaultVatRate()) { + $data->{'generalDefaultVatRate'} = $object->getGeneralDefaultVatRate(); + } + if (null !== $object->getShopCompanyName()) { + $data->{'shopCompanyName'} = $object->getShopCompanyName(); + } + if (null !== $object->getShopAddress()) { + $data->{'shopAddress'} = $object->getShopAddress(); + } + if (null !== $object->getShopPostalCode()) { + $data->{'shopPostalCode'} = $object->getShopPostalCode(); + } + if (null !== $object->getShopCity()) { + $data->{'shopCity'} = $object->getShopCity(); + } + if (null !== $object->getShopOrgNo()) { + $data->{'shopOrgNo'} = $object->getShopOrgNo(); + } + if (null !== $object->getShopPhoneNo()) { + $data->{'shopPhoneNo'} = $object->getShopPhoneNo(); + } + if (null !== $object->getShopVatNo()) { + $data->{'shopVatNo'} = $object->getShopVatNo(); + } + if (null !== $object->getShopCountryCode()) { + $data->{'shopCountryCode'} = $object->getShopCountryCode(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php index 951483c8..ea58c26a 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php index e504f378..278125cc 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php index 23fa2489..17e38201 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php index da62426e..abe6c8a4 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index cf3b98c0..96871cc9 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -54,6 +54,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getStockLocationId()) { + $data->{'stockLocationId'} = $object->getStockLocationId(); + } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { @@ -65,6 +68,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index 28a4ae66..904f08ab 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index f5d6f797..0b4ab01d 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index 2dd508d8..9c4489e8 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\TokenModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\TokenModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -42,6 +42,15 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getAccessToken()) { + $data->{'access_token'} = $object->getAccessToken(); + } + if (null !== $object->getScope()) { + $data->{'scope'} = $object->getScope(); + } + if (null !== $object->getExpiresIn()) { + $data->{'expires_in'} = $object->getExpiresIn(); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php index bde62f00..9704752b 100644 --- a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php index 8ad771b8..9f1a8790 100644 --- a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php index 11c256c1..ff9bb54b 100644 --- a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php index 0ff8a288..8b57286e 100644 --- a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection'; } public function denormalize($data, $class, $format = null, array $context = array()) { diff --git a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php index dd641aba..ff80d310 100644 --- a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelItem'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelItem'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -36,6 +36,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getData()) { + $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index c5010245..adcd7ec5 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -20,7 +20,7 @@ public function supportsDenormalization($data, $type, $format = null) } public function supportsNormalization($data, $format = null) { - return get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { @@ -48,6 +48,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); + if (null !== $object->getWebHookId()) { + $data->{'webHookId'} = $object->getWebHookId(); + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } From c54bbd4b7cb4cdf89cdabc809c889f7ab1bbe7b1 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 9 Dec 2019 12:48:21 +0100 Subject: [PATCH 31/87] update jane-php to new read only supported branch and regenerate models --- .../Normalizer/CurrencyModelNormalizer.php | 3 -- .../CustomerAddedTagModelNormalizer.php | 3 -- .../CustomerCreatedModelNormalizer.php | 11 ---- .../Normalizer/CustomerModelNormalizer.php | 11 ---- .../Normalizer/CustomerTagModelNormalizer.php | 6 --- .../CustomerUpdateModelNormalizer.php | 6 --- .../Normalizer/ErrorModelNormalizer.php | 6 --- .../Normalizer/MediaFileModelNormalizer.php | 27 ---------- .../OrderCommentModelNormalizer.php | 3 -- .../OrderExternalServiceModelNormalizer.php | 3 -- ...rItemModelCollectionDataItemNormalizer.php | 3 -- .../Normalizer/OrderItemModelNormalizer.php | 3 -- .../Normalizer/OrderModelNormalizer.php | 42 --------------- .../Normalizer/OrderPutModelNormalizer.php | 42 --------------- .../Normalizer/OrderStatusModelNormalizer.php | 6 --- .../Normalizer/OrderUpdateModelNormalizer.php | 42 --------------- .../Normalizer/PaginationModelNormalizer.php | 15 ------ .../PaymentMethodLanguageModelNormalizer.php | 12 ----- .../PaymentMethodModelNormalizer.php | 33 ------------ .../Normalizer/PricelistModelNormalizer.php | 25 --------- .../ProductCategoryModelNormalizer.php | 6 --- ...roductCategoryModelUpdatableNormalizer.php | 6 --- .../ProductManufacturerModelNormalizer.php | 3 -- .../ProductMediaFileLinkModelNormalizer.php | 6 --- ...roductMetaDataModelUpdatableNormalizer.php | 3 -- .../ProductMetaDataTypeModelNormalizer.php | 3 -- .../Normalizer/ProductModelNormalizer.php | 9 ---- .../ProductModelPatchableNormalizer.php | 9 ---- .../ProductModelUpdatableNormalizer.php | 22 ++++---- .../ProductStockStatusModelNormalizer.php | 6 --- .../Normalizer/ProductTagModelNormalizer.php | 6 --- .../ProductTagOptionModelNormalizer.php | 6 --- .../Normalizer/ProductUnitModelNormalizer.php | 3 -- ...riantAttributeModelUpdatableNormalizer.php | 3 -- ...uctVariantStockResponseModelNormalizer.php | 3 -- .../ShippingMethodLanguageModelNormalizer.php | 12 ----- .../ShippingMethodModelNormalizer.php | 26 ---------- .../ShippingTrackingTypeModelNormalizer.php | 6 --- .../Normalizer/ShopModelNormalizer.php | 52 ------------------- .../StockLocationModelNormalizer.php | 3 -- .../Normalizer/TokenModelNormalizer.php | 9 ---- .../Normalizer/WebHookModelNormalizer.php | 3 -- 42 files changed, 9 insertions(+), 498 deletions(-) diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index cff54630..53ee9458 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -42,9 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCode()) { - $data->{'code'} = $object->getCode(); - } if (null !== $object->getExchangeRate()) { $data->{'exchangeRate'} = $object->getExchangeRate(); } diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index 18d6ba8f..319a7c32 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -42,9 +42,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 571c5c5e..9e9f65cd 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -69,9 +69,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -93,14 +90,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - $data->{'approved'} = $object->getApproved(); - if (null !== $object->getApprovedAt()) { - $data->{'approvedAt'} = $object->getApprovedAt(); - } - $data->{'pricelistId'} = $object->getPricelistId(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index 9643d103..7ad7af7d 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -69,9 +69,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -93,14 +90,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - $data->{'approved'} = $object->getApproved(); - if (null !== $object->getApprovedAt()) { - $data->{'approvedAt'} = $object->getApprovedAt(); - } - $data->{'pricelistId'} = $object->getPricelistId(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index 5f0dce4a..4a898615 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getTagId()) { - $data->{'tagId'} = $object->getTagId(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index 0d3ef08a..c1f78646 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -66,9 +66,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -91,9 +88,6 @@ public function normalize($object, $format = null, array $context = array()) $data->{'customInfo2'} = $object->getCustomInfo2(); } $data->{'pricelistId'} = $object->getPricelistId(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index fc9aeb5b..b2f44219 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getError()) { - $data->{'error'} = $object->getError(); - } - if (null !== $object->getErrorDescription()) { - $data->{'error_description'} = $object->getErrorDescription(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index 9eee8d90..c0dcf21a 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -60,33 +60,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getMediaFileId()) { - $data->{'mediaFileId'} = $object->getMediaFileId(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getSize()) { - $data->{'size'} = $object->getSize(); - } - if (null !== $object->getMime()) { - $data->{'mime'} = $object->getMime(); - } - if (null !== $object->getHeight()) { - $data->{'height'} = $object->getHeight(); - } - if (null !== $object->getWidth()) { - $data->{'width'} = $object->getWidth(); - } - if (null !== $object->getUrl()) { - $data->{'url'} = $object->getUrl(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index 9a88e067..0004b063 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -45,9 +45,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCommentId()) { - $data->{'commentId'} = $object->getCommentId(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index 5ac08e46..c52c81b7 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -48,9 +48,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } - if (null !== $object->getReadOnly()) { - $data->{'readOnly'} = $object->getReadOnly(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php index eed99b7f..e08885ab 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -66,9 +66,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getItemId()) { - $data->{'itemId'} = $object->getItemId(); - } if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index 7e368397..2e8214cb 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -63,9 +63,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getItemId()) { - $data->{'itemId'} = $object->getItemId(); - } if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 9e66d38e..5682f2db 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -198,36 +198,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOrderId()) { - $data->{'orderId'} = $object->getOrderId(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getBaseCurrencyCode()) { - $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } - if (null !== $object->getTotalAmount()) { - $data->{'totalAmount'} = $object->getTotalAmount(); - } - if (null !== $object->getTotalVat()) { - $data->{'totalVat'} = $object->getTotalVat(); - } - if (null !== $object->getAmountToPay()) { - $data->{'amountToPay'} = $object->getAmountToPay(); - } - if (null !== $object->getTotalAmountInBaseCurrency()) { - $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); - } - if (null !== $object->getTotalVatInBaseCurrency()) { - $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); - } - if (null !== $object->getAmountToPayInBaseCurrency()) { - $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -252,9 +222,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodIdCode()) { - $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -273,9 +240,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - if (null !== $object->getTotalWeight()) { - $data->{'totalWeight'} = $object->getTotalWeight(); - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -294,9 +258,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - if (null !== $object->getAmountPaidInBaseCurrency()) { - $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -321,9 +282,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - if (null !== $object->getHasComments()) { - $data->{'hasComments'} = $object->getHasComments(); - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index 362aef2d..6f22d05e 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -190,36 +190,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOrderId()) { - $data->{'orderId'} = $object->getOrderId(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getBaseCurrencyCode()) { - $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } - if (null !== $object->getTotalAmount()) { - $data->{'totalAmount'} = $object->getTotalAmount(); - } - if (null !== $object->getTotalVat()) { - $data->{'totalVat'} = $object->getTotalVat(); - } - if (null !== $object->getAmountToPay()) { - $data->{'amountToPay'} = $object->getAmountToPay(); - } - if (null !== $object->getTotalAmountInBaseCurrency()) { - $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); - } - if (null !== $object->getTotalVatInBaseCurrency()) { - $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); - } - if (null !== $object->getAmountToPayInBaseCurrency()) { - $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -241,9 +211,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodIdCode()) { - $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -262,9 +229,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - if (null !== $object->getTotalWeight()) { - $data->{'totalWeight'} = $object->getTotalWeight(); - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -283,9 +247,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - if (null !== $object->getAmountPaidInBaseCurrency()) { - $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -310,9 +271,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - if (null !== $object->getHasComment()) { - $data->{'hasComment'} = $object->getHasComment(); - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index 63c6a59a..34881568 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -49,15 +49,9 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); - } if (null !== $object->getShouldSendEmail()) { $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index f318bfb4..e22c968c 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -190,36 +190,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getOrderId()) { - $data->{'orderId'} = $object->getOrderId(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } - if (null !== $object->getBaseCurrencyCode()) { - $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } - if (null !== $object->getTotalAmount()) { - $data->{'totalAmount'} = $object->getTotalAmount(); - } - if (null !== $object->getTotalVat()) { - $data->{'totalVat'} = $object->getTotalVat(); - } - if (null !== $object->getAmountToPay()) { - $data->{'amountToPay'} = $object->getAmountToPay(); - } - if (null !== $object->getTotalAmountInBaseCurrency()) { - $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency(); - } - if (null !== $object->getTotalVatInBaseCurrency()) { - $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency(); - } - if (null !== $object->getAmountToPayInBaseCurrency()) { - $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency(); - } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } @@ -241,9 +211,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodIdCode()) { - $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode(); - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } @@ -262,9 +229,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - if (null !== $object->getTotalWeight()) { - $data->{'totalWeight'} = $object->getTotalWeight(); - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } @@ -283,9 +247,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - if (null !== $object->getAmountPaidInBaseCurrency()) { - $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency(); - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } @@ -310,9 +271,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - if (null !== $object->getHasComment()) { - $data->{'hasComment'} = $object->getHasComment(); - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index c35209d4..ef32a89e 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -48,21 +48,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCurrentPage()) { - $data->{'current_page'} = $object->getCurrentPage(); - } - if (null !== $object->getPerPage()) { - $data->{'per_page'} = $object->getPerPage(); - } - if (null !== $object->getTotal()) { - $data->{'total'} = $object->getTotal(); - } - if (null !== $object->getCount()) { - $data->{'count'} = $object->getCount(); - } - if (null !== $object->getTotalPages()) { - $data->{'total_pages'} = $object->getTotalPages(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index decb55c0..74ef0797 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -45,18 +45,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getTitle()) { - $data->{'title'} = $object->getTitle(); - } - if (null !== $object->getShortDescription()) { - $data->{'shortDescription'} = $object->getShortDescription(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index b96d9c3e..efc8e504 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -79,39 +79,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPaymentMethodId()) { - $data->{'paymentMethodId'} = $object->getPaymentMethodId(); - } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } - if (null !== $object->getActive()) { - $data->{'active'} = $object->getActive(); - } - if (null !== $object->getFee()) { - $data->{'fee'} = $object->getFee(); - } - if (null !== $object->getValidForCountries()) { - $data->{'validForCountries'} = $object->getValidForCountries(); - } - if (null !== $object->getValidCountriesSelected()) { - $values = array(); - foreach ($object->getValidCountriesSelected() as $value) { - $values[] = $value; - } - $data->{'validCountriesSelected'} = $values; - } - $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal(); - $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal(); - $data->{'validForMinWeight'} = $object->getValidForMinWeight(); - $data->{'validForMaxWeight'} = $object->getValidForMaxWeight(); - if (null !== $object->getValidForShippingMethods()) { - $data->{'validForShippingMethods'} = $object->getValidForShippingMethods(); - } - $data->{'validForCustomerType'} = $object->getValidForCustomerType(); - if (null !== $object->getIsClickAndCollect()) { - $data->{'isClickAndCollect'} = $object->getIsClickAndCollect(); - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 1cc58dc6..426fa7bb 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -73,33 +73,8 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getPricelistId()) { - $data->{'pricelistId'} = $object->getPricelistId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getIsMaster()) { - $data->{'isMaster'} = $object->getIsMaster(); - } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - if (null !== $object->getRegion()) { - $data->{'region'} = $object->getRegion(); - } - if (null !== $object->getCountryCodes()) { - $values = array(); - foreach ($object->getCountryCodes() as $value) { - $values[] = $value; - } - $data->{'countryCodes'} = $values; - } - if (null !== $object->getCurrencyCode()) { - $data->{'currencyCode'} = $object->getCurrencyCode(); - } $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 357e23e7..9d954fbc 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -66,9 +66,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCategoryId()) { - $data->{'categoryId'} = $object->getCategoryId(); - } $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); @@ -89,9 +86,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdType()) { $data->{'externalIdType'} = $object->getExternalIdType(); } - if (null !== $object->getHasChildren()) { - $data->{'hasChildren'} = $object->getHasChildren(); - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index f141da7c..ec087caa 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -70,9 +70,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getCategoryId()) { - $data->{'categoryId'} = $object->getCategoryId(); - } $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); @@ -93,9 +90,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdType()) { $data->{'externalIdType'} = $object->getExternalIdType(); } - if (null !== $object->getHasChildren()) { - $data->{'hasChildren'} = $object->getHasChildren(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 21af2e63..bea6fe9c 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -48,9 +48,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getManufacturerId()) { - $data->{'manufacturerId'} = $object->getManufacturerId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getName()) { diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index 98246456..95960dd1 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -45,18 +45,12 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductMediaFileId()) { - $data->{'productMediaFileId'} = $object->getProductMediaFileId(); - } if (null !== $object->getMediaFileId()) { $data->{'mediaFileId'} = $object->getMediaFileId(); } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index fb353f24..c724f3e2 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -49,9 +49,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getMetaDataId()) { - $data->{'metaDataId'} = $object->getMetaDataId(); - } if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index bcde6b82..ca1cf2a0 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -39,9 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getMetaDataTypeId()) { - $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 1170ba02..23d589aa 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -112,9 +112,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductId()) { - $data->{'productId'} = $object->getProductId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { @@ -147,12 +144,6 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getHasSeveralVariants()) { - $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } if (null !== $object->getVariants()) { $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index ef92f3b1..df18755a 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -123,9 +123,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductId()) { - $data->{'productId'} = $object->getProductId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { @@ -158,12 +155,6 @@ public function normalize($object, $format = null, array $context = array()) $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getHasSeveralVariants()) { - $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } if (null !== $object->getMediaFiles()) { $values_1 = array(); foreach ($object->getMediaFiles() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 32e2be90..6aa68cd4 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -137,9 +137,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getProductId()) { - $data->{'productId'} = $object->getProductId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { @@ -170,12 +167,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getHasSeveralVariants()) { - $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants(); - } - if (null !== $object->getModifiedAt()) { - $data->{'modifiedAt'} = $object->getModifiedAt(); - } if (null !== $object->getVariants()) { $values_1 = array(); foreach ($object->getVariants() as $value_1) { @@ -183,11 +174,16 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'variants'} = $values_1; } - $values_2 = array(); - foreach ($object->getBundledProducts() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + if (null !== $object->getBundledProducts()) { + $values_2 = array(); + foreach ($object->getBundledProducts() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data->{'bundledProducts'} = $values_2; + } + else { + $data->{'bundledProducts'} = null; } - $data->{'bundledProducts'} = $values_2; if (null !== $object->getMediaFiles()) { $values_3 = array(); foreach ($object->getMediaFiles() as $value_3) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php index a32eeb7f..ccf00ab6 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php @@ -58,12 +58,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index d785a307..6db8891f 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -46,12 +46,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getTagId()) { - $data->{'tagId'} = $object->getTagId(); - } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index bd129b09..3c9e7b46 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -49,12 +49,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getTagOptionId()) { - $data->{'tagOptionId'} = $object->getTagOptionId(); - } - if (null !== $object->getValue()) { - $data->{'value'} = $object->getValue(); - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index d016bed4..7899cfd6 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -49,9 +49,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getUnitId()) { - $data->{'unitId'} = $object->getUnitId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index 2244ecdf..7249ac08 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -49,9 +49,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getAttributeId()) { - $data->{'attributeId'} = $object->getAttributeId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index 499efdf5..d58833e6 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -42,9 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStockLocationId()) { - $data->{'stockLocationId'} = $object->getStockLocationId(); - } if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index ef906819..0e3f02bd 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -45,18 +45,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getTitle()) { - $data->{'title'} = $object->getTitle(); - } - if (null !== $object->getShortDescription()) { - $data->{'shortDescription'} = $object->getShortDescription(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index 6a237825..131208f7 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -76,32 +76,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getShippingMethodId()) { - $data->{'shippingMethodId'} = $object->getShippingMethodId(); - } - if (null !== $object->getActive()) { - $data->{'active'} = $object->getActive(); - } - if (null !== $object->getValidForCountries()) { - $data->{'validForCountries'} = $object->getValidForCountries(); - } - if (null !== $object->getValidCountriesSelected()) { - $values = array(); - foreach ($object->getValidCountriesSelected() as $value) { - $values[] = $value; - } - $data->{'validCountriesSelected'} = $values; - } - $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal(); - $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal(); - $data->{'validForMinWeight'} = $object->getValidForMinWeight(); - $data->{'validForMaxWeight'} = $object->getValidForMaxWeight(); - $data->{'validForCustomerType'} = $object->getValidForCustomerType(); - $data->{'freeShippingMinItemsSubtotal'} = $object->getFreeShippingMinItemsSubtotal(); - $data->{'freeShippingMinWeight'} = $object->getFreeShippingMinWeight(); - if (null !== $object->getIsClickAndCollect()) { - $data->{'isClickAndCollect'} = $object->getIsClickAndCollect(); - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index c0c82bd6..1de708d5 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -39,12 +39,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index e2386d9b..f6ad2432 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -85,58 +85,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getIdCode()) { - $data->{'idCode'} = $object->getIdCode(); - } - if (null !== $object->getStatus()) { - $data->{'status'} = $object->getStatus(); - } - if (null !== $object->getDefaultLangCode()) { - $data->{'defaultLangCode'} = $object->getDefaultLangCode(); - } - if (null !== $object->getActiveLangCodes()) { - $values = array(); - foreach ($object->getActiveLangCodes() as $value) { - $values[] = $value; - } - $data->{'activeLangCodes'} = $values; - } - if (null !== $object->getBaseCurrency()) { - $data->{'baseCurrency'} = $object->getBaseCurrency(); - } - if (null !== $object->getDefaultCustomerCountryCode()) { - $data->{'defaultCustomerCountryCode'} = $object->getDefaultCustomerCountryCode(); - } - if (null !== $object->getGeneralDefaultVatRate()) { - $data->{'generalDefaultVatRate'} = $object->getGeneralDefaultVatRate(); - } - if (null !== $object->getShopCompanyName()) { - $data->{'shopCompanyName'} = $object->getShopCompanyName(); - } - if (null !== $object->getShopAddress()) { - $data->{'shopAddress'} = $object->getShopAddress(); - } - if (null !== $object->getShopPostalCode()) { - $data->{'shopPostalCode'} = $object->getShopPostalCode(); - } - if (null !== $object->getShopCity()) { - $data->{'shopCity'} = $object->getShopCity(); - } - if (null !== $object->getShopOrgNo()) { - $data->{'shopOrgNo'} = $object->getShopOrgNo(); - } - if (null !== $object->getShopPhoneNo()) { - $data->{'shopPhoneNo'} = $object->getShopPhoneNo(); - } - if (null !== $object->getShopVatNo()) { - $data->{'shopVatNo'} = $object->getShopVatNo(); - } - if (null !== $object->getShopCountryCode()) { - $data->{'shopCountryCode'} = $object->getShopCountryCode(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 96871cc9..84d56b53 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -54,9 +54,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getStockLocationId()) { - $data->{'stockLocationId'} = $object->getStockLocationId(); - } $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index 9c4489e8..e6f84f60 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -42,15 +42,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getAccessToken()) { - $data->{'access_token'} = $object->getAccessToken(); - } - if (null !== $object->getScope()) { - $data->{'scope'} = $object->getScope(); - } - if (null !== $object->getExpiresIn()) { - $data->{'expires_in'} = $object->getExpiresIn(); - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index adcd7ec5..36780e4a 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -48,9 +48,6 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getWebHookId()) { - $data->{'webHookId'} = $object->getWebHookId(); - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } From c1a3a0661e4dec3a482f5bda1b416ab0ef5cfa33 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 9 Dec 2019 20:24:19 +0100 Subject: [PATCH 32/87] =?UTF-8?q?update=20to=20latest=20jane=20release=20w?= =?UTF-8?q?hich=20has=20our=20fixes=20for=20read=20only=20and=20nullable?= =?UTF-8?q?=20fields=20integrated=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 824a6d80..1e262d60 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,6 @@ "license": "BSD-3-Clause", "minimum-stability": "dev", "prefer-stable": true, - "repositories": [ - { - "type": "git", - "url": "https://github.com/lordrhodos/janephp.git" - } - ], "require": { "php": ">=7.2", "ext-json": "*", @@ -37,7 +31,7 @@ "symfony/property-info": "^4.1", "symfony/options-resolver": "^4.1", "psr/simple-cache": "^1.0", - "jane-php/jane-php": "dev-readonly-property-support" + "jane-php/jane-php": "^5.2" }, "require-dev": { "phpunit/phpunit": "^8.1", From 61564d25015a5809fb4c0ebdd0b7e4ffc3464632 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 10 Dec 2019 13:03:19 +0100 Subject: [PATCH 33/87] fixes return status codes for PATCH and PUT functions of order comments and product variant attributes --- resources/specification/openapi.json | 8 ++++---- src/Api/Generated/Endpoint/PatchAttribute.php | 2 +- src/Api/Generated/Endpoint/PatchCommentToOrder.php | 2 +- src/Api/Generated/Endpoint/PutAttribute.php | 2 +- src/Api/Generated/Endpoint/UpdateCommentToOrder.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 8968fa7d..e4c609fc 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -1907,7 +1907,7 @@ "summary": "Add an order comment", "description": "Update a comment for an order. Retrieves the created `OrderComment` object", "responses": { - "201": { + "200": { "description": "The created order comment is returned", "content": { "application\/json": { @@ -1941,7 +1941,7 @@ "summary": "Updates an order comment", "description": "Update a comment for an order. Retrieves the created `OrderComment` object", "responses": { - "201": { + "200": { "description": "The created order comment is returned", "content": { "application\/json": { @@ -3051,7 +3051,7 @@ "summary": "Update a product variant attribute", "description": "Updates a product variant attribute.\n Retrieves the updated `ProductVariantAttribute` object.", "responses": { - "201": { + "200": { "description": "The updated attribute is returned", "content": { "application\/json": { @@ -3085,7 +3085,7 @@ "summary": "Update a product variant attribute", "description": "Updates a product variant attribute.\n Retrieves the updated `ProductVariantAttribute` object.", "responses": { - "201": { + "200": { "description": "The updated attribute is returned", "content": { "application\/json": { diff --git a/src/Api/Generated/Endpoint/PatchAttribute.php b/src/Api/Generated/Endpoint/PatchAttribute.php index bd703c9f..ac3fdc26 100644 --- a/src/Api/Generated/Endpoint/PatchAttribute.php +++ b/src/Api/Generated/Endpoint/PatchAttribute.php @@ -46,7 +46,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { diff --git a/src/Api/Generated/Endpoint/PatchCommentToOrder.php b/src/Api/Generated/Endpoint/PatchCommentToOrder.php index 02ef800d..412f361a 100644 --- a/src/Api/Generated/Endpoint/PatchCommentToOrder.php +++ b/src/Api/Generated/Endpoint/PatchCommentToOrder.php @@ -48,7 +48,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { diff --git a/src/Api/Generated/Endpoint/PutAttribute.php b/src/Api/Generated/Endpoint/PutAttribute.php index 99e8a570..f911a650 100644 --- a/src/Api/Generated/Endpoint/PutAttribute.php +++ b/src/Api/Generated/Endpoint/PutAttribute.php @@ -46,7 +46,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { diff --git a/src/Api/Generated/Endpoint/UpdateCommentToOrder.php b/src/Api/Generated/Endpoint/UpdateCommentToOrder.php index e349c511..0ed64aed 100644 --- a/src/Api/Generated/Endpoint/UpdateCommentToOrder.php +++ b/src/Api/Generated/Endpoint/UpdateCommentToOrder.php @@ -48,7 +48,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { From fa8c089b73c1da1ea47ee04d39179ce59eedec1f Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 11 Dec 2019 11:38:47 +0100 Subject: [PATCH 34/87] use collection for languages in product variant attribute value model --- resources/specification/openapi.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index e4c609fc..9ecee6ad 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12958,10 +12958,15 @@ "description": "The sort order for this attribute value" }, "languages": { - "type": "array", + "type": "object", "description": "A collection of attribute value languages", - "items": { - "$ref": "#\/components\/schemas\/ProductVariantAttributeValueLanguageModel" + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/ProductVariantAttributeValueLanguageModel" + } + } } } } From 8e27467f84cb96ba18ced4d2784cbc92566c9903 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 11 Dec 2019 11:39:44 +0100 Subject: [PATCH 35/87] regenerate models --- .../ProductVariantAttributeValueModel.php | 10 ++-- ...uctVariantAttributeValueModelLanguages.php | 34 ++++++++++++ .../Normalizer/NormalizerFactory.php | 1 + ...AttributeValueModelLanguagesNormalizer.php | 52 +++++++++++++++++++ ...ctVariantAttributeValueModelNormalizer.php | 12 +---- 5 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php create mode 100644 src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php index e723332f..cfc7b29b 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php @@ -37,7 +37,7 @@ class ProductVariantAttributeValueModel /** * A collection of attribute value languages * - * @var ProductVariantAttributeValueLanguageModel[] + * @var ProductVariantAttributeValueModelLanguages */ protected $languages; /** @@ -148,20 +148,20 @@ public function setSortIndex(int $sortIndex) : self /** * A collection of attribute value languages * - * @return ProductVariantAttributeValueLanguageModel[] + * @return ProductVariantAttributeValueModelLanguages */ - public function getLanguages() : array + public function getLanguages() : ProductVariantAttributeValueModelLanguages { return $this->languages; } /** * A collection of attribute value languages * - * @param ProductVariantAttributeValueLanguageModel[] $languages + * @param ProductVariantAttributeValueModelLanguages $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(ProductVariantAttributeValueModelLanguages $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php new file mode 100644 index 00000000..ce246822 --- /dev/null +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php @@ -0,0 +1,34 @@ +data; + } + /** + * + * + * @param ProductVariantAttributeValueLanguageModel[] $data + * + * @return self + */ + public function setData(array $data) : self + { + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index 6031c31b..ed808270 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -149,6 +149,7 @@ public static function create() $normalizers[] = new ProductVariantAttributeValueModelUpdatableNormalizer(); $normalizers[] = new ProductVariantAttributeValueLanguageModelNormalizer(); $normalizers[] = new ProductVariantAttributeValueModelNormalizer(); + $normalizers[] = new ProductVariantAttributeValueModelLanguagesNormalizer(); $normalizers[] = new ProductVariantAttributeModelItemNormalizer(); $normalizers[] = new ProductVariantAttributeModelCollectionNormalizer(); $normalizers[] = new ProductVariantAttributeModelUpdatableNormalizer(); diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php new file mode 100644 index 00000000..8a72b3e6 --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php @@ -0,0 +1,52 @@ +{'data'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context); + } + $object->setData($values); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getData()) { + $values = array(); + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'data'} = $values; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index dbde2974..995c49c7 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -44,11 +44,7 @@ public function denormalize($data, $class, $format = null, array $context = arra $object->setSortIndex($data->{'sortIndex'}); } if (property_exists($data, 'languages')) { - $values = array(); - foreach ($data->{'languages'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context); - } - $object->setLanguages($values); + $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages', 'json', $context)); } return $object; } @@ -67,11 +63,7 @@ public function normalize($object, $format = null, array $context = array()) $data->{'sortIndex'} = $object->getSortIndex(); } if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data->{'languages'} = $values; + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } return $data; } From bcb133d89a79d94bf5476916690c7d734320e68f Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 16 Dec 2019 08:19:39 +0100 Subject: [PATCH 36/87] fixing bug by adding variant id to product variant model --- resources/specification/openapi.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 9ecee6ad..a5dc61bd 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11942,6 +11942,11 @@ "ProductVariantModel": { "type": "object", "properties": { + "variantId": { + "type": "integer", + "readOnly": true, + "example": 101 + }, "sku": { "type": "string", "maxLength": 40, From f86fb0d363e5736cc5ca4f4f35830b32fc217c51 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 16 Dec 2019 08:38:25 +0100 Subject: [PATCH 37/87] regenerate models --- .../Generated/Model/ProductVariantModel.php | 27 +++++++++++++++++++ .../ProductVariantModelNormalizer.php | 3 +++ 2 files changed, 30 insertions(+) diff --git a/src/Api/Generated/Model/ProductVariantModel.php b/src/Api/Generated/Model/ProductVariantModel.php index cdb36d8c..2725f1ae 100644 --- a/src/Api/Generated/Model/ProductVariantModel.php +++ b/src/Api/Generated/Model/ProductVariantModel.php @@ -4,6 +4,12 @@ class ProductVariantModel { + /** + * + * + * @var int + */ + protected $variantId; /** * The product variants SKU (stock keeping unit) * @@ -94,6 +100,27 @@ class ProductVariantModel * @var ProductVariantAttributeValueModel[] */ protected $attributeValues; + /** + * + * + * @return int + */ + public function getVariantId() : int + { + return $this->variantId; + } + /** + * + * + * @param int $variantId + * + * @return self + */ + public function setVariantId(int $variantId) : self + { + $this->variantId = $variantId; + return $this; + } /** * The product variants SKU (stock keeping unit) * diff --git a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php index 8a7c4fe0..b2bbac4b 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php @@ -28,6 +28,9 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\ProductVariantModel(); + if (property_exists($data, 'variantId')) { + $object->setVariantId($data->{'variantId'}); + } if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } From 672851a736ffce61e549d91c23ccd7648c121ab9 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 16 Dec 2019 09:52:28 +0100 Subject: [PATCH 38/87] adds missing externalIdType field to product variant --- resources/specification/openapi.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index a5dc61bd..8eddf1a7 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11954,10 +11954,19 @@ }, "externalId": { "type": "string", - "description": "The external id of this unit", + "description": "The external id of this variant", "example": "101", - "maxLength": 40, - "default": "" + "maxLength": 255, + "nullable": true, + "default": null + }, + "externalIdType": { + "type": "string", + "description": "The external id type of this variant", + "example": "101", + "maxLength": 255, + "nullable": true, + "default": null }, "isActive": { "type": "boolean", From 45c92aa8d5a33367c50cab57d0585e20dd0b7639 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 16 Dec 2019 09:52:58 +0100 Subject: [PATCH 39/87] regenerate models --- .../Generated/Model/ProductVariantModel.php | 45 +++++++++++++++---- .../ProductVariantModelNormalizer.php | 8 ++-- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/Api/Generated/Model/ProductVariantModel.php b/src/Api/Generated/Model/ProductVariantModel.php index 2725f1ae..903298cb 100644 --- a/src/Api/Generated/Model/ProductVariantModel.php +++ b/src/Api/Generated/Model/ProductVariantModel.php @@ -17,11 +17,17 @@ class ProductVariantModel */ protected $sku; /** - * The external id of this unit + * The external id of this variant * - * @var string + * @var string|null + */ + protected $externalId; + /** + * The external id type of this variant + * + * @var string|null */ - protected $externalId = ''; + protected $externalIdType; /** * Is this variant active? Only active variants are visible to customers * @@ -143,26 +149,47 @@ public function setSku(string $sku) : self return $this; } /** - * The external id of this unit + * The external id of this variant * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** - * The external id of this unit + * The external id of this variant * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; } + /** + * The external id type of this variant + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The external id type of this variant + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * Is this variant active? Only active variants are visible to customers * diff --git a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php index b2bbac4b..199b3895 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php @@ -37,6 +37,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -100,9 +103,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getIsActive()) { $data->{'isActive'} = $object->getIsActive(); } From 6e0787fef75c9b32105ce7f6e59a6b69bfdfb77f Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 13 Jan 2020 09:24:11 +0100 Subject: [PATCH 40/87] fixes response code for createProductsVariantsAttributeValues operation and regenerate models --- resources/specification/openapi.json | 2 +- .../Endpoint/CreateProductsVariantsAttributeValues.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 8eddf1a7..0b458bd3 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -3188,7 +3188,7 @@ "summary": "Create a product variant attribute value", "description": "Creates a product variant attribute value.\n Retrieves the created `ProductVariantAttributeValue` object.", "responses": { - "200": { + "201": { "description": "The created attribute value", "content": { "application\/json": { diff --git a/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php index 5bd2fd36..95184e17 100644 --- a/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php @@ -46,7 +46,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { From ff41a826407d1d3c24cc791d0cce8e0d54a9cc3b Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 16 Jan 2020 11:17:19 +0100 Subject: [PATCH 41/87] add missing nullable fields to patch model --- resources/specification/openapi.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 0b458bd3..68a67603 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11801,6 +11801,7 @@ "moreInfoUrl": { "type": "string", "maxLength": 255, + "nullable": true, "description": "A valid URL to a web page with more information for this product" }, "manufacturerId": { @@ -11837,6 +11838,7 @@ "bundleUseManualPrice": { "type": "boolean", "example": false, + "nullable": true, "description": "Should all bundled products have a manually entered price? Only applies if type is bundle" }, "accounting": { From 8ca5bba94ce8fd31505f1d847f55b542e9c24f7c Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 16 Jan 2020 11:17:52 +0100 Subject: [PATCH 42/87] regenerate models --- .../Generated/Model/ProductModelPatchable.php | 20 +++++++++---------- .../ProductModelPatchableNormalizer.php | 8 ++------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index b38918dc..0c3fc4b1 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -49,7 +49,7 @@ class ProductModelPatchable /** * A valid URL to a web page with more information for this product * - * @var string + * @var string|null */ protected $moreInfoUrl; /** @@ -85,7 +85,7 @@ class ProductModelPatchable /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @var bool + * @var bool|null */ protected $bundleUseManualPrice; /** @@ -286,20 +286,20 @@ public function setVisibilityPricelistIds(array $visibilityPricelistIds) : self /** * A valid URL to a web page with more information for this product * - * @return string + * @return string|null */ - public function getMoreInfoUrl() : string + public function getMoreInfoUrl() : ?string { return $this->moreInfoUrl; } /** * A valid URL to a web page with more information for this product * - * @param string $moreInfoUrl + * @param string|null $moreInfoUrl * * @return self */ - public function setMoreInfoUrl(string $moreInfoUrl) : self + public function setMoreInfoUrl(?string $moreInfoUrl) : self { $this->moreInfoUrl = $moreInfoUrl; return $this; @@ -412,20 +412,20 @@ public function setIsBackInStockWatchable(bool $isBackInStockWatchable) : self /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @return bool + * @return bool|null */ - public function getBundleUseManualPrice() : bool + public function getBundleUseManualPrice() : ?bool { return $this->bundleUseManualPrice; } /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @param bool $bundleUseManualPrice + * @param bool|null $bundleUseManualPrice * * @return self */ - public function setBundleUseManualPrice(bool $bundleUseManualPrice) : self + public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self { $this->bundleUseManualPrice = $bundleUseManualPrice; return $this; diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index df18755a..456f3874 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -139,9 +139,7 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'visibilityPricelistIds'} = $values; } - if (null !== $object->getMoreInfoUrl()) { - $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); - } + $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); $data->{'manufacturerId'} = $object->getManufacturerId(); $data->{'unitId'} = $object->getUnitId(); $data->{'sortIndex'} = $object->getSortIndex(); @@ -151,9 +149,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - if (null !== $object->getBundleUseManualPrice()) { - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - } + $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); $data->{'accounting'} = $object->getAccounting(); if (null !== $object->getMediaFiles()) { $values_1 = array(); From 43a077f29fe41a7ab67d3694679dfbb392999fc9 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 31 Jan 2020 15:01:58 +0100 Subject: [PATCH 43/87] fix response of createProductUnit operation --- resources/specification/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 68a67603..307ab7d4 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -3853,7 +3853,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductUnitModelCollection" + "$ref": "#\/components\/schemas\/ProductUnitModelItem" } } } From 4ce13029bffd2eb5e67b1d93544431d021fadebb Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 31 Jan 2020 15:02:19 +0100 Subject: [PATCH 44/87] regenerate models --- src/Api/Generated/Client.php | 2 +- src/Api/Generated/Endpoint/CreateProductUnit.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 52deddf9..33b1b37b 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -1388,7 +1388,7 @@ public function listProductUnits(string $fetch = self::FETCH_OBJECT) * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductUnitModelCollection|\Psr\Http\Message\ResponseInterface + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ public function createProductUnit(\Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) { diff --git a/src/Api/Generated/Endpoint/CreateProductUnit.php b/src/Api/Generated/Endpoint/CreateProductUnit.php index 8dc5e30c..3c9d2f10 100644 --- a/src/Api/Generated/Endpoint/CreateProductUnit.php +++ b/src/Api/Generated/Endpoint/CreateProductUnit.php @@ -38,12 +38,12 @@ public function getExtraHeaders() : array * * @throws \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException * - * @return null|\Starweb\Api\Generated\Model\ProductUnitModelCollection + * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { - return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection', 'json'); + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { throw new \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); From 80c042d68fee5d4ce9dc560be6ac8af9576f2622 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 31 Jan 2020 15:48:13 +0100 Subject: [PATCH 45/87] fix product unit models by adding a new product updatable model --- resources/specification/openapi.json | 37 +++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 307ab7d4..50b61339 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -3868,7 +3868,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductUnitModel" + "$ref": "#\/components\/schemas\/ProductUnitModelUpdatable" } } } @@ -3944,7 +3944,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductUnitModel" + "$ref": "#\/components\/schemas\/ProductUnitModelUpdatable" } } } @@ -3978,7 +3978,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductUnitModel" + "$ref": "#\/components\/schemas\/ProductUnitModelUpdatable" } } } @@ -12376,6 +12376,37 @@ } }, "ProductUnitModel": { + "type": "object", + "properties": { + "unitId": { + "type": "integer", + "readOnly": true, + "description": "The units id", + "minimum": 1, + "format": "int32", + "example": 1 + }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system", + "nullable": true + }, + "languages": { + "$ref": "#\/components\/schemas\/ProductUnitLanguageModelCollection" + } + } + }, + "ProductUnitModelUpdatable": { "type": "object", "properties": { "unitId": { From 18822dd6a1332e8e1a48c228f9ac6789b00fe4ba Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 31 Jan 2020 15:48:25 +0100 Subject: [PATCH 46/87] regenerate models --- src/Api/Generated/Client.php | 12 ++++++------ src/Api/Generated/Endpoint/CreateProductUnit.php | 6 +++--- src/Api/Generated/Endpoint/PatchProductUnit.php | 6 +++--- src/Api/Generated/Endpoint/PutProductUnit.php | 6 +++--- src/Api/Generated/Model/ProductUnitModel.php | 10 +++++----- src/Api/Generated/Normalizer/NormalizerFactory.php | 1 + .../Normalizer/ProductUnitModelNormalizer.php | 12 ++---------- 7 files changed, 23 insertions(+), 30 deletions(-) diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 33b1b37b..f15dbab2 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -1384,13 +1384,13 @@ public function listProductUnits(string $fetch = self::FETCH_OBJECT) /** * Creates a product unit. * - * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductUnit(\Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductUnit(\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductUnit($requestBody), $fetch); } @@ -1424,13 +1424,13 @@ public function getProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT) * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductUnit($unitId, $requestBody), $fetch); } @@ -1438,13 +1438,13 @@ public function patchProductUnit(int $unitId, \Starweb\Api\Generated\Model\Produ * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductUnit($unitId, $requestBody), $fetch); } diff --git a/src/Api/Generated/Endpoint/CreateProductUnit.php b/src/Api/Generated/Endpoint/CreateProductUnit.php index 3c9d2f10..eca658fc 100644 --- a/src/Api/Generated/Endpoint/CreateProductUnit.php +++ b/src/Api/Generated/Endpoint/CreateProductUnit.php @@ -7,9 +7,9 @@ class CreateProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint impleme /** * Creates a product unit. * - * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductUnitModel $requestBody) + public function __construct(\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody) { $this->body = $requestBody; } @@ -24,7 +24,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModelUpdatable) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Endpoint/PatchProductUnit.php b/src/Api/Generated/Endpoint/PatchProductUnit.php index 9f02f3cb..e6bb8a7f 100644 --- a/src/Api/Generated/Endpoint/PatchProductUnit.php +++ b/src/Api/Generated/Endpoint/PatchProductUnit.php @@ -9,9 +9,9 @@ class PatchProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implemen * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody */ - public function __construct(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModel $requestBody) + public function __construct(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody) { $this->unitId = $unitId; $this->body = $requestBody; @@ -27,7 +27,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModelUpdatable) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Endpoint/PutProductUnit.php b/src/Api/Generated/Endpoint/PutProductUnit.php index 57777e17..4161b3e5 100644 --- a/src/Api/Generated/Endpoint/PutProductUnit.php +++ b/src/Api/Generated/Endpoint/PutProductUnit.php @@ -9,9 +9,9 @@ class PutProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody */ - public function __construct(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModel $requestBody) + public function __construct(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody) { $this->unitId = $unitId; $this->body = $requestBody; @@ -27,7 +27,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductUnitModelUpdatable) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Model/ProductUnitModel.php b/src/Api/Generated/Model/ProductUnitModel.php index 5c34bc14..20430c43 100644 --- a/src/Api/Generated/Model/ProductUnitModel.php +++ b/src/Api/Generated/Model/ProductUnitModel.php @@ -25,7 +25,7 @@ class ProductUnitModel /** * * - * @var ProductUnitLanguageModel[] + * @var ProductUnitLanguageModelCollection */ protected $languages; /** @@ -94,20 +94,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * * - * @return ProductUnitLanguageModel[] + * @return ProductUnitLanguageModelCollection */ - public function getLanguages() : array + public function getLanguages() : ProductUnitLanguageModelCollection { return $this->languages; } /** * * - * @param ProductUnitLanguageModel[] $languages + * @param ProductUnitLanguageModelCollection $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(ProductUnitLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index ed808270..c472ee81 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -121,6 +121,7 @@ public static function create() $normalizers[] = new ProductUnitModelCollectionNormalizer(); $normalizers[] = new ProductUnitModelItemNormalizer(); $normalizers[] = new ProductUnitModelNormalizer(); + $normalizers[] = new ProductUnitModelUpdatableNormalizer(); $normalizers[] = new ProductUnitLanguageModelCollectionNormalizer(); $normalizers[] = new ProductUnitLanguageModelNormalizer(); $normalizers[] = new ProductVariantPriceModelItemNormalizer(); diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index 7899cfd6..66deb44a 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -38,11 +38,7 @@ public function denormalize($data, $class, $format = null, array $context = arra $object->setExternalIdType($data->{'externalIdType'}); } if (property_exists($data, 'languages')) { - $values = array(); - foreach ($data->{'languages'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); - } - $object->setLanguages($values); + $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); } return $object; } @@ -52,11 +48,7 @@ public function normalize($object, $format = null, array $context = array()) $data->{'externalId'} = $object->getExternalId(); $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data->{'languages'} = $values; + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } return $data; } From 890701a2ee022f5cfefabe677dc1409e68ce8a43 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 31 Jan 2020 16:01:44 +0100 Subject: [PATCH 47/87] adds missing newly generated classes --- .../Model/ProductUnitModelUpdatable.php | 115 ++++++++++++++++++ .../ProductUnitModelUpdatableNormalizer.php | 63 ++++++++++ 2 files changed, 178 insertions(+) create mode 100644 src/Api/Generated/Model/ProductUnitModelUpdatable.php create mode 100644 src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php diff --git a/src/Api/Generated/Model/ProductUnitModelUpdatable.php b/src/Api/Generated/Model/ProductUnitModelUpdatable.php new file mode 100644 index 00000000..7ea1ec31 --- /dev/null +++ b/src/Api/Generated/Model/ProductUnitModelUpdatable.php @@ -0,0 +1,115 @@ +unitId; + } + /** + * The units id + * + * @param int $unitId + * + * @return self + */ + public function setUnitId(int $unitId) : self + { + $this->unitId = $unitId; + return $this; + } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } + /** + * + * + * @return ProductUnitLanguageModel[] + */ + public function getLanguages() : array + { + return $this->languages; + } + /** + * + * + * @param ProductUnitLanguageModel[] $languages + * + * @return self + */ + public function setLanguages(array $languages) : self + { + $this->languages = $languages; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php new file mode 100644 index 00000000..c6bb91db --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php @@ -0,0 +1,63 @@ +setUnitId($data->{'unitId'}); + } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } + if (property_exists($data, 'languages')) { + $values = array(); + foreach ($data->{'languages'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); + } + $object->setLanguages($values); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getLanguages()) { + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'languages'} = $values; + } + return $data; + } +} \ No newline at end of file From e7887d68d8e2584f5a30b1d8564f62428cdcf95f Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 31 Jan 2020 16:12:21 +0100 Subject: [PATCH 48/87] updates readme --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54afa008..e5910696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - support for generated client code built on top of the [Jane](https://github.com/janephp/janephp) library +- feature branch for shop api fixes which are not all release yet ## [0.1.0] - 2019-03-20 ### Added From ada607d4075684053a0ec97e9a8ac186d68205d7 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 3 Feb 2020 07:49:09 +0100 Subject: [PATCH 49/87] fixes response code for createProductUnit operation and regenerate sdk --- resources/specification/openapi.json | 2 +- src/Api/Generated/Endpoint/CreateProductUnit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 50b61339..39292676 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -3848,7 +3848,7 @@ "summary": "Create a product unit", "description": "Creates a product unit.", "responses": { - "200": { + "201": { "description": "The created product unit", "content": { "application\/json": { diff --git a/src/Api/Generated/Endpoint/CreateProductUnit.php b/src/Api/Generated/Endpoint/CreateProductUnit.php index eca658fc..7351692c 100644 --- a/src/Api/Generated/Endpoint/CreateProductUnit.php +++ b/src/Api/Generated/Endpoint/CreateProductUnit.php @@ -42,7 +42,7 @@ public function getExtraHeaders() : array */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); } if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { From 1ce731448501c67e57d5d6b0cb3737c41a312bb6 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 4 Feb 2020 15:43:16 +0100 Subject: [PATCH 50/87] adds external id and type to pricelist price models --- resources/specification/openapi.json | 30 +++++++++++ .../Model/ProductVariantPriceModel.php | 54 +++++++++++++++++++ .../Model/ProductVariantVolumePriceModel.php | 54 +++++++++++++++++++ .../ProductVariantPriceModelNormalizer.php | 8 +++ ...oductVariantVolumePriceModelNormalizer.php | 8 +++ 5 files changed, 154 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 39292676..25d0d225 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12498,6 +12498,21 @@ "type": "integer", "description": "The pricelist this price is for" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 255, + "example": "ERP system", + "nullable": true + }, "priceExVat": { "type": "number", "format": "float", @@ -12551,6 +12566,21 @@ "type": "integer", "description": "The pricelist this price is for" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 255, + "example": "ERP system", + "nullable": true + }, "priceExVat": { "type": "number", "format": "float", diff --git a/src/Api/Generated/Model/ProductVariantPriceModel.php b/src/Api/Generated/Model/ProductVariantPriceModel.php index 69eab861..7ffd562c 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModel.php +++ b/src/Api/Generated/Model/ProductVariantPriceModel.php @@ -10,6 +10,18 @@ class ProductVariantPriceModel * @var int */ protected $pricelistId; + /** + * The external id of this pricelist + * + * @var string|null + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string|null + */ + protected $externalIdType; /** * The price excluding vat * @@ -49,6 +61,48 @@ public function setPricelistId(int $pricelistId) : self $this->pricelistId = $pricelistId; return $this; } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The price excluding vat * diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php index 18d7d4b5..37d70447 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php @@ -10,6 +10,18 @@ class ProductVariantVolumePriceModel * @var int */ protected $pricelistId; + /** + * The external id of this pricelist + * + * @var string|null + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string|null + */ + protected $externalIdType; /** * The price excluding vat * @@ -43,6 +55,48 @@ public function setPricelistId(int $pricelistId) : self $this->pricelistId = $pricelistId; return $this; } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * The price excluding vat * diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index 1fa1ff1c..b2939b70 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'priceExVat')) { $object->setPriceExVat($data->{'priceExVat'}); } @@ -52,6 +58,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getPriceExVat()) { $data->{'priceExVat'} = $object->getPriceExVat(); } diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php index d1b624c8..7d2a594a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'priceExVat')) { $object->setPriceExVat($data->{'priceExVat'}); } @@ -45,6 +51,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getPriceExVat()) { $data->{'priceExVat'} = $object->getPriceExVat(); } From d6f0aa10ecc04afa1c781f78ecb4d41ca8d1cb28 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Wed, 12 Feb 2020 11:13:38 +0100 Subject: [PATCH 51/87] fixes specification of stock-status models and regenerates sdk --- resources/specification/openapi.json | 63 +++++- src/Api/Generated/Client.php | 12 +- .../Endpoint/CreateProductStockStatus.php | 6 +- .../Endpoint/PatchProductStockStatus.php | 6 +- .../Endpoint/PutProductStockStatus.php | 6 +- .../ProductStockStatusModelCollection.php | 6 +- .../Model/ProductStockStatusModelItem.php | 10 +- ...php => ProductStockStatusRequestModel.php} | 2 +- .../Model/ProductStockStatusResponseModel.php | 196 ++++++++++++++++++ ...oductStockStatusResponseModelLanguages.php | 34 +++ .../Normalizer/NormalizerFactory.php | 4 +- ...ctStockStatusModelCollectionNormalizer.php | 2 +- .../ProductStockStatusModelItemNormalizer.php | 2 +- ...ductStockStatusRequestModelNormalizer.php} | 8 +- ...StatusResponseModelLanguagesNormalizer.php | 52 +++++ ...ductStockStatusResponseModelNormalizer.php | 72 +++++++ 16 files changed, 444 insertions(+), 37 deletions(-) rename src/Api/Generated/Model/{ProductStockStatusModel.php => ProductStockStatusRequestModel.php} (99%) create mode 100644 src/Api/Generated/Model/ProductStockStatusResponseModel.php create mode 100644 src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php rename src/Api/Generated/Normalizer/{ProductStockStatusModelNormalizer.php => ProductStockStatusRequestModelNormalizer.php} (92%) create mode 100644 src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php create mode 100644 src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 25d0d225..48095b78 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -4242,7 +4242,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductStockStatusModel" + "$ref": "#\/components\/schemas\/ProductStockStatusRequestModel" } } } @@ -4321,7 +4321,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductStockStatusModel" + "$ref": "#\/components\/schemas\/ProductStockStatusRequestModel" } } } @@ -4358,7 +4358,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductStockStatusModel" + "$ref": "#\/components\/schemas\/ProductStockStatusRequestModel" } } } @@ -12730,7 +12730,58 @@ } } }, - "ProductStockStatusModel": { + "ProductStockStatusResponseModel": { + "type": "object", + "properties": { + "stockStatusId": { + "type": "integer", + "readOnly": true, + "description": "The stock status id", + "example": 101 + }, + "idCode": { + "type": "string", + "maxLength": 20, + "readOnly": true, + "description": "The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses", + "example": "inStock" + }, + "sortIndex": { + "type": "integer", + "description": "Sort index for this status" + }, + "stockoutNewStatusId": { + "type": "integer", + "nullable": true, + "example": null, + "description": "This has to be set to another, existing stock status id, or null. If a product has its quantity changed to negative, the product will then change stock status to the one with this id" + }, + "productBuyable": { + "type": "boolean", + "default": true, + "example": false, + "description": "Is the product buyable when this status is set?" + }, + "inStock": { + "type": "boolean", + "default": false, + "example": true, + "description": "Should the product be displayed as \"in stock\" when this status is set?" + }, + "languages": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/ProductStockStatusLanguageModel" + } + } + } + } + } + }, + "ProductStockStatusRequestModel": { "type": "object", "properties": { "stockStatusId": { @@ -12797,7 +12848,7 @@ "ProductStockStatusModelItem": { "properties": { "data": { - "$ref": "#\/components\/schemas\/ProductStockStatusModel" + "$ref": "#\/components\/schemas\/ProductStockStatusResponseModel" } } }, @@ -12807,7 +12858,7 @@ "type": "array", "description": "A list of product stock statuses", "items": { - "$ref": "#\/components\/schemas\/ProductStockStatusModel" + "$ref": "#\/components\/schemas\/ProductStockStatusResponseModel" } } } diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index f15dbab2..1ab3def8 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -1540,13 +1540,13 @@ public function listProductStockStatses(string $fetch = self::FETCH_OBJECT) /** * Create a product stock status. Retrieves the created `ProductStockStatus` object. * - * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductStockStatusBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductStockStatus(\Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductStockStatus(\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductStockStatus($requestBody), $fetch); } @@ -1580,14 +1580,14 @@ public function getProductStockStatus(int $stockStatusId, string $fetch = self:: * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductStockStatusBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductStockStatusNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductStockStatus($stockStatusId, $requestBody), $fetch); } @@ -1595,14 +1595,14 @@ public function patchProductStockStatus(int $stockStatusId, \Starweb\Api\Generat * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductStockStatusBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductStockStatusNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductStockStatus($stockStatusId, $requestBody), $fetch); } diff --git a/src/Api/Generated/Endpoint/CreateProductStockStatus.php b/src/Api/Generated/Endpoint/CreateProductStockStatus.php index d657c449..2278385b 100644 --- a/src/Api/Generated/Endpoint/CreateProductStockStatus.php +++ b/src/Api/Generated/Endpoint/CreateProductStockStatus.php @@ -7,9 +7,9 @@ class CreateProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint /** * Create a product stock status. Retrieves the created `ProductStockStatus` object. * - * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody) + public function __construct(\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody) { $this->body = $requestBody; } @@ -24,7 +24,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductStockStatusModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductStockStatusRequestModel) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Endpoint/PatchProductStockStatus.php b/src/Api/Generated/Endpoint/PatchProductStockStatus.php index b4d06bfe..62923c94 100644 --- a/src/Api/Generated/Endpoint/PatchProductStockStatus.php +++ b/src/Api/Generated/Endpoint/PatchProductStockStatus.php @@ -9,9 +9,9 @@ class PatchProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint i * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody */ - public function __construct(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody) + public function __construct(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody) { $this->stockStatusId = $stockStatusId; $this->body = $requestBody; @@ -27,7 +27,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductStockStatusModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductStockStatusRequestModel) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Endpoint/PutProductStockStatus.php b/src/Api/Generated/Endpoint/PutProductStockStatus.php index 381eeb13..7da9e447 100644 --- a/src/Api/Generated/Endpoint/PutProductStockStatus.php +++ b/src/Api/Generated/Endpoint/PutProductStockStatus.php @@ -9,9 +9,9 @@ class PutProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint imp * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody */ - public function __construct(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusModel $requestBody) + public function __construct(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody) { $this->stockStatusId = $stockStatusId; $this->body = $requestBody; @@ -27,7 +27,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductStockStatusModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductStockStatusRequestModel) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Model/ProductStockStatusModelCollection.php b/src/Api/Generated/Model/ProductStockStatusModelCollection.php index 0765e2c5..05ae3dc6 100644 --- a/src/Api/Generated/Model/ProductStockStatusModelCollection.php +++ b/src/Api/Generated/Model/ProductStockStatusModelCollection.php @@ -7,13 +7,13 @@ class ProductStockStatusModelCollection /** * A list of product stock statuses * - * @var ProductStockStatusModel[] + * @var ProductStockStatusResponseModel[] */ protected $data; /** * A list of product stock statuses * - * @return ProductStockStatusModel[] + * @return ProductStockStatusResponseModel[] */ public function getData() : array { @@ -22,7 +22,7 @@ public function getData() : array /** * A list of product stock statuses * - * @param ProductStockStatusModel[] $data + * @param ProductStockStatusResponseModel[] $data * * @return self */ diff --git a/src/Api/Generated/Model/ProductStockStatusModelItem.php b/src/Api/Generated/Model/ProductStockStatusModelItem.php index 7b9d32d4..432457b3 100644 --- a/src/Api/Generated/Model/ProductStockStatusModelItem.php +++ b/src/Api/Generated/Model/ProductStockStatusModelItem.php @@ -7,26 +7,26 @@ class ProductStockStatusModelItem /** * * - * @var ProductStockStatusModel + * @var ProductStockStatusResponseModel */ protected $data; /** * * - * @return ProductStockStatusModel + * @return ProductStockStatusResponseModel */ - public function getData() : ProductStockStatusModel + public function getData() : ProductStockStatusResponseModel { return $this->data; } /** * * - * @param ProductStockStatusModel $data + * @param ProductStockStatusResponseModel $data * * @return self */ - public function setData(ProductStockStatusModel $data) : self + public function setData(ProductStockStatusResponseModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusModel.php b/src/Api/Generated/Model/ProductStockStatusRequestModel.php similarity index 99% rename from src/Api/Generated/Model/ProductStockStatusModel.php rename to src/Api/Generated/Model/ProductStockStatusRequestModel.php index b66bcc36..86a09392 100644 --- a/src/Api/Generated/Model/ProductStockStatusModel.php +++ b/src/Api/Generated/Model/ProductStockStatusRequestModel.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusModel +class ProductStockStatusRequestModel { /** * The stock status id diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModel.php b/src/Api/Generated/Model/ProductStockStatusResponseModel.php new file mode 100644 index 00000000..22a252de --- /dev/null +++ b/src/Api/Generated/Model/ProductStockStatusResponseModel.php @@ -0,0 +1,196 @@ +stockStatusId; + } + /** + * The stock status id + * + * @param int $stockStatusId + * + * @return self + */ + public function setStockStatusId(int $stockStatusId) : self + { + $this->stockStatusId = $stockStatusId; + return $this; + } + /** + * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses + * + * @return string + */ + public function getIdCode() : string + { + return $this->idCode; + } + /** + * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses + * + * @param string $idCode + * + * @return self + */ + public function setIdCode(string $idCode) : self + { + $this->idCode = $idCode; + return $this; + } + /** + * Sort index for this status + * + * @return int + */ + public function getSortIndex() : int + { + return $this->sortIndex; + } + /** + * Sort index for this status + * + * @param int $sortIndex + * + * @return self + */ + public function setSortIndex(int $sortIndex) : self + { + $this->sortIndex = $sortIndex; + return $this; + } + /** + * This has to be set to another, existing stock status id, or null. If a product has its quantity changed to negative, the product will then change stock status to the one with this id + * + * @return int|null + */ + public function getStockoutNewStatusId() : ?int + { + return $this->stockoutNewStatusId; + } + /** + * This has to be set to another, existing stock status id, or null. If a product has its quantity changed to negative, the product will then change stock status to the one with this id + * + * @param int|null $stockoutNewStatusId + * + * @return self + */ + public function setStockoutNewStatusId(?int $stockoutNewStatusId) : self + { + $this->stockoutNewStatusId = $stockoutNewStatusId; + return $this; + } + /** + * Is the product buyable when this status is set? + * + * @return bool + */ + public function getProductBuyable() : bool + { + return $this->productBuyable; + } + /** + * Is the product buyable when this status is set? + * + * @param bool $productBuyable + * + * @return self + */ + public function setProductBuyable(bool $productBuyable) : self + { + $this->productBuyable = $productBuyable; + return $this; + } + /** + * Should the product be displayed as "in stock" when this status is set? + * + * @return bool + */ + public function getInStock() : bool + { + return $this->inStock; + } + /** + * Should the product be displayed as "in stock" when this status is set? + * + * @param bool $inStock + * + * @return self + */ + public function setInStock(bool $inStock) : self + { + $this->inStock = $inStock; + return $this; + } + /** + * + * + * @return ProductStockStatusResponseModelLanguages + */ + public function getLanguages() : ProductStockStatusResponseModelLanguages + { + return $this->languages; + } + /** + * + * + * @param ProductStockStatusResponseModelLanguages $languages + * + * @return self + */ + public function setLanguages(ProductStockStatusResponseModelLanguages $languages) : self + { + $this->languages = $languages; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php new file mode 100644 index 00000000..7babd1a0 --- /dev/null +++ b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php @@ -0,0 +1,34 @@ +data; + } + /** + * + * + * @param ProductStockStatusLanguageModel[] $data + * + * @return self + */ + public function setData(array $data) : self + { + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index c472ee81..24612b38 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -139,7 +139,9 @@ public static function create() $normalizers[] = new ProductMetaDataTypeModelUpdatableNormalizer(); $normalizers[] = new ProductMetaDataTypeLanguageModelCollectionNormalizer(); $normalizers[] = new ProductMetaDataTypeLanguageModelNormalizer(); - $normalizers[] = new ProductStockStatusModelNormalizer(); + $normalizers[] = new ProductStockStatusResponseModelNormalizer(); + $normalizers[] = new ProductStockStatusResponseModelLanguagesNormalizer(); + $normalizers[] = new ProductStockStatusRequestModelNormalizer(); $normalizers[] = new ProductStockStatusLanguageModelNormalizer(); $normalizers[] = new ProductStockStatusModelItemNormalizer(); $normalizers[] = new ProductStockStatusModelCollectionNormalizer(); diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php index 4e31082f..4865c5aa 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php @@ -31,7 +31,7 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data')) { $values = array(); foreach ($data->{'data'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel', 'json', $context); + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context); } $object->setData($values); } diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index 6aa63ec4..46eca444 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -29,7 +29,7 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelItem(); if (property_exists($data, 'data')) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel', 'json', $context)); + $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context)); } return $object; } diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php similarity index 92% rename from src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php rename to src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php index ccf00ab6..b112707d 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php @@ -10,24 +10,24 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ProductStockStatusModelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ProductStockStatusRequestModelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; public function supportsDenormalization($data, $type, $format = null) { - return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel'; + return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel'; } public function supportsNormalization($data, $format = null) { - return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { throw new InvalidArgumentException(); } - $object = new \Starweb\Api\Generated\Model\ProductStockStatusModel(); + $object = new \Starweb\Api\Generated\Model\ProductStockStatusRequestModel(); if (property_exists($data, 'stockStatusId')) { $object->setStockStatusId($data->{'stockStatusId'}); } diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php new file mode 100644 index 00000000..e9d6e5ec --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php @@ -0,0 +1,52 @@ +{'data'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel', 'json', $context); + } + $object->setData($values); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getData()) { + $values = array(); + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'data'} = $values; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php new file mode 100644 index 00000000..addf4ed6 --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php @@ -0,0 +1,72 @@ +setStockStatusId($data->{'stockStatusId'}); + } + if (property_exists($data, 'idCode')) { + $object->setIdCode($data->{'idCode'}); + } + if (property_exists($data, 'sortIndex')) { + $object->setSortIndex($data->{'sortIndex'}); + } + if (property_exists($data, 'stockoutNewStatusId')) { + $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); + } + if (property_exists($data, 'productBuyable')) { + $object->setProductBuyable($data->{'productBuyable'}); + } + if (property_exists($data, 'inStock')) { + $object->setInStock($data->{'inStock'}); + } + if (property_exists($data, 'languages')) { + $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages', 'json', $context)); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); + if (null !== $object->getProductBuyable()) { + $data->{'productBuyable'} = $object->getProductBuyable(); + } + if (null !== $object->getInStock()) { + $data->{'inStock'} = $object->getInStock(); + } + if (null !== $object->getLanguages()) { + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + return $data; + } +} \ No newline at end of file From 062ae44ef4112a7e4011470e492c5da0ea51b7d7 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 17 Feb 2020 07:57:14 +0100 Subject: [PATCH 52/87] fixes category models --- resources/specification/openapi.json | 12 ++++++++ .../Generated/Model/ProductCategoryModel.php | 30 +++++++++---------- .../Model/ProductCategoryModelUpdatable.php | 30 +++++++++---------- .../ProductCategoryModelNormalizer.php | 12 ++------ ...roductCategoryModelUpdatableNormalizer.php | 12 ++------ 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 48095b78..e877f91b 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11270,11 +11270,15 @@ "type": "string", "description": "The external Id for this category for the system named in externalType", "maxLength": 40, + "nullable": true, + "default": null, "example": "123" }, "externalType": { "type": "string", "deprecated": true, + "nullable": true, + "default": null, "description": "Deprecated: use `externalIdType` instead", "maxLength": 20, "example": "Fortnox" @@ -11283,6 +11287,8 @@ "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, + "nullable": true, + "default": null, "example": "Fortnox" }, "hasChildren": { @@ -11336,6 +11342,8 @@ "type": "string", "description": "The external Id for this category for the system named in externalType", "maxLength": 40, + "nullable": true, + "default": null, "example": "123" }, "externalType": { @@ -11343,12 +11351,16 @@ "deprecated": true, "description": "Deprecated: use `externalIdType` instead", "maxLength": 20, + "nullable": true, + "default": null, "example": "Fortnox" }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, + "nullable": true, + "default": null, "example": "Fortnox" }, "hasChildren": { diff --git a/src/Api/Generated/Model/ProductCategoryModel.php b/src/Api/Generated/Model/ProductCategoryModel.php index 8a5ab3a9..60daa918 100644 --- a/src/Api/Generated/Model/ProductCategoryModel.php +++ b/src/Api/Generated/Model/ProductCategoryModel.php @@ -43,7 +43,7 @@ class ProductCategoryModel /** * The external Id for this category for the system named in externalType * - * @var string + * @var string|null */ protected $externalId; /** @@ -51,13 +51,13 @@ class ProductCategoryModel * * @deprecated * - * @var string + * @var string|null */ protected $externalType; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -201,20 +201,20 @@ public function setImageFileId(?int $imageFileId) : self /** * The external Id for this category for the system named in externalType * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external Id for this category for the system named in externalType * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -224,22 +224,22 @@ public function setExternalId(string $externalId) : self * * @deprecated * - * @return string + * @return string|null */ - public function getExternalType() : string + public function getExternalType() : ?string { return $this->externalType; } /** * Deprecated: use `externalIdType` instead * - * @param string $externalType + * @param string|null $externalType * * @deprecated * * @return self */ - public function setExternalType(string $externalType) : self + public function setExternalType(?string $externalType) : self { $this->externalType = $externalType; return $this; @@ -247,20 +247,20 @@ public function setExternalType(string $externalType) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php index d593c0ec..5314d9ce 100644 --- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php +++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php @@ -43,7 +43,7 @@ class ProductCategoryModelUpdatable /** * The external Id for this category for the system named in externalType * - * @var string + * @var string|null */ protected $externalId; /** @@ -51,13 +51,13 @@ class ProductCategoryModelUpdatable * * @deprecated * - * @var string + * @var string|null */ protected $externalType; /** * The system name the externalId belongs to. * - * @var string + * @var string|null */ protected $externalIdType; /** @@ -201,20 +201,20 @@ public function setImageFileId(?int $imageFileId) : self /** * The external Id for this category for the system named in externalType * - * @return string + * @return string|null */ - public function getExternalId() : string + public function getExternalId() : ?string { return $this->externalId; } /** * The external Id for this category for the system named in externalType * - * @param string $externalId + * @param string|null $externalId * * @return self */ - public function setExternalId(string $externalId) : self + public function setExternalId(?string $externalId) : self { $this->externalId = $externalId; return $this; @@ -224,22 +224,22 @@ public function setExternalId(string $externalId) : self * * @deprecated * - * @return string + * @return string|null */ - public function getExternalType() : string + public function getExternalType() : ?string { return $this->externalType; } /** * Deprecated: use `externalIdType` instead * - * @param string $externalType + * @param string|null $externalType * * @deprecated * * @return self */ - public function setExternalType(string $externalType) : self + public function setExternalType(?string $externalType) : self { $this->externalType = $externalType; return $this; @@ -247,20 +247,20 @@ public function setExternalType(string $externalType) : self /** * The system name the externalId belongs to. * - * @return string + * @return string|null */ - public function getExternalIdType() : string + public function getExternalIdType() : ?string { return $this->externalIdType; } /** * The system name the externalId belongs to. * - * @param string $externalIdType + * @param string|null $externalIdType * * @return self */ - public function setExternalIdType(string $externalIdType) : self + public function setExternalIdType(?string $externalIdType) : self { $this->externalIdType = $externalIdType; return $this; diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 9d954fbc..691b3073 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -77,15 +77,9 @@ public function normalize($object, $format = null, array $context = array()) $data->{'openPage'} = $object->getOpenPage(); } $data->{'imageFileId'} = $object->getImageFileId(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalType()) { - $data->{'externalType'} = $object->getExternalType(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalType'} = $object->getExternalType(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index ec087caa..a902c4b9 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -81,15 +81,9 @@ public function normalize($object, $format = null, array $context = array()) $data->{'openPage'} = $object->getOpenPage(); } $data->{'imageFileId'} = $object->getImageFileId(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - if (null !== $object->getExternalType()) { - $data->{'externalType'} = $object->getExternalType(); - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalType'} = $object->getExternalType(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { From 1c3e619b87b657cd16a06e6e02e831ec8e9b895a Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 17 Feb 2020 08:15:03 +0100 Subject: [PATCH 53/87] fixes nullable fields in product category language object --- resources/specification/openapi.json | 5 ++ .../Model/ProductCategoryLanguagesModel.php | 50 +++++++++---------- ...roductCategoryLanguagesModelNormalizer.php | 20 ++------ 3 files changed, 35 insertions(+), 40 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index e877f91b..7d9fccca 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11396,30 +11396,35 @@ "pageTitle": { "type": "string", "maxLength": 90, + "nullable": true, "description": "The page title for this product category", "example": "My category - find products here!" }, "description": { "type": "string", "maxLength": 65535, + "nullable": true, "description": "The main\/top description of this product category", "example": "Lorem ipsum..." }, "bottomDescription": { "type": "string", "maxLength": 65535, + "nullable": true, "description": "The extra\/bottom description of this product category", "example": "Lorem ipsum..." }, "pageMetaDescription": { "type": "string", "maxLength": 278, + "nullable": true, "description": "The page meta data description of this product category", "example": "Lorem ipsum..." }, "permalink": { "type": "string", "maxLength": 128, + "nullable": true, "description": "The permalink to this product category. Will auto generate if left out", "example": "my-category" } diff --git a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php index ed52babe..ef7dc230 100644 --- a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php +++ b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php @@ -19,31 +19,31 @@ class ProductCategoryLanguagesModel /** * The page title for this product category * - * @var string + * @var string|null */ protected $pageTitle; /** * The main/top description of this product category * - * @var string + * @var string|null */ protected $description; /** * The extra/bottom description of this product category * - * @var string + * @var string|null */ protected $bottomDescription; /** * The page meta data description of this product category * - * @var string + * @var string|null */ protected $pageMetaDescription; /** * The permalink to this product category. Will auto generate if left out * - * @var string + * @var string|null */ protected $permalink; /** @@ -91,20 +91,20 @@ public function setName(string $name) : self /** * The page title for this product category * - * @return string + * @return string|null */ - public function getPageTitle() : string + public function getPageTitle() : ?string { return $this->pageTitle; } /** * The page title for this product category * - * @param string $pageTitle + * @param string|null $pageTitle * * @return self */ - public function setPageTitle(string $pageTitle) : self + public function setPageTitle(?string $pageTitle) : self { $this->pageTitle = $pageTitle; return $this; @@ -112,20 +112,20 @@ public function setPageTitle(string $pageTitle) : self /** * The main/top description of this product category * - * @return string + * @return string|null */ - public function getDescription() : string + public function getDescription() : ?string { return $this->description; } /** * The main/top description of this product category * - * @param string $description + * @param string|null $description * * @return self */ - public function setDescription(string $description) : self + public function setDescription(?string $description) : self { $this->description = $description; return $this; @@ -133,20 +133,20 @@ public function setDescription(string $description) : self /** * The extra/bottom description of this product category * - * @return string + * @return string|null */ - public function getBottomDescription() : string + public function getBottomDescription() : ?string { return $this->bottomDescription; } /** * The extra/bottom description of this product category * - * @param string $bottomDescription + * @param string|null $bottomDescription * * @return self */ - public function setBottomDescription(string $bottomDescription) : self + public function setBottomDescription(?string $bottomDescription) : self { $this->bottomDescription = $bottomDescription; return $this; @@ -154,20 +154,20 @@ public function setBottomDescription(string $bottomDescription) : self /** * The page meta data description of this product category * - * @return string + * @return string|null */ - public function getPageMetaDescription() : string + public function getPageMetaDescription() : ?string { return $this->pageMetaDescription; } /** * The page meta data description of this product category * - * @param string $pageMetaDescription + * @param string|null $pageMetaDescription * * @return self */ - public function setPageMetaDescription(string $pageMetaDescription) : self + public function setPageMetaDescription(?string $pageMetaDescription) : self { $this->pageMetaDescription = $pageMetaDescription; return $this; @@ -175,20 +175,20 @@ public function setPageMetaDescription(string $pageMetaDescription) : self /** * The permalink to this product category. Will auto generate if left out * - * @return string + * @return string|null */ - public function getPermalink() : string + public function getPermalink() : ?string { return $this->permalink; } /** * The permalink to this product category. Will auto generate if left out * - * @param string $permalink + * @param string|null $permalink * * @return self */ - public function setPermalink(string $permalink) : self + public function setPermalink(?string $permalink) : self { $this->permalink = $permalink; return $this; diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php index 206cde97..572bb44b 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php @@ -60,21 +60,11 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - if (null !== $object->getPageTitle()) { - $data->{'pageTitle'} = $object->getPageTitle(); - } - if (null !== $object->getDescription()) { - $data->{'description'} = $object->getDescription(); - } - if (null !== $object->getBottomDescription()) { - $data->{'bottomDescription'} = $object->getBottomDescription(); - } - if (null !== $object->getPageMetaDescription()) { - $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); - } - if (null !== $object->getPermalink()) { - $data->{'permalink'} = $object->getPermalink(); - } + $data->{'pageTitle'} = $object->getPageTitle(); + $data->{'description'} = $object->getDescription(); + $data->{'bottomDescription'} = $object->getBottomDescription(); + $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); + $data->{'permalink'} = $object->getPermalink(); return $data; } } \ No newline at end of file From 769ae70a380e2f18b27a6148f04f6dace12433a9 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 24 Feb 2020 17:08:26 +0100 Subject: [PATCH 54/87] fixe product variant models and endpoints --- resources/specification/openapi.json | 313 +++++++++++++++-- src/Api/Generated/Client.php | 16 +- .../Endpoint/CreateProductVariant.php | 6 +- .../Generated/Endpoint/GetProductsVariant.php | 2 +- .../Endpoint/ListProductsVariants.php | 2 +- .../Endpoint/PatchProductsVariant.php | 6 +- .../Generated/Endpoint/PutProductsVariant.php | 6 +- .../Generated/Model/ProductModelUpdatable.php | 6 +- .../Model/ProductVariantModelCollection.php | 6 +- .../Model/ProductVariantModelItem.php | 10 +- .../Model/ProductVariantPatchRequestModel.php | 331 ++++++++++++++++++ .../Model/ProductVariantPutRequestModel.php | 331 ++++++++++++++++++ .../Model/ProductVariantRequestModel.php | 331 ++++++++++++++++++ ...el.php => ProductVariantResponseModel.php} | 166 +++------ .../Normalizer/NormalizerFactory.php | 5 +- .../ProductModelUpdatableNormalizer.php | 2 +- ...roductVariantModelCollectionNormalizer.php | 2 +- .../ProductVariantModelItemNormalizer.php | 2 +- ...ductVariantPatchRequestModelNormalizer.php | 114 ++++++ ...roductVariantPutRequestModelNormalizer.php | 114 ++++++ .../ProductVariantRequestModelNormalizer.php | 111 ++++++ ...ProductVariantResponseModelNormalizer.php} | 41 +-- 22 files changed, 1723 insertions(+), 200 deletions(-) create mode 100644 src/Api/Generated/Model/ProductVariantPatchRequestModel.php create mode 100644 src/Api/Generated/Model/ProductVariantPutRequestModel.php create mode 100644 src/Api/Generated/Model/ProductVariantRequestModel.php rename src/Api/Generated/Model/{ProductVariantModel.php => ProductVariantResponseModel.php} (80%) create mode 100644 src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php create mode 100644 src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php create mode 100644 src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php rename src/Api/Generated/Normalizer/{ProductVariantModelNormalizer.php => ProductVariantResponseModelNormalizer.php} (84%) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 7d9fccca..326eccbb 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -5403,7 +5403,7 @@ "in": "query", "style": "form", "explode": false, - "description": "If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues", + "description": "If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues, attributeValues.attribute", "examples": { "prices": { "value": "prices", @@ -5467,7 +5467,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductVariantModel" + "$ref": "#\/components\/schemas\/ProductVariantRequestModel" } } } @@ -5518,7 +5518,7 @@ "in": "query", "style": "form", "explode": false, - "description": "If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues", + "description": "If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues, attributeValues.attribute", "examples": { "prices": { "value": "prices", @@ -5586,7 +5586,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductVariantModel" + "$ref": "#\/components\/schemas\/ProductVariantPutRequestModel" } } } @@ -5623,7 +5623,7 @@ "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/ProductVariantModel" + "$ref": "#\/components\/schemas\/ProductVariantPatchRequestModel" } } } @@ -11720,7 +11720,7 @@ "type": "array", "description": "A collection of variants", "items": { - "$ref": "#\/components\/schemas\/ProductVariantModel" + "$ref": "#\/components\/schemas\/ProductVariantPutRequestModel" } }, "bundledProducts": { @@ -11943,7 +11943,7 @@ "ProductVariantModelItem": { "properties": { "data": { - "$ref": "#\/components\/schemas\/ProductVariantModel" + "$ref": "#\/components\/schemas\/ProductVariantResponseModel" } } }, @@ -11953,48 +11953,204 @@ "type": "array", "description": "A collection of product variants", "items": { - "$ref": "#\/components\/schemas\/ProductVariantModel" + "$ref": "#\/components\/schemas\/ProductVariantResponseModel" } } } }, - "ProductVariantModel": { + "ProductVariantRequestModel": { "type": "object", "properties": { - "variantId": { + "sku": { + "type": "string", + "maxLength": 40, + "description": "The product variants SKU (stock keeping unit)" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is this variant active? Only active variants are visible to customers", + "nullable": true + }, + "sortIndex": { "type": "integer", - "readOnly": true, - "example": 101 + "description": "The sort index of this variant.", + "nullable": true + }, + "stockStatusId": { + "type": "integer", + "nullable": true, + "description": "The ID of the variants stock status. Available stock statuses can be fetched using the \/product-stock-statuses endpoint" + }, + "stockQuantity": { + "type": "integer", + "nullable": true, + "maximum": 100000000, + "minimum": -100000000, + "description": "The current stock quantity for this variant" + }, + "weightInKg": { + "type": "number", + "format": "float", + "nullable": true, + "minimum": 0, + "description": "The variants weight in KG", + "example": 0.15 + }, + "costPrice": { + "type": "string", + "minimum": 0, + "nullable": true, + "description": "The cost for this variant. Used for statistic and never displayed to customers" + }, + "ean": { + "type": "string", + "maxLength": 20, + "description": "European article no", + "nullable": true + }, + "mpn": { + "type": "string", + "maxLength": 40, + "description": "Manufacturer part no", + "nullable": true + }, + "imageFileId": { + "type": "integer", + "nullable": true, + "description": "The ID of this variant main image. Available media files can be fetched using the \/media-files endpoint" + }, + "attributeValueLinks": { + "type": "array", + "description": "An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product\u00b4s hasSeveralVariants field is set to true.", + "items": { + "type": "integer", + "minimum": 1, + "description": "The ID of the attribute value" + } }, + "volumePricingInheritancePricelistIds": { + "type": "array", + "description": "An array of pricelists IDs that will use inheritance", + "items": { + "type": "integer", + "minimum": 1, + "description": "The ID of the attribute value" + }, + "nullable": true + } + }, + "required": [ + "sku", + "attributeValueLinks" + ] + }, + "ProductVariantPutRequestModel": { + "type": "object", + "properties": { "sku": { "type": "string", "maxLength": 40, "description": "The product variants SKU (stock keeping unit)" }, - "externalId": { + "isActive": { + "type": "boolean", + "default": true, + "description": "Is this variant active? Only active variants are visible to customers", + "nullable": true + }, + "sortIndex": { + "type": "integer", + "description": "The sort index of this variant.", + "nullable": true + }, + "stockStatusId": { + "type": "integer", + "nullable": true, + "description": "The ID of the variants stock status. Available stock statuses can be fetched using the \/product-stock-statuses endpoint" + }, + "stockQuantity": { + "type": "integer", + "nullable": true, + "maximum": 100000000, + "minimum": -100000000, + "description": "The current stock quantity for this variant" + }, + "weightInKg": { + "type": "number", + "format": "float", + "nullable": true, + "minimum": 0, + "description": "The variants weight in KG", + "example": 0.15 + }, + "costPrice": { "type": "string", - "description": "The external id of this variant", - "example": "101", - "maxLength": 255, + "minimum": 0, "nullable": true, - "default": null + "description": "The cost for this variant. Used for statistic and never displayed to customers" }, - "externalIdType": { + "ean": { "type": "string", - "description": "The external id type of this variant", - "example": "101", - "maxLength": 255, + "maxLength": 20, + "description": "European article no", + "nullable": true + }, + "mpn": { + "type": "string", + "maxLength": 40, + "description": "Manufacturer part no", + "nullable": true + }, + "imageFileId": { + "type": "integer", "nullable": true, - "default": null + "description": "The ID of this variant main image. Available media files can be fetched using the \/media-files endpoint" + }, + "attributeValueLinks": { + "type": "array", + "description": "An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product\u00b4s hasSeveralVariants field is set to true.", + "items": { + "type": "integer", + "minimum": 1, + "description": "The ID of the attribute value" + }, + "nullable": true + }, + "volumePricingInheritancePricelistIds": { + "type": "array", + "description": "An array of pricelists IDs that will use inheritance", + "items": { + "type": "integer", + "minimum": 1, + "description": "The ID of the attribute value" + }, + "nullable": true + } + }, + "required": [ + "sku", + "attributeValueLinks" + ] + }, + "ProductVariantPatchRequestModel": { + "type": "object", + "properties": { + "sku": { + "type": "string", + "maxLength": 40, + "description": "The product variants SKU (stock keeping unit)" }, "isActive": { "type": "boolean", "default": true, - "description": "Is this variant active? Only active variants are visible to customers" + "description": "Is this variant active? Only active variants are visible to customers", + "nullable": true }, "sortIndex": { "type": "integer", - "description": "The sort index of this variant." + "description": "The sort index of this variant.", + "nullable": true }, "stockStatusId": { "type": "integer", @@ -12025,12 +12181,14 @@ "ean": { "type": "string", "maxLength": 20, - "description": "European article no" + "description": "European article no", + "nullable": true }, "mpn": { "type": "string", "maxLength": 40, - "description": "Manufacturer part no" + "description": "Manufacturer part no", + "nullable": true }, "imageFileId": { "type": "integer", @@ -12039,22 +12197,115 @@ }, "attributeValueLinks": { "type": "array", - "description": "An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product\u00b4s hasSeveralVariants field is set to true", + "description": "An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product\u00b4s hasSeveralVariants field is set to true.", "items": { "type": "integer", "minimum": 1, "description": "The ID of the attribute value" - } + }, + "nullable": true }, "volumePricingInheritancePricelistIds": { "type": "array", "description": "An array of pricelists IDs that will use inheritance", + "items": { + "type": "integer", + "minimum": 1, + "description": "The ID of the attribute value" + }, + "nullable": true + } + } + }, + "ProductVariantResponseModel": { + "type": "object", + "properties": { + "sku": { + "type": "string", + "maxLength": 40, + "description": "The product variants SKU (stock keeping unit)" + }, + "isActive": { + "type": "boolean", + "default": true, + "description": "Is this variant active? Only active variants are visible to customers", + "nullable": true + }, + "sortIndex": { + "type": "integer", + "description": "The sort index of this variant.", + "nullable": true + }, + "stockStatusId": { + "type": "integer", + "nullable": true, + "description": "The ID of the variants stock status. Available stock statuses can be fetched using the \/product-stock-statuses endpoint" + }, + "stockQuantity": { + "type": "integer", + "nullable": true, + "maximum": 100000000, + "minimum": -100000000, + "description": "The current stock quantity for this variant" + }, + "weightInKg": { + "type": "number", + "format": "float", + "nullable": true, + "minimum": 0, + "description": "The variants weight in KG", + "example": 0.15 + }, + "costPrice": { + "type": "string", + "minimum": 0, + "nullable": true, + "description": "The cost for this variant. Used for statistic and never displayed to customers" + }, + "ean": { + "type": "string", + "maxLength": 20, + "description": "European article no", + "nullable": true + }, + "mpn": { + "type": "string", + "maxLength": 40, + "description": "Manufacturer part no", + "nullable": true + }, + "imageFileId": { + "type": "integer", + "nullable": true, + "description": "The ID of this variant main image. Available media files can be fetched using the \/media-files endpoint" + }, + "attributeValueLinks": { + "type": "array", + "description": "An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product\u00b4s hasSeveralVariants field is set to true.", "items": { "type": "integer", "minimum": 1, "description": "The ID of the attribute value" } }, + "volumePricingInheritancePricelistIds": { + "type": "array", + "description": "An array of pricelists IDs that will use inheritance", + "items": { + "type": "integer", + "minimum": 1, + "description": "The ID of the attribute value" + }, + "nullable": true + }, + "variantId": { + "type": "integer", + "readOnly": true, + "description": "The variant id", + "minimum": 1, + "format": "int32", + "example": 1 + }, "prices": { "type": "array", "description": "A collection of product variant prices", @@ -12069,7 +12320,11 @@ "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModel" } } - } + }, + "required": [ + "sku", + "attributeValueLinks" + ] }, "ProductMediaFileLinkModelItem": { "properties": { diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 1ab3def8..5c37bfcc 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -1968,7 +1968,7 @@ public function putProductsBundledProduct(int $productId, int $bundledProductId, * @param int $productId The products id * @param array $queryParameters { * @var int $page The page of product variants to return - * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues + * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues, attributeValues.attribute * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\ListProductsVariantsBadRequestException @@ -1983,13 +1983,13 @@ public function listProductsVariants(int $productId, array $queryParameters = ar * Creates a product variant. Retrieves the created `ProductVariant` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductVariantBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductVariant(int $productId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductVariant(int $productId, \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariant($productId, $requestBody), $fetch); } @@ -2013,7 +2013,7 @@ public function deleteProductsVariant(int $productId, int $variantId, string $fe * @param int $productId The product id * @param int $variantId The products variants id * @param array $queryParameters { - * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues + * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues, attributeValues.attribute * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\GetProductsVariantNotFoundException @@ -2029,14 +2029,14 @@ public function getProductsVariant(int $productId, int $variantId, array $queryP * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariant($productId, $variantId, $requestBody), $fetch); } @@ -2045,14 +2045,14 @@ public function patchProductsVariant(int $productId, int $variantId, \Starweb\Ap * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVariantBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsVariantNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariant($productId, $variantId, $requestBody), $fetch); } diff --git a/src/Api/Generated/Endpoint/CreateProductVariant.php b/src/Api/Generated/Endpoint/CreateProductVariant.php index 1d081e3b..f844fb9b 100644 --- a/src/Api/Generated/Endpoint/CreateProductVariant.php +++ b/src/Api/Generated/Endpoint/CreateProductVariant.php @@ -9,9 +9,9 @@ class CreateProductVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * Creates a product variant. Retrieves the created `ProductVariant` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody) + public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody) { $this->productId = $productId; $this->body = $requestBody; @@ -27,7 +27,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantRequestModel) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Endpoint/GetProductsVariant.php b/src/Api/Generated/Endpoint/GetProductsVariant.php index 1dbdc33e..3e53fcad 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariant.php +++ b/src/Api/Generated/Endpoint/GetProductsVariant.php @@ -12,7 +12,7 @@ class GetProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem * @param int $productId The product id * @param int $variantId The products variants id * @param array $queryParameters { - * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues + * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues, attributeValues.attribute * } */ public function __construct(int $productId, int $variantId, array $queryParameters = array()) diff --git a/src/Api/Generated/Endpoint/ListProductsVariants.php b/src/Api/Generated/Endpoint/ListProductsVariants.php index 500693a3..38baa991 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariants.php +++ b/src/Api/Generated/Endpoint/ListProductsVariants.php @@ -11,7 +11,7 @@ class ListProductsVariants extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * @param int $productId The products id * @param array $queryParameters { * @var int $page The page of product variants to return - * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues + * @var string $include If you want to include child data in the result. Example: ?include=prices (to include variants prices). Available includes: prices, attributeValues, attributeValues.attribute * } */ public function __construct(int $productId, array $queryParameters = array()) diff --git a/src/Api/Generated/Endpoint/PatchProductsVariant.php b/src/Api/Generated/Endpoint/PatchProductsVariant.php index a74c45c6..ccbc35fa 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariant.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariant.php @@ -11,9 +11,9 @@ class PatchProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody */ - public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody) + public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody) { $this->productId = $productId; $this->variantId = $variantId; @@ -30,7 +30,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Endpoint/PutProductsVariant.php b/src/Api/Generated/Endpoint/PutProductsVariant.php index 71154bd6..ff109238 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariant.php +++ b/src/Api/Generated/Endpoint/PutProductsVariant.php @@ -11,9 +11,9 @@ class PutProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantModel $requestBody + * @param \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody */ - public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantModel $requestBody) + public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody) { $this->productId = $productId; $this->variantId = $variantId; @@ -30,7 +30,7 @@ public function getUri() : string } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { - if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantModel) { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantPutRequestModel) { return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); } return array(array(), null); diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index 41b8c3f2..b96f2b23 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -109,7 +109,7 @@ class ProductModelUpdatable /** * A collection of variants * - * @var ProductVariantModel[] + * @var ProductVariantPutRequestModel[] */ protected $variants; /** @@ -508,7 +508,7 @@ public function setModifiedAt(string $modifiedAt) : self /** * A collection of variants * - * @return ProductVariantModel[] + * @return ProductVariantPutRequestModel[] */ public function getVariants() : array { @@ -517,7 +517,7 @@ public function getVariants() : array /** * A collection of variants * - * @param ProductVariantModel[] $variants + * @param ProductVariantPutRequestModel[] $variants * * @return self */ diff --git a/src/Api/Generated/Model/ProductVariantModelCollection.php b/src/Api/Generated/Model/ProductVariantModelCollection.php index 48ff160c..59cec00c 100644 --- a/src/Api/Generated/Model/ProductVariantModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantModelCollection.php @@ -7,13 +7,13 @@ class ProductVariantModelCollection /** * A collection of product variants * - * @var ProductVariantModel[] + * @var ProductVariantResponseModel[] */ protected $data; /** * A collection of product variants * - * @return ProductVariantModel[] + * @return ProductVariantResponseModel[] */ public function getData() : array { @@ -22,7 +22,7 @@ public function getData() : array /** * A collection of product variants * - * @param ProductVariantModel[] $data + * @param ProductVariantResponseModel[] $data * * @return self */ diff --git a/src/Api/Generated/Model/ProductVariantModelItem.php b/src/Api/Generated/Model/ProductVariantModelItem.php index a952f978..80d895be 100644 --- a/src/Api/Generated/Model/ProductVariantModelItem.php +++ b/src/Api/Generated/Model/ProductVariantModelItem.php @@ -7,26 +7,26 @@ class ProductVariantModelItem /** * * - * @var ProductVariantModel + * @var ProductVariantResponseModel */ protected $data; /** * * - * @return ProductVariantModel + * @return ProductVariantResponseModel */ - public function getData() : ProductVariantModel + public function getData() : ProductVariantResponseModel { return $this->data; } /** * * - * @param ProductVariantModel $data + * @param ProductVariantResponseModel $data * * @return self */ - public function setData(ProductVariantModel $data) : self + public function setData(ProductVariantResponseModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php new file mode 100644 index 00000000..76bdff20 --- /dev/null +++ b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php @@ -0,0 +1,331 @@ +sku; + } + /** + * The product variants SKU (stock keeping unit) + * + * @param string $sku + * + * @return self + */ + public function setSku(string $sku) : self + { + $this->sku = $sku; + return $this; + } + /** + * Is this variant active? Only active variants are visible to customers + * + * @return bool|null + */ + public function getIsActive() : ?bool + { + return $this->isActive; + } + /** + * Is this variant active? Only active variants are visible to customers + * + * @param bool|null $isActive + * + * @return self + */ + public function setIsActive(?bool $isActive) : self + { + $this->isActive = $isActive; + return $this; + } + /** + * The sort index of this variant. + * + * @return int|null + */ + public function getSortIndex() : ?int + { + return $this->sortIndex; + } + /** + * The sort index of this variant. + * + * @param int|null $sortIndex + * + * @return self + */ + public function setSortIndex(?int $sortIndex) : self + { + $this->sortIndex = $sortIndex; + return $this; + } + /** + * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint + * + * @return int|null + */ + public function getStockStatusId() : ?int + { + return $this->stockStatusId; + } + /** + * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint + * + * @param int|null $stockStatusId + * + * @return self + */ + public function setStockStatusId(?int $stockStatusId) : self + { + $this->stockStatusId = $stockStatusId; + return $this; + } + /** + * The current stock quantity for this variant + * + * @return int|null + */ + public function getStockQuantity() : ?int + { + return $this->stockQuantity; + } + /** + * The current stock quantity for this variant + * + * @param int|null $stockQuantity + * + * @return self + */ + public function setStockQuantity(?int $stockQuantity) : self + { + $this->stockQuantity = $stockQuantity; + return $this; + } + /** + * The variants weight in KG + * + * @return float|null + */ + public function getWeightInKg() : ?float + { + return $this->weightInKg; + } + /** + * The variants weight in KG + * + * @param float|null $weightInKg + * + * @return self + */ + public function setWeightInKg(?float $weightInKg) : self + { + $this->weightInKg = $weightInKg; + return $this; + } + /** + * The cost for this variant. Used for statistic and never displayed to customers + * + * @return string|null + */ + public function getCostPrice() : ?string + { + return $this->costPrice; + } + /** + * The cost for this variant. Used for statistic and never displayed to customers + * + * @param string|null $costPrice + * + * @return self + */ + public function setCostPrice(?string $costPrice) : self + { + $this->costPrice = $costPrice; + return $this; + } + /** + * European article no + * + * @return string|null + */ + public function getEan() : ?string + { + return $this->ean; + } + /** + * European article no + * + * @param string|null $ean + * + * @return self + */ + public function setEan(?string $ean) : self + { + $this->ean = $ean; + return $this; + } + /** + * Manufacturer part no + * + * @return string|null + */ + public function getMpn() : ?string + { + return $this->mpn; + } + /** + * Manufacturer part no + * + * @param string|null $mpn + * + * @return self + */ + public function setMpn(?string $mpn) : self + { + $this->mpn = $mpn; + return $this; + } + /** + * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint + * + * @return int|null + */ + public function getImageFileId() : ?int + { + return $this->imageFileId; + } + /** + * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint + * + * @param int|null $imageFileId + * + * @return self + */ + public function setImageFileId(?int $imageFileId) : self + { + $this->imageFileId = $imageFileId; + return $this; + } + /** + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. + * + * @return int[]|null + */ + public function getAttributeValueLinks() : ?array + { + return $this->attributeValueLinks; + } + /** + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. + * + * @param int[]|null $attributeValueLinks + * + * @return self + */ + public function setAttributeValueLinks(?array $attributeValueLinks) : self + { + $this->attributeValueLinks = $attributeValueLinks; + return $this; + } + /** + * An array of pricelists IDs that will use inheritance + * + * @return int[]|null + */ + public function getVolumePricingInheritancePricelistIds() : ?array + { + return $this->volumePricingInheritancePricelistIds; + } + /** + * An array of pricelists IDs that will use inheritance + * + * @param int[]|null $volumePricingInheritancePricelistIds + * + * @return self + */ + public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self + { + $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/ProductVariantPutRequestModel.php b/src/Api/Generated/Model/ProductVariantPutRequestModel.php new file mode 100644 index 00000000..ab7fa155 --- /dev/null +++ b/src/Api/Generated/Model/ProductVariantPutRequestModel.php @@ -0,0 +1,331 @@ +sku; + } + /** + * The product variants SKU (stock keeping unit) + * + * @param string $sku + * + * @return self + */ + public function setSku(string $sku) : self + { + $this->sku = $sku; + return $this; + } + /** + * Is this variant active? Only active variants are visible to customers + * + * @return bool|null + */ + public function getIsActive() : ?bool + { + return $this->isActive; + } + /** + * Is this variant active? Only active variants are visible to customers + * + * @param bool|null $isActive + * + * @return self + */ + public function setIsActive(?bool $isActive) : self + { + $this->isActive = $isActive; + return $this; + } + /** + * The sort index of this variant. + * + * @return int|null + */ + public function getSortIndex() : ?int + { + return $this->sortIndex; + } + /** + * The sort index of this variant. + * + * @param int|null $sortIndex + * + * @return self + */ + public function setSortIndex(?int $sortIndex) : self + { + $this->sortIndex = $sortIndex; + return $this; + } + /** + * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint + * + * @return int|null + */ + public function getStockStatusId() : ?int + { + return $this->stockStatusId; + } + /** + * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint + * + * @param int|null $stockStatusId + * + * @return self + */ + public function setStockStatusId(?int $stockStatusId) : self + { + $this->stockStatusId = $stockStatusId; + return $this; + } + /** + * The current stock quantity for this variant + * + * @return int|null + */ + public function getStockQuantity() : ?int + { + return $this->stockQuantity; + } + /** + * The current stock quantity for this variant + * + * @param int|null $stockQuantity + * + * @return self + */ + public function setStockQuantity(?int $stockQuantity) : self + { + $this->stockQuantity = $stockQuantity; + return $this; + } + /** + * The variants weight in KG + * + * @return float|null + */ + public function getWeightInKg() : ?float + { + return $this->weightInKg; + } + /** + * The variants weight in KG + * + * @param float|null $weightInKg + * + * @return self + */ + public function setWeightInKg(?float $weightInKg) : self + { + $this->weightInKg = $weightInKg; + return $this; + } + /** + * The cost for this variant. Used for statistic and never displayed to customers + * + * @return string|null + */ + public function getCostPrice() : ?string + { + return $this->costPrice; + } + /** + * The cost for this variant. Used for statistic and never displayed to customers + * + * @param string|null $costPrice + * + * @return self + */ + public function setCostPrice(?string $costPrice) : self + { + $this->costPrice = $costPrice; + return $this; + } + /** + * European article no + * + * @return string|null + */ + public function getEan() : ?string + { + return $this->ean; + } + /** + * European article no + * + * @param string|null $ean + * + * @return self + */ + public function setEan(?string $ean) : self + { + $this->ean = $ean; + return $this; + } + /** + * Manufacturer part no + * + * @return string|null + */ + public function getMpn() : ?string + { + return $this->mpn; + } + /** + * Manufacturer part no + * + * @param string|null $mpn + * + * @return self + */ + public function setMpn(?string $mpn) : self + { + $this->mpn = $mpn; + return $this; + } + /** + * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint + * + * @return int|null + */ + public function getImageFileId() : ?int + { + return $this->imageFileId; + } + /** + * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint + * + * @param int|null $imageFileId + * + * @return self + */ + public function setImageFileId(?int $imageFileId) : self + { + $this->imageFileId = $imageFileId; + return $this; + } + /** + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. + * + * @return int[]|null + */ + public function getAttributeValueLinks() : ?array + { + return $this->attributeValueLinks; + } + /** + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. + * + * @param int[]|null $attributeValueLinks + * + * @return self + */ + public function setAttributeValueLinks(?array $attributeValueLinks) : self + { + $this->attributeValueLinks = $attributeValueLinks; + return $this; + } + /** + * An array of pricelists IDs that will use inheritance + * + * @return int[]|null + */ + public function getVolumePricingInheritancePricelistIds() : ?array + { + return $this->volumePricingInheritancePricelistIds; + } + /** + * An array of pricelists IDs that will use inheritance + * + * @param int[]|null $volumePricingInheritancePricelistIds + * + * @return self + */ + public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self + { + $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/ProductVariantRequestModel.php b/src/Api/Generated/Model/ProductVariantRequestModel.php new file mode 100644 index 00000000..00ac877b --- /dev/null +++ b/src/Api/Generated/Model/ProductVariantRequestModel.php @@ -0,0 +1,331 @@ +sku; + } + /** + * The product variants SKU (stock keeping unit) + * + * @param string $sku + * + * @return self + */ + public function setSku(string $sku) : self + { + $this->sku = $sku; + return $this; + } + /** + * Is this variant active? Only active variants are visible to customers + * + * @return bool|null + */ + public function getIsActive() : ?bool + { + return $this->isActive; + } + /** + * Is this variant active? Only active variants are visible to customers + * + * @param bool|null $isActive + * + * @return self + */ + public function setIsActive(?bool $isActive) : self + { + $this->isActive = $isActive; + return $this; + } + /** + * The sort index of this variant. + * + * @return int|null + */ + public function getSortIndex() : ?int + { + return $this->sortIndex; + } + /** + * The sort index of this variant. + * + * @param int|null $sortIndex + * + * @return self + */ + public function setSortIndex(?int $sortIndex) : self + { + $this->sortIndex = $sortIndex; + return $this; + } + /** + * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint + * + * @return int|null + */ + public function getStockStatusId() : ?int + { + return $this->stockStatusId; + } + /** + * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint + * + * @param int|null $stockStatusId + * + * @return self + */ + public function setStockStatusId(?int $stockStatusId) : self + { + $this->stockStatusId = $stockStatusId; + return $this; + } + /** + * The current stock quantity for this variant + * + * @return int|null + */ + public function getStockQuantity() : ?int + { + return $this->stockQuantity; + } + /** + * The current stock quantity for this variant + * + * @param int|null $stockQuantity + * + * @return self + */ + public function setStockQuantity(?int $stockQuantity) : self + { + $this->stockQuantity = $stockQuantity; + return $this; + } + /** + * The variants weight in KG + * + * @return float|null + */ + public function getWeightInKg() : ?float + { + return $this->weightInKg; + } + /** + * The variants weight in KG + * + * @param float|null $weightInKg + * + * @return self + */ + public function setWeightInKg(?float $weightInKg) : self + { + $this->weightInKg = $weightInKg; + return $this; + } + /** + * The cost for this variant. Used for statistic and never displayed to customers + * + * @return string|null + */ + public function getCostPrice() : ?string + { + return $this->costPrice; + } + /** + * The cost for this variant. Used for statistic and never displayed to customers + * + * @param string|null $costPrice + * + * @return self + */ + public function setCostPrice(?string $costPrice) : self + { + $this->costPrice = $costPrice; + return $this; + } + /** + * European article no + * + * @return string|null + */ + public function getEan() : ?string + { + return $this->ean; + } + /** + * European article no + * + * @param string|null $ean + * + * @return self + */ + public function setEan(?string $ean) : self + { + $this->ean = $ean; + return $this; + } + /** + * Manufacturer part no + * + * @return string|null + */ + public function getMpn() : ?string + { + return $this->mpn; + } + /** + * Manufacturer part no + * + * @param string|null $mpn + * + * @return self + */ + public function setMpn(?string $mpn) : self + { + $this->mpn = $mpn; + return $this; + } + /** + * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint + * + * @return int|null + */ + public function getImageFileId() : ?int + { + return $this->imageFileId; + } + /** + * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint + * + * @param int|null $imageFileId + * + * @return self + */ + public function setImageFileId(?int $imageFileId) : self + { + $this->imageFileId = $imageFileId; + return $this; + } + /** + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. + * + * @return int[] + */ + public function getAttributeValueLinks() : array + { + return $this->attributeValueLinks; + } + /** + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. + * + * @param int[] $attributeValueLinks + * + * @return self + */ + public function setAttributeValueLinks(array $attributeValueLinks) : self + { + $this->attributeValueLinks = $attributeValueLinks; + return $this; + } + /** + * An array of pricelists IDs that will use inheritance + * + * @return int[]|null + */ + public function getVolumePricingInheritancePricelistIds() : ?array + { + return $this->volumePricingInheritancePricelistIds; + } + /** + * An array of pricelists IDs that will use inheritance + * + * @param int[]|null $volumePricingInheritancePricelistIds + * + * @return self + */ + public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self + { + $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/ProductVariantModel.php b/src/Api/Generated/Model/ProductVariantResponseModel.php similarity index 80% rename from src/Api/Generated/Model/ProductVariantModel.php rename to src/Api/Generated/Model/ProductVariantResponseModel.php index 903298cb..fa8a6394 100644 --- a/src/Api/Generated/Model/ProductVariantModel.php +++ b/src/Api/Generated/Model/ProductVariantResponseModel.php @@ -2,42 +2,24 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantModel +class ProductVariantResponseModel { - /** - * - * - * @var int - */ - protected $variantId; /** * The product variants SKU (stock keeping unit) * * @var string */ protected $sku; - /** - * The external id of this variant - * - * @var string|null - */ - protected $externalId; - /** - * The external id type of this variant - * - * @var string|null - */ - protected $externalIdType; /** * Is this variant active? Only active variants are visible to customers * - * @var bool + * @var bool|null */ protected $isActive = true; /** * The sort index of this variant. * - * @var int + * @var int|null */ protected $sortIndex; /** @@ -67,13 +49,13 @@ class ProductVariantModel /** * European article no * - * @var string + * @var string|null */ protected $ean; /** * Manufacturer part no * - * @var string + * @var string|null */ protected $mpn; /** @@ -83,7 +65,7 @@ class ProductVariantModel */ protected $imageFileId; /** - * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * * @var int[] */ @@ -91,9 +73,15 @@ class ProductVariantModel /** * An array of pricelists IDs that will use inheritance * - * @var int[] + * @var int[]|null */ protected $volumePricingInheritancePricelistIds; + /** + * The variant id + * + * @var int + */ + protected $variantId; /** * A collection of product variant prices * @@ -106,27 +94,6 @@ class ProductVariantModel * @var ProductVariantAttributeValueModel[] */ protected $attributeValues; - /** - * - * - * @return int - */ - public function getVariantId() : int - { - return $this->variantId; - } - /** - * - * - * @param int $variantId - * - * @return self - */ - public function setVariantId(int $variantId) : self - { - $this->variantId = $variantId; - return $this; - } /** * The product variants SKU (stock keeping unit) * @@ -148,65 +115,23 @@ public function setSku(string $sku) : self $this->sku = $sku; return $this; } - /** - * The external id of this variant - * - * @return string|null - */ - public function getExternalId() : ?string - { - return $this->externalId; - } - /** - * The external id of this variant - * - * @param string|null $externalId - * - * @return self - */ - public function setExternalId(?string $externalId) : self - { - $this->externalId = $externalId; - return $this; - } - /** - * The external id type of this variant - * - * @return string|null - */ - public function getExternalIdType() : ?string - { - return $this->externalIdType; - } - /** - * The external id type of this variant - * - * @param string|null $externalIdType - * - * @return self - */ - public function setExternalIdType(?string $externalIdType) : self - { - $this->externalIdType = $externalIdType; - return $this; - } /** * Is this variant active? Only active variants are visible to customers * - * @return bool + * @return bool|null */ - public function getIsActive() : bool + public function getIsActive() : ?bool { return $this->isActive; } /** * Is this variant active? Only active variants are visible to customers * - * @param bool $isActive + * @param bool|null $isActive * * @return self */ - public function setIsActive(bool $isActive) : self + public function setIsActive(?bool $isActive) : self { $this->isActive = $isActive; return $this; @@ -214,20 +139,20 @@ public function setIsActive(bool $isActive) : self /** * The sort index of this variant. * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of this variant. * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -319,20 +244,20 @@ public function setCostPrice(?string $costPrice) : self /** * European article no * - * @return string + * @return string|null */ - public function getEan() : string + public function getEan() : ?string { return $this->ean; } /** * European article no * - * @param string $ean + * @param string|null $ean * * @return self */ - public function setEan(string $ean) : self + public function setEan(?string $ean) : self { $this->ean = $ean; return $this; @@ -340,20 +265,20 @@ public function setEan(string $ean) : self /** * Manufacturer part no * - * @return string + * @return string|null */ - public function getMpn() : string + public function getMpn() : ?string { return $this->mpn; } /** * Manufacturer part no * - * @param string $mpn + * @param string|null $mpn * * @return self */ - public function setMpn(string $mpn) : self + public function setMpn(?string $mpn) : self { $this->mpn = $mpn; return $this; @@ -380,7 +305,7 @@ public function setImageFileId(?int $imageFileId) : self return $this; } /** - * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * * @return int[] */ @@ -389,7 +314,7 @@ public function getAttributeValueLinks() : array return $this->attributeValueLinks; } /** - * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true + * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * * @param int[] $attributeValueLinks * @@ -403,24 +328,45 @@ public function setAttributeValueLinks(array $attributeValueLinks) : self /** * An array of pricelists IDs that will use inheritance * - * @return int[] + * @return int[]|null */ - public function getVolumePricingInheritancePricelistIds() : array + public function getVolumePricingInheritancePricelistIds() : ?array { return $this->volumePricingInheritancePricelistIds; } /** * An array of pricelists IDs that will use inheritance * - * @param int[] $volumePricingInheritancePricelistIds + * @param int[]|null $volumePricingInheritancePricelistIds * * @return self */ - public function setVolumePricingInheritancePricelistIds(array $volumePricingInheritancePricelistIds) : self + public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self { $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; return $this; } + /** + * The variant id + * + * @return int + */ + public function getVariantId() : int + { + return $this->variantId; + } + /** + * The variant id + * + * @param int $variantId + * + * @return self + */ + public function setVariantId(int $variantId) : self + { + $this->variantId = $variantId; + return $this; + } /** * A collection of product variant prices * diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index 24612b38..3c13bc4f 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -97,7 +97,10 @@ public static function create() $normalizers[] = new ProductModelCollectionMetaNormalizer(); $normalizers[] = new ProductVariantModelItemNormalizer(); $normalizers[] = new ProductVariantModelCollectionNormalizer(); - $normalizers[] = new ProductVariantModelNormalizer(); + $normalizers[] = new ProductVariantRequestModelNormalizer(); + $normalizers[] = new ProductVariantPutRequestModelNormalizer(); + $normalizers[] = new ProductVariantPatchRequestModelNormalizer(); + $normalizers[] = new ProductVariantResponseModelNormalizer(); $normalizers[] = new ProductMediaFileLinkModelItemNormalizer(); $normalizers[] = new ProductMediaFileLinkModelCollectionNormalizer(); $normalizers[] = new ProductMediaFileLinkModelNormalizer(); diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 6aa68cd4..3fe2a34f 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -86,7 +86,7 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'variants')) { $values_1 = array(); foreach ($data->{'variants'} as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductVariantModel', 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel', 'json', $context); } $object->setVariants($values_1); } diff --git a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php index fb89fcaa..f1fc4769 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php @@ -31,7 +31,7 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data')) { $values = array(); foreach ($data->{'data'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantModel', 'json', $context); + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context); } $object->setData($values); } diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index fafbb5cd..022f8e05 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -29,7 +29,7 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object = new \Starweb\Api\Generated\Model\ProductVariantModelItem(); if (property_exists($data, 'data')) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantModel', 'json', $context)); + $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context)); } return $object; } diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php new file mode 100644 index 00000000..8c696eda --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -0,0 +1,114 @@ +setSku($data->{'sku'}); + } + if (property_exists($data, 'isActive')) { + $object->setIsActive($data->{'isActive'}); + } + if (property_exists($data, 'sortIndex')) { + $object->setSortIndex($data->{'sortIndex'}); + } + if (property_exists($data, 'stockStatusId')) { + $object->setStockStatusId($data->{'stockStatusId'}); + } + if (property_exists($data, 'stockQuantity')) { + $object->setStockQuantity($data->{'stockQuantity'}); + } + if (property_exists($data, 'weightInKg')) { + $object->setWeightInKg($data->{'weightInKg'}); + } + if (property_exists($data, 'costPrice')) { + $object->setCostPrice($data->{'costPrice'}); + } + if (property_exists($data, 'ean')) { + $object->setEan($data->{'ean'}); + } + if (property_exists($data, 'mpn')) { + $object->setMpn($data->{'mpn'}); + } + if (property_exists($data, 'imageFileId')) { + $object->setImageFileId($data->{'imageFileId'}); + } + if (property_exists($data, 'attributeValueLinks')) { + $values = array(); + foreach ($data->{'attributeValueLinks'} as $value) { + $values[] = $value; + } + $object->setAttributeValueLinks($values); + } + if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + $values_1 = array(); + foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + $values_1[] = $value_1; + } + $object->setVolumePricingInheritancePricelistIds($values_1); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getSku()) { + $data->{'sku'} = $object->getSku(); + } + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); + if (null !== $object->getAttributeValueLinks()) { + $values = array(); + foreach ($object->getAttributeValueLinks() as $value) { + $values[] = $value; + } + $data->{'attributeValueLinks'} = $values; + } + else { + $data->{'attributeValueLinks'} = null; + } + if (null !== $object->getVolumePricingInheritancePricelistIds()) { + $values_1 = array(); + foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { + $values_1[] = $value_1; + } + $data->{'volumePricingInheritancePricelistIds'} = $values_1; + } + else { + $data->{'volumePricingInheritancePricelistIds'} = null; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php new file mode 100644 index 00000000..bd307601 --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php @@ -0,0 +1,114 @@ +setSku($data->{'sku'}); + } + if (property_exists($data, 'isActive')) { + $object->setIsActive($data->{'isActive'}); + } + if (property_exists($data, 'sortIndex')) { + $object->setSortIndex($data->{'sortIndex'}); + } + if (property_exists($data, 'stockStatusId')) { + $object->setStockStatusId($data->{'stockStatusId'}); + } + if (property_exists($data, 'stockQuantity')) { + $object->setStockQuantity($data->{'stockQuantity'}); + } + if (property_exists($data, 'weightInKg')) { + $object->setWeightInKg($data->{'weightInKg'}); + } + if (property_exists($data, 'costPrice')) { + $object->setCostPrice($data->{'costPrice'}); + } + if (property_exists($data, 'ean')) { + $object->setEan($data->{'ean'}); + } + if (property_exists($data, 'mpn')) { + $object->setMpn($data->{'mpn'}); + } + if (property_exists($data, 'imageFileId')) { + $object->setImageFileId($data->{'imageFileId'}); + } + if (property_exists($data, 'attributeValueLinks')) { + $values = array(); + foreach ($data->{'attributeValueLinks'} as $value) { + $values[] = $value; + } + $object->setAttributeValueLinks($values); + } + if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + $values_1 = array(); + foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + $values_1[] = $value_1; + } + $object->setVolumePricingInheritancePricelistIds($values_1); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getSku()) { + $data->{'sku'} = $object->getSku(); + } + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); + if (null !== $object->getAttributeValueLinks()) { + $values = array(); + foreach ($object->getAttributeValueLinks() as $value) { + $values[] = $value; + } + $data->{'attributeValueLinks'} = $values; + } + else { + $data->{'attributeValueLinks'} = null; + } + if (null !== $object->getVolumePricingInheritancePricelistIds()) { + $values_1 = array(); + foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { + $values_1[] = $value_1; + } + $data->{'volumePricingInheritancePricelistIds'} = $values_1; + } + else { + $data->{'volumePricingInheritancePricelistIds'} = null; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php new file mode 100644 index 00000000..36851eed --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php @@ -0,0 +1,111 @@ +setSku($data->{'sku'}); + } + if (property_exists($data, 'isActive')) { + $object->setIsActive($data->{'isActive'}); + } + if (property_exists($data, 'sortIndex')) { + $object->setSortIndex($data->{'sortIndex'}); + } + if (property_exists($data, 'stockStatusId')) { + $object->setStockStatusId($data->{'stockStatusId'}); + } + if (property_exists($data, 'stockQuantity')) { + $object->setStockQuantity($data->{'stockQuantity'}); + } + if (property_exists($data, 'weightInKg')) { + $object->setWeightInKg($data->{'weightInKg'}); + } + if (property_exists($data, 'costPrice')) { + $object->setCostPrice($data->{'costPrice'}); + } + if (property_exists($data, 'ean')) { + $object->setEan($data->{'ean'}); + } + if (property_exists($data, 'mpn')) { + $object->setMpn($data->{'mpn'}); + } + if (property_exists($data, 'imageFileId')) { + $object->setImageFileId($data->{'imageFileId'}); + } + if (property_exists($data, 'attributeValueLinks')) { + $values = array(); + foreach ($data->{'attributeValueLinks'} as $value) { + $values[] = $value; + } + $object->setAttributeValueLinks($values); + } + if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + $values_1 = array(); + foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + $values_1[] = $value_1; + } + $object->setVolumePricingInheritancePricelistIds($values_1); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getSku()) { + $data->{'sku'} = $object->getSku(); + } + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); + if (null !== $object->getAttributeValueLinks()) { + $values = array(); + foreach ($object->getAttributeValueLinks() as $value) { + $values[] = $value; + } + $data->{'attributeValueLinks'} = $values; + } + if (null !== $object->getVolumePricingInheritancePricelistIds()) { + $values_1 = array(); + foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { + $values_1[] = $value_1; + } + $data->{'volumePricingInheritancePricelistIds'} = $values_1; + } + else { + $data->{'volumePricingInheritancePricelistIds'} = null; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php similarity index 84% rename from src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php rename to src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php index 199b3895..47180fe0 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php @@ -10,36 +10,27 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class ProductVariantModelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ProductVariantResponseModelNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; public function supportsDenormalization($data, $type, $format = null) { - return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantModel'; + return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel'; } public function supportsNormalization($data, $format = null) { - return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModel'; + return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel'; } public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { throw new InvalidArgumentException(); } - $object = new \Starweb\Api\Generated\Model\ProductVariantModel(); - if (property_exists($data, 'variantId')) { - $object->setVariantId($data->{'variantId'}); - } + $object = new \Starweb\Api\Generated\Model\ProductVariantResponseModel(); if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'externalId')) { - $object->setExternalId($data->{'externalId'}); - } - if (property_exists($data, 'externalIdType')) { - $object->setExternalIdType($data->{'externalIdType'}); - } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -81,6 +72,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVolumePricingInheritancePricelistIds($values_1); } + if (property_exists($data, 'variantId')) { + $object->setVariantId($data->{'variantId'}); + } if (property_exists($data, 'prices')) { $values_2 = array(); foreach ($data->{'prices'} as $value_2) { @@ -103,24 +97,14 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); $data->{'stockStatusId'} = $object->getStockStatusId(); $data->{'stockQuantity'} = $object->getStockQuantity(); $data->{'weightInKg'} = $object->getWeightInKg(); $data->{'costPrice'} = $object->getCostPrice(); - if (null !== $object->getEan()) { - $data->{'ean'} = $object->getEan(); - } - if (null !== $object->getMpn()) { - $data->{'mpn'} = $object->getMpn(); - } + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getAttributeValueLinks()) { $values = array(); @@ -136,6 +120,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'volumePricingInheritancePricelistIds'} = $values_1; } + else { + $data->{'volumePricingInheritancePricelistIds'} = null; + } if (null !== $object->getPrices()) { $values_2 = array(); foreach ($object->getPrices() as $value_2) { From bd3d983ea97ade72310c904885b818cc6a402b19 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 25 Feb 2020 07:28:48 +0100 Subject: [PATCH 55/87] adds missing externalId and externalIdType to product variant models --- resources/specification/openapi.json | 60 +++++++++++++++++++ .../Model/ProductVariantPatchRequestModel.php | 54 +++++++++++++++++ .../Model/ProductVariantPutRequestModel.php | 54 +++++++++++++++++ .../Model/ProductVariantRequestModel.php | 54 +++++++++++++++++ ...ductVariantPatchRequestModelNormalizer.php | 8 +++ ...roductVariantPutRequestModelNormalizer.php | 8 +++ .../ProductVariantRequestModelNormalizer.php | 8 +++ 7 files changed, 246 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 326eccbb..3a2f1793 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11966,6 +11966,21 @@ "maxLength": 40, "description": "The product variants SKU (stock keeping unit)" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system", + "nullable": true + }, "isActive": { "type": "boolean", "default": true, @@ -12053,6 +12068,21 @@ "maxLength": 40, "description": "The product variants SKU (stock keeping unit)" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system", + "nullable": true + }, "isActive": { "type": "boolean", "default": true, @@ -12141,6 +12171,21 @@ "maxLength": 40, "description": "The product variants SKU (stock keeping unit)" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system", + "nullable": true + }, "isActive": { "type": "boolean", "default": true, @@ -12225,6 +12270,21 @@ "maxLength": 40, "description": "The product variants SKU (stock keeping unit)" }, + "externalId": { + "type": "string", + "maxLength": 40, + "default": "", + "example": "101", + "description": "The external id of this pricelist", + "nullable": true + }, + "externalIdType": { + "type": "string", + "description": "The system name the externalId belongs to.", + "maxLength": 20, + "example": "ERP system", + "nullable": true + }, "isActive": { "type": "boolean", "default": true, diff --git a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php index 76bdff20..389b1dde 100644 --- a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php @@ -10,6 +10,18 @@ class ProductVariantPatchRequestModel * @var string */ protected $sku; + /** + * The external id of this pricelist + * + * @var string|null + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string|null + */ + protected $externalIdType; /** * Is this variant active? Only active variants are visible to customers * @@ -97,6 +109,48 @@ public function setSku(string $sku) : self $this->sku = $sku; return $this; } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * Is this variant active? Only active variants are visible to customers * diff --git a/src/Api/Generated/Model/ProductVariantPutRequestModel.php b/src/Api/Generated/Model/ProductVariantPutRequestModel.php index ab7fa155..2bed52fb 100644 --- a/src/Api/Generated/Model/ProductVariantPutRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPutRequestModel.php @@ -10,6 +10,18 @@ class ProductVariantPutRequestModel * @var string */ protected $sku; + /** + * The external id of this pricelist + * + * @var string|null + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string|null + */ + protected $externalIdType; /** * Is this variant active? Only active variants are visible to customers * @@ -97,6 +109,48 @@ public function setSku(string $sku) : self $this->sku = $sku; return $this; } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * Is this variant active? Only active variants are visible to customers * diff --git a/src/Api/Generated/Model/ProductVariantRequestModel.php b/src/Api/Generated/Model/ProductVariantRequestModel.php index 00ac877b..c54a61e4 100644 --- a/src/Api/Generated/Model/ProductVariantRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantRequestModel.php @@ -10,6 +10,18 @@ class ProductVariantRequestModel * @var string */ protected $sku; + /** + * The external id of this pricelist + * + * @var string|null + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string|null + */ + protected $externalIdType; /** * Is this variant active? Only active variants are visible to customers * @@ -97,6 +109,48 @@ public function setSku(string $sku) : self $this->sku = $sku; return $this; } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * Is this variant active? Only active variants are visible to customers * diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php index 8c696eda..8e65f7ac 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -80,6 +86,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); $data->{'isActive'} = $object->getIsActive(); $data->{'sortIndex'} = $object->getSortIndex(); $data->{'stockStatusId'} = $object->getStockStatusId(); diff --git a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php index bd307601..9d6d3ad9 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -80,6 +86,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); $data->{'isActive'} = $object->getIsActive(); $data->{'sortIndex'} = $object->getSortIndex(); $data->{'stockStatusId'} = $object->getStockStatusId(); diff --git a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php index 36851eed..2140c969 100644 --- a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -80,6 +86,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); $data->{'isActive'} = $object->getIsActive(); $data->{'sortIndex'} = $object->getSortIndex(); $data->{'stockStatusId'} = $object->getStockStatusId(); From cabcdd10d17fca402ccb140520a3576351661545 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 25 Feb 2020 08:08:05 +0100 Subject: [PATCH 56/87] regenerate response model --- .../Model/ProductVariantResponseModel.php | 54 +++++++++++++++++++ .../ProductVariantResponseModelNormalizer.php | 8 +++ 2 files changed, 62 insertions(+) diff --git a/src/Api/Generated/Model/ProductVariantResponseModel.php b/src/Api/Generated/Model/ProductVariantResponseModel.php index fa8a6394..25e14680 100644 --- a/src/Api/Generated/Model/ProductVariantResponseModel.php +++ b/src/Api/Generated/Model/ProductVariantResponseModel.php @@ -10,6 +10,18 @@ class ProductVariantResponseModel * @var string */ protected $sku; + /** + * The external id of this pricelist + * + * @var string|null + */ + protected $externalId = ''; + /** + * The system name the externalId belongs to. + * + * @var string|null + */ + protected $externalIdType; /** * Is this variant active? Only active variants are visible to customers * @@ -115,6 +127,48 @@ public function setSku(string $sku) : self $this->sku = $sku; return $this; } + /** + * The external id of this pricelist + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * The external id of this pricelist + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * The system name the externalId belongs to. + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * The system name the externalId belongs to. + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * Is this variant active? Only active variants are visible to customers * diff --git a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php index 47180fe0..4afd7c9a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php @@ -31,6 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } + if (property_exists($data, 'externalId')) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType')) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'isActive')) { $object->setIsActive($data->{'isActive'}); } @@ -97,6 +103,8 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); $data->{'isActive'} = $object->getIsActive(); $data->{'sortIndex'} = $object->getSortIndex(); $data->{'stockStatusId'} = $object->getStockStatusId(); From 378d657d54ee6fe8345a5525c7accacc48669edf Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 5 Mar 2020 13:48:17 +0100 Subject: [PATCH 57/87] removes product id from updatable and patchable models --- resources/specification/openapi.json | 10 ------- .../Generated/Model/ProductModelPatchable.php | 27 ------------------- .../Generated/Model/ProductModelUpdatable.php | 27 ------------------- .../ProductModelPatchableNormalizer.php | 3 --- .../ProductModelUpdatableNormalizer.php | 3 --- 5 files changed, 70 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 3a2f1793..4c34561d 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11611,11 +11611,6 @@ "ProductModelUpdatable": { "type": "object", "properties": { - "productId": { - "type": "integer", - "readOnly": true, - "example": 101 - }, "externalId": { "type": "string", "maxLength": 40, @@ -11771,11 +11766,6 @@ "ProductModelPatchable": { "type": "object", "properties": { - "productId": { - "type": "integer", - "readOnly": true, - "example": 101 - }, "externalId": { "type": "string", "maxLength": 40, diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index 0c3fc4b1..b547b902 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -4,12 +4,6 @@ class ProductModelPatchable { - /** - * - * - * @var int - */ - protected $productId; /** * The external id of this pricelist * @@ -136,27 +130,6 @@ class ProductModelPatchable * @var ProductMetaDataModelUpdatable[] */ protected $metaData; - /** - * - * - * @return int - */ - public function getProductId() : int - { - return $this->productId; - } - /** - * - * - * @param int $productId - * - * @return self - */ - public function setProductId(int $productId) : self - { - $this->productId = $productId; - return $this; - } /** * The external id of this pricelist * diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index b96f2b23..34eaf7cd 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -4,12 +4,6 @@ class ProductModelUpdatable { - /** - * - * - * @var int - */ - protected $productId; /** * The external id of this pricelist * @@ -148,27 +142,6 @@ class ProductModelUpdatable * @var ProductMetaDataModelUpdatable[] */ protected $metaData; - /** - * - * - * @return int - */ - public function getProductId() : int - { - return $this->productId; - } - /** - * - * - * @param int $productId - * - * @return self - */ - public function setProductId(int $productId) : self - { - $this->productId = $productId; - return $this; - } /** * The external id of this pricelist * diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 456f3874..99c72ab9 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -28,9 +28,6 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\ProductModelPatchable(); - if (property_exists($data, 'productId')) { - $object->setProductId($data->{'productId'}); - } if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 3fe2a34f..da617369 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -28,9 +28,6 @@ public function denormalize($data, $class, $format = null, array $context = arra throw new InvalidArgumentException(); } $object = new \Starweb\Api\Generated\Model\ProductModelUpdatable(); - if (property_exists($data, 'productId')) { - $object->setProductId($data->{'productId'}); - } if (property_exists($data, 'externalId')) { $object->setExternalId($data->{'externalId'}); } From f4e9073f615c804f130967b14db95deee0e78808 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Thu, 5 Mar 2020 14:57:09 +0100 Subject: [PATCH 58/87] removes read only fields from updatable product models and set visibilityPricelistIds to be nullable --- resources/specification/openapi.json | 30 ++------- .../Generated/Model/ProductModelPatchable.php | 64 ++----------------- .../Generated/Model/ProductModelUpdatable.php | 64 ++----------------- .../ProductModelPatchableNormalizer.php | 9 +-- .../ProductModelUpdatableNormalizer.php | 9 +-- 5 files changed, 20 insertions(+), 156 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 4c34561d..f026e2af 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -11648,7 +11648,8 @@ "type": "integer", "description": "The ID of the pricelist the product should be visible for", "example": 1 - } + }, + "nullable": true }, "moreInfoUrl": { "type": "string", @@ -11699,18 +11700,6 @@ "maximum": 9999, "description": "Account number for managing accounting on product level" }, - "hasSeveralVariants": { - "type": "boolean", - "description": "Indicates if the products has several variants or not. The remaining variants can be fetched using the \/products\/{product id}\/variants endpoint", - "readOnly": true, - "example": false - }, - "modifiedAt": { - "type": "string", - "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T13:38:17+01:00", - "readOnly": true - }, "variants": { "type": "array", "description": "A collection of variants", @@ -11803,7 +11792,8 @@ "type": "integer", "description": "The ID of the pricelist the product should be visible for", "example": 1 - } + }, + "nullable": true }, "moreInfoUrl": { "type": "string", @@ -11855,18 +11845,6 @@ "maximum": 9999, "description": "Account number for managing accounting on product level" }, - "hasSeveralVariants": { - "type": "boolean", - "description": "Indicates if the products has several variants or not. The remaining variants can be fetched using the \/products\/{product id}\/variants endpoint", - "readOnly": true, - "example": false - }, - "modifiedAt": { - "type": "string", - "description": "A timestamp of when the product was modified. The time should be formatted using ISO-8601", - "example": "2019-11-28T13:38:17+01:00", - "readOnly": true - }, "mediaFiles": { "type": "array", "description": "A collection of media files", diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index b547b902..b582a3f1 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -37,7 +37,7 @@ class ProductModelPatchable /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @var int[] + * @var int[]|null */ protected $visibilityPricelistIds; /** @@ -88,18 +88,6 @@ class ProductModelPatchable * @var int|null */ protected $accounting; - /** - * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint - * - * @var bool - */ - protected $hasSeveralVariants; - /** - * A timestamp of when the product was modified. The time should be formatted using ISO-8601 - * - * @var string - */ - protected $modifiedAt; /** * A collection of media files * @@ -238,20 +226,20 @@ public function setVisibility(string $visibility) : self /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @return int[] + * @return int[]|null */ - public function getVisibilityPricelistIds() : array + public function getVisibilityPricelistIds() : ?array { return $this->visibilityPricelistIds; } /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @param int[] $visibilityPricelistIds + * @param int[]|null $visibilityPricelistIds * * @return self */ - public function setVisibilityPricelistIds(array $visibilityPricelistIds) : self + public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self { $this->visibilityPricelistIds = $visibilityPricelistIds; return $this; @@ -424,48 +412,6 @@ public function setAccounting(?int $accounting) : self $this->accounting = $accounting; return $this; } - /** - * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint - * - * @return bool - */ - public function getHasSeveralVariants() : bool - { - return $this->hasSeveralVariants; - } - /** - * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint - * - * @param bool $hasSeveralVariants - * - * @return self - */ - public function setHasSeveralVariants(bool $hasSeveralVariants) : self - { - $this->hasSeveralVariants = $hasSeveralVariants; - return $this; - } - /** - * A timestamp of when the product was modified. The time should be formatted using ISO-8601 - * - * @return string - */ - public function getModifiedAt() : string - { - return $this->modifiedAt; - } - /** - * A timestamp of when the product was modified. The time should be formatted using ISO-8601 - * - * @param string $modifiedAt - * - * @return self - */ - public function setModifiedAt(string $modifiedAt) : self - { - $this->modifiedAt = $modifiedAt; - return $this; - } /** * A collection of media files * diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index 34eaf7cd..c11b0bf5 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -37,7 +37,7 @@ class ProductModelUpdatable /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @var int[] + * @var int[]|null */ protected $visibilityPricelistIds; /** @@ -88,18 +88,6 @@ class ProductModelUpdatable * @var int|null */ protected $accounting; - /** - * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint - * - * @var bool - */ - protected $hasSeveralVariants; - /** - * A timestamp of when the product was modified. The time should be formatted using ISO-8601 - * - * @var string - */ - protected $modifiedAt; /** * A collection of variants * @@ -250,20 +238,20 @@ public function setVisibility(string $visibility) : self /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @return int[] + * @return int[]|null */ - public function getVisibilityPricelistIds() : array + public function getVisibilityPricelistIds() : ?array { return $this->visibilityPricelistIds; } /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @param int[] $visibilityPricelistIds + * @param int[]|null $visibilityPricelistIds * * @return self */ - public function setVisibilityPricelistIds(array $visibilityPricelistIds) : self + public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self { $this->visibilityPricelistIds = $visibilityPricelistIds; return $this; @@ -436,48 +424,6 @@ public function setAccounting(?int $accounting) : self $this->accounting = $accounting; return $this; } - /** - * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint - * - * @return bool - */ - public function getHasSeveralVariants() : bool - { - return $this->hasSeveralVariants; - } - /** - * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint - * - * @param bool $hasSeveralVariants - * - * @return self - */ - public function setHasSeveralVariants(bool $hasSeveralVariants) : self - { - $this->hasSeveralVariants = $hasSeveralVariants; - return $this; - } - /** - * A timestamp of when the product was modified. The time should be formatted using ISO-8601 - * - * @return string - */ - public function getModifiedAt() : string - { - return $this->modifiedAt; - } - /** - * A timestamp of when the product was modified. The time should be formatted using ISO-8601 - * - * @param string $modifiedAt - * - * @return self - */ - public function setModifiedAt(string $modifiedAt) : self - { - $this->modifiedAt = $modifiedAt; - return $this; - } /** * A collection of variants * diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 99c72ab9..1a4398c2 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -74,12 +74,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'accounting')) { $object->setAccounting($data->{'accounting'}); } - if (property_exists($data, 'hasSeveralVariants')) { - $object->setHasSeveralVariants($data->{'hasSeveralVariants'}); - } - if (property_exists($data, 'modifiedAt')) { - $object->setModifiedAt($data->{'modifiedAt'}); - } if (property_exists($data, 'mediaFiles')) { $values_1 = array(); foreach ($data->{'mediaFiles'} as $value_1) { @@ -136,6 +130,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'visibilityPricelistIds'} = $values; } + else { + $data->{'visibilityPricelistIds'} = null; + } $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); $data->{'manufacturerId'} = $object->getManufacturerId(); $data->{'unitId'} = $object->getUnitId(); diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index da617369..cccc7dba 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -74,12 +74,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'accounting')) { $object->setAccounting($data->{'accounting'}); } - if (property_exists($data, 'hasSeveralVariants')) { - $object->setHasSeveralVariants($data->{'hasSeveralVariants'}); - } - if (property_exists($data, 'modifiedAt')) { - $object->setModifiedAt($data->{'modifiedAt'}); - } if (property_exists($data, 'variants')) { $values_1 = array(); foreach ($data->{'variants'} as $value_1) { @@ -150,6 +144,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'visibilityPricelistIds'} = $values; } + else { + $data->{'visibilityPricelistIds'} = null; + } if (null !== $object->getMoreInfoUrl()) { $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); } From b72be976041fe4f36c7ef7f96ffee14e9a822437 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 09:04:52 +0200 Subject: [PATCH 59/87] fixes the openapi contract for languages on order status model --- resources/specification/openapi.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index f026e2af..38330563 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -9544,10 +9544,7 @@ "example": "created" }, "languages": { - "type": "array", - "items": { - "$ref": "#\/components\/schemas\/OrderStatusLanguageModel" - } + "$ref": "#\/components\/schemas\/OrderStatusLanguageModelCollection" } } }, @@ -9569,6 +9566,17 @@ } } }, + "OrderStatusLanguageModelCollection": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#\/components\/schemas\/OrderStatusLanguageModel" + } + } + } + }, "OrderStatusModelItem": { "properties": { "data": { From ef0ed2610d1372b153fede58be1af47ed0c55368 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 09:07:22 +0200 Subject: [PATCH 60/87] regenerate classes --- .../OrderStatusLanguageModelCollection.php | 34 ++++++++++++ src/Api/Generated/Model/OrderStatusModel.php | 10 ++-- .../Normalizer/NormalizerFactory.php | 1 + ...tatusLanguageModelCollectionNormalizer.php | 52 +++++++++++++++++++ .../Normalizer/OrderStatusModelNormalizer.php | 12 +---- 5 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 src/Api/Generated/Model/OrderStatusLanguageModelCollection.php create mode 100644 src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php diff --git a/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php new file mode 100644 index 00000000..0e784b4d --- /dev/null +++ b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php @@ -0,0 +1,34 @@ +data; + } + /** + * + * + * @param OrderStatusLanguageModel[] $data + * + * @return self + */ + public function setData(array $data) : self + { + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/OrderStatusModel.php b/src/Api/Generated/Model/OrderStatusModel.php index 98959297..6ef6721c 100644 --- a/src/Api/Generated/Model/OrderStatusModel.php +++ b/src/Api/Generated/Model/OrderStatusModel.php @@ -25,7 +25,7 @@ class OrderStatusModel /** * * - * @var OrderStatusLanguageModel[] + * @var OrderStatusLanguageModelCollection */ protected $languages; /** @@ -94,20 +94,20 @@ public function setIdCode(string $idCode) : self /** * * - * @return OrderStatusLanguageModel[] + * @return OrderStatusLanguageModelCollection */ - public function getLanguages() : array + public function getLanguages() : OrderStatusLanguageModelCollection { return $this->languages; } /** * * - * @param OrderStatusLanguageModel[] $languages + * @param OrderStatusLanguageModelCollection $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(OrderStatusLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index 3c13bc4f..9fd19e15 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -24,6 +24,7 @@ public static function create() $normalizers[] = new OrderAddressCollectionNormalizer(); $normalizers[] = new OrderStatusModelNormalizer(); $normalizers[] = new OrderStatusLanguageModelNormalizer(); + $normalizers[] = new OrderStatusLanguageModelCollectionNormalizer(); $normalizers[] = new OrderStatusModelItemNormalizer(); $normalizers[] = new OrderStatusModelCollectionNormalizer(); $normalizers[] = new OrderItemModelNormalizer(); diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php new file mode 100644 index 00000000..9cf3866f --- /dev/null +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php @@ -0,0 +1,52 @@ +{'data'} as $value) { + $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel', 'json', $context); + } + $object->setData($values); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getData()) { + $values = array(); + foreach ($object->getData() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data->{'data'} = $values; + } + return $data; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index 34881568..ac6612ac 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -38,11 +38,7 @@ public function denormalize($data, $class, $format = null, array $context = arra $object->setIdCode($data->{'idCode'}); } if (property_exists($data, 'languages')) { - $values = array(); - foreach ($data->{'languages'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel', 'json', $context); - } - $object->setLanguages($values); + $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection', 'json', $context)); } return $object; } @@ -53,11 +49,7 @@ public function normalize($object, $format = null, array $context = array()) $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); } if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data->{'languages'} = $values; + $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } return $data; } From 7c6a43236b49920f98627166d7ec536b5b98aa40 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 09:44:11 +0200 Subject: [PATCH 61/87] make sure address objects can be null --- resources/specification/openapi.json | 55 +++++++++++++++-- src/Api/Generated/Model/OrderAddressModel.php | 60 +++++++++---------- .../OrderAddressModelNormalizer.php | 24 ++++---- 3 files changed, 91 insertions(+), 48 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 38330563..1f9cc062 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -9498,22 +9498,65 @@ "type": "object", "properties": { "originalInvoice": { - "$ref": "#\/components\/schemas\/AddressModel" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/AddressModel" + + }, + { + "type": null + } + ] }, "originalDelivery": { - "$ref": "#\/components\/schemas\/AddressModel" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/AddressModel" + }, + { + "nullable": true + } + ] }, "customerInvoice": { - "$ref": "#\/components\/schemas\/AddressModel" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/AddressModel" + }, + { + "nullable": true + } + ] }, "customerDelivery": { - "$ref": "#\/components\/schemas\/AddressModel" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/AddressModel" + }, + { + "nullable": true + } + ] }, "paymentMethodInvoice": { - "$ref": "#\/components\/schemas\/AddressModel" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/AddressModel" + }, + { + "nullable": true + } + ] }, "paymentMethodDelivery": { - "$ref": "#\/components\/schemas\/AddressModel" + "oneOf": [ + { + "$ref": "#\/components\/schemas\/AddressModel" + }, + { + "nullable": true + } + ] } } }, diff --git a/src/Api/Generated/Model/OrderAddressModel.php b/src/Api/Generated/Model/OrderAddressModel.php index 381e9afc..fa82ed58 100644 --- a/src/Api/Generated/Model/OrderAddressModel.php +++ b/src/Api/Generated/Model/OrderAddressModel.php @@ -7,56 +7,56 @@ class OrderAddressModel /** * * - * @var AddressModel + * @var mixed */ protected $originalInvoice; /** * * - * @var AddressModel + * @var mixed */ protected $originalDelivery; /** * * - * @var AddressModel + * @var mixed */ protected $customerInvoice; /** * * - * @var AddressModel + * @var mixed */ protected $customerDelivery; /** * * - * @var AddressModel + * @var mixed */ protected $paymentMethodInvoice; /** * * - * @var AddressModel + * @var mixed */ protected $paymentMethodDelivery; /** * * - * @return AddressModel + * @return mixed */ - public function getOriginalInvoice() : AddressModel + public function getOriginalInvoice() { return $this->originalInvoice; } /** * * - * @param AddressModel $originalInvoice + * @param mixed $originalInvoice * * @return self */ - public function setOriginalInvoice(AddressModel $originalInvoice) : self + public function setOriginalInvoice($originalInvoice) : self { $this->originalInvoice = $originalInvoice; return $this; @@ -64,20 +64,20 @@ public function setOriginalInvoice(AddressModel $originalInvoice) : self /** * * - * @return AddressModel + * @return mixed */ - public function getOriginalDelivery() : AddressModel + public function getOriginalDelivery() { return $this->originalDelivery; } /** * * - * @param AddressModel $originalDelivery + * @param mixed $originalDelivery * * @return self */ - public function setOriginalDelivery(AddressModel $originalDelivery) : self + public function setOriginalDelivery($originalDelivery) : self { $this->originalDelivery = $originalDelivery; return $this; @@ -85,20 +85,20 @@ public function setOriginalDelivery(AddressModel $originalDelivery) : self /** * * - * @return AddressModel + * @return mixed */ - public function getCustomerInvoice() : AddressModel + public function getCustomerInvoice() { return $this->customerInvoice; } /** * * - * @param AddressModel $customerInvoice + * @param mixed $customerInvoice * * @return self */ - public function setCustomerInvoice(AddressModel $customerInvoice) : self + public function setCustomerInvoice($customerInvoice) : self { $this->customerInvoice = $customerInvoice; return $this; @@ -106,20 +106,20 @@ public function setCustomerInvoice(AddressModel $customerInvoice) : self /** * * - * @return AddressModel + * @return mixed */ - public function getCustomerDelivery() : AddressModel + public function getCustomerDelivery() { return $this->customerDelivery; } /** * * - * @param AddressModel $customerDelivery + * @param mixed $customerDelivery * * @return self */ - public function setCustomerDelivery(AddressModel $customerDelivery) : self + public function setCustomerDelivery($customerDelivery) : self { $this->customerDelivery = $customerDelivery; return $this; @@ -127,20 +127,20 @@ public function setCustomerDelivery(AddressModel $customerDelivery) : self /** * * - * @return AddressModel + * @return mixed */ - public function getPaymentMethodInvoice() : AddressModel + public function getPaymentMethodInvoice() { return $this->paymentMethodInvoice; } /** * * - * @param AddressModel $paymentMethodInvoice + * @param mixed $paymentMethodInvoice * * @return self */ - public function setPaymentMethodInvoice(AddressModel $paymentMethodInvoice) : self + public function setPaymentMethodInvoice($paymentMethodInvoice) : self { $this->paymentMethodInvoice = $paymentMethodInvoice; return $this; @@ -148,20 +148,20 @@ public function setPaymentMethodInvoice(AddressModel $paymentMethodInvoice) : se /** * * - * @return AddressModel + * @return mixed */ - public function getPaymentMethodDelivery() : AddressModel + public function getPaymentMethodDelivery() { return $this->paymentMethodDelivery; } /** * * - * @param AddressModel $paymentMethodDelivery + * @param mixed $paymentMethodDelivery * * @return self */ - public function setPaymentMethodDelivery(AddressModel $paymentMethodDelivery) : self + public function setPaymentMethodDelivery($paymentMethodDelivery) : self { $this->paymentMethodDelivery = $paymentMethodDelivery; return $this; diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index 1989bfc1..cadc754a 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -29,22 +29,22 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object = new \Starweb\Api\Generated\Model\OrderAddressModel(); if (property_exists($data, 'originalInvoice')) { - $object->setOriginalInvoice($this->denormalizer->denormalize($data->{'originalInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + $object->setOriginalInvoice($data->{'originalInvoice'}); } if (property_exists($data, 'originalDelivery')) { - $object->setOriginalDelivery($this->denormalizer->denormalize($data->{'originalDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + $object->setOriginalDelivery($data->{'originalDelivery'}); } if (property_exists($data, 'customerInvoice')) { - $object->setCustomerInvoice($this->denormalizer->denormalize($data->{'customerInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + $object->setCustomerInvoice($data->{'customerInvoice'}); } if (property_exists($data, 'customerDelivery')) { - $object->setCustomerDelivery($this->denormalizer->denormalize($data->{'customerDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + $object->setCustomerDelivery($data->{'customerDelivery'}); } if (property_exists($data, 'paymentMethodInvoice')) { - $object->setPaymentMethodInvoice($this->denormalizer->denormalize($data->{'paymentMethodInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + $object->setPaymentMethodInvoice($data->{'paymentMethodInvoice'}); } if (property_exists($data, 'paymentMethodDelivery')) { - $object->setPaymentMethodDelivery($this->denormalizer->denormalize($data->{'paymentMethodDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + $object->setPaymentMethodDelivery($data->{'paymentMethodDelivery'}); } return $object; } @@ -52,22 +52,22 @@ public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); if (null !== $object->getOriginalInvoice()) { - $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); + $data->{'originalInvoice'} = $object->getOriginalInvoice(); } if (null !== $object->getOriginalDelivery()) { - $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); + $data->{'originalDelivery'} = $object->getOriginalDelivery(); } if (null !== $object->getCustomerInvoice()) { - $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); + $data->{'customerInvoice'} = $object->getCustomerInvoice(); } if (null !== $object->getCustomerDelivery()) { - $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); + $data->{'customerDelivery'} = $object->getCustomerDelivery(); } if (null !== $object->getPaymentMethodInvoice()) { - $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); + $data->{'paymentMethodInvoice'} = $object->getPaymentMethodInvoice(); } if (null !== $object->getPaymentMethodDelivery()) { - $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); + $data->{'paymentMethodDelivery'} = $object->getPaymentMethodDelivery(); } return $data; } From ccfc11a79279f4dcdf2779a92f245aa8e80219a1 Mon Sep 17 00:00:00 2001 From: Tim Kolmogorov Date: Mon, 14 Sep 2020 13:25:24 +0200 Subject: [PATCH 62/87] Sets approvedAt property to nullable --- resources/specification/openapi.json | 3 ++- src/Api/Generated/Model/CustomerModel.php | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 1f9cc062..31a2ba67 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -9954,7 +9954,8 @@ "type": "string", "description": "A timestamp of when the customer was was approved\/disapproved. The time should be formatted using ISO-8601", "example": "2019-11-28T13:38:17+01:00", - "readOnly": true + "readOnly": true, + "nullable": true }, "pricelistId": { "type": "integer", diff --git a/src/Api/Generated/Model/CustomerModel.php b/src/Api/Generated/Model/CustomerModel.php index cc60f4c3..23fd506f 100644 --- a/src/Api/Generated/Model/CustomerModel.php +++ b/src/Api/Generated/Model/CustomerModel.php @@ -67,7 +67,7 @@ class CustomerModel /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $approvedAt; /** @@ -289,20 +289,20 @@ public function setApproved(?bool $approved) : self /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getApprovedAt() : string + public function getApprovedAt() : ?string { return $this->approvedAt; } /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @param string $approvedAt + * @param string|null $approvedAt * * @return self */ - public function setApprovedAt(string $approvedAt) : self + public function setApprovedAt(?string $approvedAt) : self { $this->approvedAt = $approvedAt; return $this; From 767a2fc71c6a9484949f2a68bbd8f52cc9857018 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 15:45:30 +0200 Subject: [PATCH 63/87] remove the security scheme definition to bypass error in jane generation --- resources/specification/openapi.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 1f9cc062..a0187e6b 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -14480,16 +14480,6 @@ } }, "securitySchemes": { - "oauth2": { - "type": "oauth2", - "description": "OAuth 2.0 using Client Credentials", - "flows": { - "clientCredentials": { - "tokenUrl": "http:\/\/dev-shop.sws.local\/api\/v2\/token", - "scopes": {} - } - } - } }, "responses": { "ItemDeleted": { From 2f1e0495d63f00a8e6f98bb0650e3ddb974b64bb Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 15:45:50 +0200 Subject: [PATCH 64/87] set strict mode to false and regenerate client --- .jane-openapi | 3 +- composer.json | 3 +- src/Api/Generated/Client.php | 2 +- .../Normalizer/AddressModelItemNormalizer.php | 2 +- .../Normalizer/AddressModelNormalizer.php | 2 +- ...ndledProductsModelCollectionNormalizer.php | 2 +- .../BundledProductsModelItemNormalizer.php | 2 +- .../BundledProductsModelNormalizer.php | 7 +- .../ClientCredentialModelNormalizer.php | 2 +- .../CurrencyCollectionNormalizer.php | 2 +- .../CurrencyModelItemNormalizer.php | 2 +- .../Normalizer/CurrencyModelNormalizer.php | 2 +- ...tomerAddedTagModelCollectionNormalizer.php | 2 +- .../CustomerAddedTagModelItemNormalizer.php | 2 +- .../CustomerAddedTagModelNormalizer.php | 2 +- ...AddressesModelCollectionDataNormalizer.php | 2 +- ...omerAddressesModelCollectionNormalizer.php | 2 +- .../CustomerAddressesModelItemNormalizer.php | 2 +- .../CustomerCreatedModelItemNormalizer.php | 2 +- .../CustomerCreatedModelNormalizer.php | 12 +- ...ernalServicesModelCollectionNormalizer.php | 2 +- ...merExternalServicesModelItemNormalizer.php | 2 +- ...ustomerExternalServicesModelNormalizer.php | 2 +- .../CustomerModelCollectionMetaNormalizer.php | 2 +- .../CustomerModelCollectionNormalizer.php | 2 +- .../CustomerModelItemNormalizer.php | 2 +- .../Normalizer/CustomerModelNormalizer.php | 12 +- .../CustomerTagModelCollectionNormalizer.php | 2 +- .../CustomerTagModelItemNormalizer.php | 2 +- .../Normalizer/CustomerTagModelNormalizer.php | 2 +- ...CustomerUpdateModelAddressesNormalizer.php | 2 +- .../CustomerUpdateModelNormalizer.php | 7 +- .../Normalizer/ErrorModelNormalizer.php | 2 +- .../Normalizer/JaneObjectNormalizer.php | 48 +++++ ...MediaFileModelCollectionMetaNormalizer.php | 2 +- .../MediaFileModelCollectionNormalizer.php | 2 +- .../MediaFileModelItemNormalizer.php | 2 +- .../Normalizer/MediaFileModelNormalizer.php | 2 +- .../MediaFileUploadModelNormalizer.php | 2 +- .../Normalizer/NormalizerFactory.php | 202 +----------------- .../OrderAddressCollectionNormalizer.php | 2 +- .../OrderAddressModelNormalizer.php | 2 +- .../OrderCommentModelCollectionNormalizer.php | 2 +- .../OrderCommentModelItemNormalizer.php | 2 +- .../OrderCommentModelNormalizer.php | 2 +- ...ternalServiceModelCollectionNormalizer.php | 2 +- .../OrderExternalServiceModelNormalizer.php | 2 +- ...derExternalServicesModelItemNormalizer.php | 2 +- ...BundledModelItemBundledItemsNormalizer.php | 2 +- .../OrderItemBundledModelItemNormalizer.php | 2 +- ...rItemModelCollectionDataItemNormalizer.php | 2 +- .../OrderItemModelCollectionNormalizer.php | 2 +- .../OrderItemModelItemNormalizer.php | 2 +- .../Normalizer/OrderItemModelNormalizer.php | 2 +- .../OrderModelCollectionMetaNormalizer.php | 2 +- .../OrderModelCollectionNormalizer.php | 2 +- .../Normalizer/OrderModelItemNormalizer.php | 2 +- .../Normalizer/OrderModelNormalizer.php | 2 +- .../Normalizer/OrderPutModelNormalizer.php | 2 +- ...tatusLanguageModelCollectionNormalizer.php | 2 +- .../OrderStatusLanguageModelNormalizer.php | 2 +- .../OrderStatusModelCollectionNormalizer.php | 2 +- .../OrderStatusModelItemNormalizer.php | 2 +- .../Normalizer/OrderStatusModelNormalizer.php | 2 +- .../Normalizer/OrderUpdateModelNormalizer.php | 2 +- .../Normalizer/PaginationModelNormalizer.php | 2 +- ...ethodLanguageModelCollectionNormalizer.php | 2 +- .../PaymentMethodLanguageModelNormalizer.php | 2 +- ...PaymentMethodModelCollectionNormalizer.php | 2 +- .../PaymentMethodModelItemNormalizer.php | 2 +- .../PaymentMethodModelNormalizer.php | 27 ++- .../PricelistModelCollectionNormalizer.php | 2 +- .../PricelistModelItemNormalizer.php | 2 +- .../Normalizer/PricelistModelNormalizer.php | 17 +- ...eProductPriceModelCollectionNormalizer.php | 2 +- ...tBundleProductPriceModelItemNormalizer.php | 2 +- ...oductBundleProductPriceModelNormalizer.php | 7 +- ...goryLanguagesModelCollectionNormalizer.php | 2 +- ...roductCategoryLanguagesModelNormalizer.php | 27 ++- ...tCategoryLinkModelCollectionNormalizer.php | 2 +- ...ProductCategoryLinkModelItemNormalizer.php | 2 +- .../ProductCategoryLinkModelNormalizer.php | 2 +- ...tCategoryModelCollectionMetaNormalizer.php | 2 +- ...oductCategoryModelCollectionNormalizer.php | 2 +- .../ProductCategoryModelItemNormalizer.php | 2 +- .../ProductCategoryModelNormalizer.php | 27 ++- ...roductCategoryModelUpdatableNormalizer.php | 27 ++- ...oductLanguageModelCollectionNormalizer.php | 2 +- .../ProductLanguageModelItemNormalizer.php | 2 +- .../ProductLanguageModelNormalizer.php | 2 +- .../ProductLanguageSlimModelNormalizer.php | 2 +- ...tManufacturerModelCollectionNormalizer.php | 2 +- ...ProductManufacturerModelItemNormalizer.php | 2 +- .../ProductManufacturerModelNormalizer.php | 17 +- ...MediaFileLinkModelCollectionNormalizer.php | 2 +- ...roductMediaFileLinkModelItemNormalizer.php | 2 +- .../ProductMediaFileLinkModelNormalizer.php | 2 +- ...oductMetaDataModelCollectionNormalizer.php | 2 +- .../ProductMetaDataModelItemNormalizer.php | 2 +- .../ProductMetaDataModelNormalizer.php | 2 +- ...roductMetaDataModelUpdatableNormalizer.php | 2 +- ...aTypeLanguageModelCollectionNormalizer.php | 2 +- ...uctMetaDataTypeLanguageModelNormalizer.php | 2 +- ...tMetaDataTypeModelCollectionNormalizer.php | 2 +- ...ProductMetaDataTypeModelItemNormalizer.php | 2 +- .../ProductMetaDataTypeModelNormalizer.php | 2 +- ...ctMetaDataTypeModelUpdatableNormalizer.php | 2 +- ...aLanguageDataModelCollectionNormalizer.php | 2 +- ...uctMetaLanguageDataModelItemNormalizer.php | 2 +- ...ProductMetaLanguageDataModelNormalizer.php | 2 +- .../ProductModelCollectionMetaNormalizer.php | 2 +- .../ProductModelCollectionNormalizer.php | 2 +- .../Normalizer/ProductModelItemNormalizer.php | 2 +- .../ProductModelLanguagesNormalizer.php | 2 +- .../Normalizer/ProductModelNormalizer.php | 37 +++- .../ProductModelPatchableNormalizer.php | 52 ++++- .../ProductModelUpdatableNormalizer.php | 52 ++++- ...ductStockStatusLanguageModelNormalizer.php | 2 +- ...ctStockStatusModelCollectionNormalizer.php | 2 +- .../ProductStockStatusModelItemNormalizer.php | 2 +- ...oductStockStatusRequestModelNormalizer.php | 7 +- ...StatusResponseModelLanguagesNormalizer.php | 2 +- ...ductStockStatusResponseModelNormalizer.php | 7 +- .../ProductTagLanguageModelNormalizer.php | 2 +- ...roductTagLinkModelCollectionNormalizer.php | 2 +- .../ProductTagLinkModelItemNormalizer.php | 2 +- .../ProductTagLinkModelNormalizer.php | 2 +- ...oductTagLinkPostRequestModelNormalizer.php | 2 +- .../ProductTagModelCollectionNormalizer.php | 2 +- .../ProductTagModelItemNormalizer.php | 2 +- .../Normalizer/ProductTagModelNormalizer.php | 2 +- ...roductTagOptionLanguageModelNormalizer.php | 2 +- ...ductTagOptionModelCollectionNormalizer.php | 2 +- .../ProductTagOptionModelItemNormalizer.php | 2 +- .../ProductTagOptionModelNormalizer.php | 2 +- ...ctTagOptionPatchRequestModelNormalizer.php | 2 +- ...uctTagOptionPostRequestModelNormalizer.php | 2 +- ...ductTagOptionPutRequestModelNormalizer.php | 2 +- .../ProductTagPatchRequestModelNormalizer.php | 2 +- .../ProductTagPostRequestModelNormalizer.php | 2 +- .../ProductTagPutRequestModelNormalizer.php | 2 +- ...tUnitLanguageModelCollectionNormalizer.php | 2 +- .../ProductUnitLanguageModelNormalizer.php | 2 +- .../ProductUnitModelCollectionNormalizer.php | 2 +- .../ProductUnitModelItemNormalizer.php | 2 +- .../Normalizer/ProductUnitModelNormalizer.php | 12 +- .../ProductUnitModelUpdatableNormalizer.php | 12 +- ...ariantAttributeLanguageModelNormalizer.php | 2 +- ...iantAttributeModelCollectionNormalizer.php | 2 +- ...uctVariantAttributeModelItemNormalizer.php | 2 +- ...riantAttributeModelLanguagesNormalizer.php | 2 +- ...ProductVariantAttributeModelNormalizer.php | 12 +- ...riantAttributeModelUpdatableNormalizer.php | 12 +- ...tAttributeValueLanguageModelNormalizer.php | 2 +- ...ttributeValueModelCollectionNormalizer.php | 2 +- ...riantAttributeValueModelItemNormalizer.php | 2 +- ...AttributeValueModelLanguagesNormalizer.php | 2 +- ...ctVariantAttributeValueModelNormalizer.php | 12 +- ...AttributeValueModelUpdatableNormalizer.php | 12 +- ...roductVariantModelCollectionNormalizer.php | 2 +- .../ProductVariantModelItemNormalizer.php | 2 +- ...ductVariantPatchRequestModelNormalizer.php | 67 ++++-- ...tVariantPriceModelCollectionNormalizer.php | 2 +- ...ProductVariantPriceModelItemNormalizer.php | 2 +- .../ProductVariantPriceModelNormalizer.php | 17 +- ...roductVariantPutRequestModelNormalizer.php | 67 ++++-- .../ProductVariantRequestModelNormalizer.php | 62 ++++-- .../ProductVariantResponseModelNormalizer.php | 62 ++++-- ...tVariantStockModelCollectionNormalizer.php | 2 +- ...ProductVariantStockModelItemNormalizer.php | 2 +- ...tVariantStockPutRequestModelNormalizer.php | 2 +- ...uctVariantStockResponseModelNormalizer.php | 2 +- ...ntVolumePriceModelCollectionNormalizer.php | 2 +- ...tVariantVolumePriceModelItemNormalizer.php | 2 +- ...oductVariantVolumePriceModelNormalizer.php | 12 +- ...roductVatRateModelCollectionNormalizer.php | 2 +- .../ProductVatRateModelItemNormalizer.php | 2 +- .../ProductVatRateModelNormalizer.php | 2 +- .../ProductsAttributesModelItemNormalizer.php | 2 +- ...ethodLanguageModelCollectionNormalizer.php | 2 +- .../ShippingMethodLanguageModelNormalizer.php | 2 +- ...hippingMethodModelCollectionNormalizer.php | 2 +- .../ShippingMethodModelItemNormalizer.php | 2 +- .../ShippingMethodModelNormalizer.php | 37 +++- ...gTrackingTypeModelCollectionNormalizer.php | 2 +- .../ShippingTrackingTypeModelNormalizer.php | 2 +- .../Normalizer/ShopItemNormalizer.php | 2 +- .../Normalizer/ShopModelNormalizer.php | 2 +- ...tionLanguagesModelCollectionNormalizer.php | 2 +- .../StockLocationLanguagesModelNormalizer.php | 2 +- ...StockLocationModelCollectionNormalizer.php | 2 +- .../StockLocationModelItemNormalizer.php | 2 +- .../StockLocationModelNormalizer.php | 12 +- ...tockLocationPostRequestModelNormalizer.php | 12 +- ...StockLocationPutRequestModelNormalizer.php | 12 +- .../Normalizer/TokenModelNormalizer.php | 2 +- .../VatRateModelCollectionNormalizer.php | 2 +- .../Normalizer/VatRateModelItemNormalizer.php | 2 +- .../Normalizer/VatRateModelNormalizer.php | 2 +- .../WebHookModelCollectionNormalizer.php | 2 +- .../Normalizer/WebHookModelItemNormalizer.php | 2 +- .../Normalizer/WebHookModelNormalizer.php | 7 +- 202 files changed, 827 insertions(+), 540 deletions(-) create mode 100644 src/Api/Generated/Normalizer/JaneObjectNormalizer.php diff --git a/.jane-openapi b/.jane-openapi index 29cb5523..884ea69e 100644 --- a/.jane-openapi +++ b/.jane-openapi @@ -4,4 +4,5 @@ return [ 'openapi-file' => __DIR__ . '/resources/specification/openapi.json', 'namespace' => 'Starweb\Api\Generated', 'directory' => __DIR__ . '/src/Api/Generated', -]; \ No newline at end of file + 'strict' => true +]; diff --git a/composer.json b/composer.json index 1e262d60..10ca09a9 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,8 @@ "symfony/property-info": "^4.1", "symfony/options-resolver": "^4.1", "psr/simple-cache": "^1.0", - "jane-php/jane-php": "^5.2" + "jane-php/jane-php": "^5.2", + "symfony/translation-contracts": "^2.2" }, "require-dev": { "phpunit/phpunit": "^8.1", diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 5c37bfcc..0e704e2c 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -3170,7 +3170,7 @@ public static function create($httpClient = null) } $messageFactory = \Http\Discovery\MessageFactoryDiscovery::find(); $streamFactory = \Http\Discovery\StreamFactoryDiscovery::find(); - $serializer = new \Symfony\Component\Serializer\Serializer(\Starweb\Api\Generated\Normalizer\NormalizerFactory::create(), array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode()))); + $serializer = new \Symfony\Component\Serializer\Serializer(array(new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Starweb\Api\Generated\Normalizer\JaneObjectNormalizer()), array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode()))); return new static($httpClient, $messageFactory, $serializer, $streamFactory); } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php index 97b89b70..c915c4fe 100644 --- a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\AddressModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/AddressModelNormalizer.php b/src/Api/Generated/Normalizer/AddressModelNormalizer.php index cdca0d71..d4090bda 100644 --- a/src/Api/Generated/Normalizer/AddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\AddressModel(); if (property_exists($data, 'companyName')) { diff --git a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php index f65e1482..e5fd33d8 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\BundledProductsModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php index bf97d076..0ddf9931 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\BundledProductsModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php index d11ffd95..61a7bc44 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\BundledProductsModel(); if (property_exists($data, 'singleVariant')) { @@ -37,9 +37,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'variantSku')) { $object->setVariantSku($data->{'variantSku'}); } - if (property_exists($data, 'quantity')) { + if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } + elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { + $object->setQuantity(null); + } if (property_exists($data, 'sortIndex')) { $object->setSortIndex($data->{'sortIndex'}); } diff --git a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php index 27780b79..57372819 100644 --- a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ClientCredentialModel(); if (property_exists($data, 'grant_type')) { diff --git a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php index 06cf0918..37bd632c 100644 --- a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CurrencyCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php index 52f95844..bc15b630 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CurrencyModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index 53ee9458..67fcb464 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CurrencyModel(); if (property_exists($data, 'code')) { diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php index e5a7763f..e5efc015 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php index 95322d08..46795e54 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index 319a7c32..6aa498c5 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModel(); if (property_exists($data, 'tagId')) { diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php index 1e3ede4f..85eaace2 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelCollectionData(); if (property_exists($data, 'invoice')) { diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php index a99adfee..f3bc61af 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php index 9395ca1b..5ee88e73 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php index ae6b040b..bf0c2ab7 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerCreatedModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 9e9f65cd..1aa14deb 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerCreatedModel(); if (property_exists($data, 'customerId')) { @@ -55,15 +55,21 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'modifiedAt')) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'approved')) { + if (property_exists($data, 'approved') && $data->{'approved'} !== null) { $object->setApproved($data->{'approved'}); } + elseif (property_exists($data, 'approved') && $data->{'approved'} === null) { + $object->setApproved(null); + } if (property_exists($data, 'approvedAt')) { $object->setApprovedAt($data->{'approvedAt'}); } - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php index cd05c7d5..aa491a59 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php index 69d10c95..a832ca9a 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php index 55926839..99cef397 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModel(); if (property_exists($data, 'serviceName')) { diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php index 2280eaae..f7aa51bf 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerModelCollectionMeta(); if (property_exists($data, 'pagination')) { diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php index fc0d53ae..5958e705 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php index bbef612a..f265dd6c 100644 --- a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index 7ad7af7d..fd76a2ab 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerModel(); if (property_exists($data, 'customerId')) { @@ -55,15 +55,21 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'modifiedAt')) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'approved')) { + if (property_exists($data, 'approved') && $data->{'approved'} !== null) { $object->setApproved($data->{'approved'}); } + elseif (property_exists($data, 'approved') && $data->{'approved'} === null) { + $object->setApproved(null); + } if (property_exists($data, 'approvedAt')) { $object->setApprovedAt($data->{'approvedAt'}); } - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php index b67179c9..ad1dc604 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerTagModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php index 7e4522ef..7fd8dc32 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerTagModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index 4a898615..385d1cb7 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerTagModel(); if (property_exists($data, 'tagId')) { diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php index e07d9a17..b1d621c9 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerUpdateModelAddresses(); if (property_exists($data, 'invoice')) { diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index c1f78646..b9023f85 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\CustomerUpdateModel(); if (property_exists($data, 'customerId')) { @@ -52,9 +52,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'customInfo2')) { $object->setCustomInfo2($data->{'customInfo2'}); } - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } if (property_exists($data, 'langCode')) { $object->setLangCode($data->{'langCode'}); } diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index b2f44219..e63edec6 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ErrorModel(); if (property_exists($data, 'error')) { diff --git a/src/Api/Generated/Normalizer/JaneObjectNormalizer.php b/src/Api/Generated/Normalizer/JaneObjectNormalizer.php new file mode 100644 index 00000000..20248e01 --- /dev/null +++ b/src/Api/Generated/Normalizer/JaneObjectNormalizer.php @@ -0,0 +1,48 @@ + 'Starweb\\Api\\Generated\\Normalizer\\ErrorModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaginationModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaginationModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderPutModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderPutModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderUpdateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingTrackingTypeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingTrackingTypeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\AddressModel' => 'Starweb\\Api\\Generated\\Normalizer\\AddressModelNormalizer', 'Starweb\\Api\\Generated\\Model\\AddressModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\AddressModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderAddressModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderAddressModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderAddressCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemBundledModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemBundledModelItemBundledItemsNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelCollectionDataItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServiceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServicesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServiceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyModel' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerUpdateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerUpdateModelAddressesNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerCreatedModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerCreatedModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelCollectionDataNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\TokenModel' => 'Starweb\\Api\\Generated\\Normalizer\\TokenModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel' => 'Starweb\\Api\\Generated\\Normalizer\\ClientCredentialModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModel' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileUploadModelNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModel' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLanguagesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLanguagesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelPatchableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageSlimModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusResponseModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShopModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShopModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShopItem' => 'Starweb\\Api\\Generated\\Normalizer\\ShopItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductsAttributesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModel' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModel' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModel' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationLanguagesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationLanguagesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPatchRequestModelNormalizer'), $normalizersCache = array(); + public function supportsDenormalization($data, $type, $format = null) + { + return array_key_exists($type, $this->normalizers); + } + public function supportsNormalization($data, $format = null) + { + return is_object($data) && array_key_exists(get_class($data), $this->normalizers); + } + public function normalize($object, $format = null, array $context = array()) + { + $normalizerClass = $this->normalizers[get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); + return $normalizer->normalize($object, $format, $context); + } + public function denormalize($data, $class, $format = null, array $context = array()) + { + $denormalizerClass = $this->normalizers[$class]; + $denormalizer = $this->getNormalizer($denormalizerClass); + return $denormalizer->denormalize($data, $class, $format, $context); + } + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; + return $normalizer; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php index 79eaac31..e6fbf9d3 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\MediaFileModelCollectionMeta(); if (property_exists($data, 'pagination')) { diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php index 12190217..c057985b 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\MediaFileModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php index 4833ff6b..909b38c2 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\MediaFileModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index c0dcf21a..1e3f5f08 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\MediaFileModel(); if (property_exists($data, 'mediaFileId')) { diff --git a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php index 5d8eaf9c..ba409084 100644 --- a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\MediaFileUploadModel(); if (property_exists($data, 'file')) { diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index 9fd19e15..c5caabdf 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -2,209 +2,17 @@ namespace Starweb\Api\Generated\Normalizer; +@trigger_error('The "NormalizerFactory" class is deprecated since Jane 5.3, use "JaneObjectNormalizer" instead.', E_USER_DEPRECATED); +/** + * @deprecated The "NormalizerFactory" class is deprecated since Jane 5.3, use "JaneObjectNormalizer" instead. + */ class NormalizerFactory { public static function create() { $normalizers = array(); $normalizers[] = new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(); - $normalizers[] = new ErrorModelNormalizer(); - $normalizers[] = new PaginationModelNormalizer(); - $normalizers[] = new OrderModelNormalizer(); - $normalizers[] = new OrderPutModelNormalizer(); - $normalizers[] = new OrderUpdateModelNormalizer(); - $normalizers[] = new OrderModelItemNormalizer(); - $normalizers[] = new OrderModelCollectionNormalizer(); - $normalizers[] = new OrderModelCollectionMetaNormalizer(); - $normalizers[] = new ShippingTrackingTypeModelNormalizer(); - $normalizers[] = new ShippingTrackingTypeModelCollectionNormalizer(); - $normalizers[] = new AddressModelNormalizer(); - $normalizers[] = new AddressModelItemNormalizer(); - $normalizers[] = new OrderAddressModelNormalizer(); - $normalizers[] = new OrderAddressCollectionNormalizer(); - $normalizers[] = new OrderStatusModelNormalizer(); - $normalizers[] = new OrderStatusLanguageModelNormalizer(); - $normalizers[] = new OrderStatusLanguageModelCollectionNormalizer(); - $normalizers[] = new OrderStatusModelItemNormalizer(); - $normalizers[] = new OrderStatusModelCollectionNormalizer(); - $normalizers[] = new OrderItemModelNormalizer(); - $normalizers[] = new OrderItemModelItemNormalizer(); - $normalizers[] = new OrderItemBundledModelItemNormalizer(); - $normalizers[] = new OrderItemBundledModelItemBundledItemsNormalizer(); - $normalizers[] = new OrderItemModelCollectionNormalizer(); - $normalizers[] = new OrderItemModelCollectionDataItemNormalizer(); - $normalizers[] = new OrderExternalServiceModelNormalizer(); - $normalizers[] = new OrderExternalServicesModelItemNormalizer(); - $normalizers[] = new OrderExternalServiceModelCollectionNormalizer(); - $normalizers[] = new CurrencyModelNormalizer(); - $normalizers[] = new CurrencyModelItemNormalizer(); - $normalizers[] = new CurrencyCollectionNormalizer(); - $normalizers[] = new CustomerUpdateModelNormalizer(); - $normalizers[] = new CustomerUpdateModelAddressesNormalizer(); - $normalizers[] = new CustomerModelNormalizer(); - $normalizers[] = new CustomerModelItemNormalizer(); - $normalizers[] = new CustomerCreatedModelNormalizer(); - $normalizers[] = new CustomerCreatedModelItemNormalizer(); - $normalizers[] = new CustomerModelCollectionNormalizer(); - $normalizers[] = new CustomerModelCollectionMetaNormalizer(); - $normalizers[] = new CustomerAddedTagModelNormalizer(); - $normalizers[] = new CustomerAddedTagModelItemNormalizer(); - $normalizers[] = new CustomerAddedTagModelCollectionNormalizer(); - $normalizers[] = new CustomerAddressesModelItemNormalizer(); - $normalizers[] = new CustomerAddressesModelCollectionNormalizer(); - $normalizers[] = new CustomerAddressesModelCollectionDataNormalizer(); - $normalizers[] = new CustomerExternalServicesModelNormalizer(); - $normalizers[] = new CustomerExternalServicesModelItemNormalizer(); - $normalizers[] = new CustomerExternalServicesModelCollectionNormalizer(); - $normalizers[] = new TokenModelNormalizer(); - $normalizers[] = new ClientCredentialModelNormalizer(); - $normalizers[] = new CustomerTagModelNormalizer(); - $normalizers[] = new CustomerTagModelItemNormalizer(); - $normalizers[] = new CustomerTagModelCollectionNormalizer(); - $normalizers[] = new PaymentMethodLanguageModelNormalizer(); - $normalizers[] = new PaymentMethodLanguageModelCollectionNormalizer(); - $normalizers[] = new PaymentMethodModelNormalizer(); - $normalizers[] = new PaymentMethodModelItemNormalizer(); - $normalizers[] = new PaymentMethodModelCollectionNormalizer(); - $normalizers[] = new ShippingMethodLanguageModelNormalizer(); - $normalizers[] = new ShippingMethodLanguageModelCollectionNormalizer(); - $normalizers[] = new ShippingMethodModelNormalizer(); - $normalizers[] = new ShippingMethodModelItemNormalizer(); - $normalizers[] = new ShippingMethodModelCollectionNormalizer(); - $normalizers[] = new PricelistModelNormalizer(); - $normalizers[] = new PricelistModelItemNormalizer(); - $normalizers[] = new PricelistModelCollectionNormalizer(); - $normalizers[] = new OrderCommentModelNormalizer(); - $normalizers[] = new OrderCommentModelItemNormalizer(); - $normalizers[] = new OrderCommentModelCollectionNormalizer(); - $normalizers[] = new MediaFileUploadModelNormalizer(); - $normalizers[] = new MediaFileModelNormalizer(); - $normalizers[] = new MediaFileModelItemNormalizer(); - $normalizers[] = new MediaFileModelCollectionNormalizer(); - $normalizers[] = new MediaFileModelCollectionMetaNormalizer(); - $normalizers[] = new ProductCategoryModelNormalizer(); - $normalizers[] = new ProductCategoryModelUpdatableNormalizer(); - $normalizers[] = new ProductCategoryLanguagesModelNormalizer(); - $normalizers[] = new ProductCategoryLanguagesModelCollectionNormalizer(); - $normalizers[] = new ProductCategoryModelItemNormalizer(); - $normalizers[] = new ProductCategoryModelCollectionNormalizer(); - $normalizers[] = new ProductCategoryModelCollectionMetaNormalizer(); - $normalizers[] = new ProductModelNormalizer(); - $normalizers[] = new ProductModelLanguagesNormalizer(); - $normalizers[] = new ProductModelUpdatableNormalizer(); - $normalizers[] = new ProductModelPatchableNormalizer(); - $normalizers[] = new ProductModelItemNormalizer(); - $normalizers[] = new ProductModelCollectionNormalizer(); - $normalizers[] = new ProductModelCollectionMetaNormalizer(); - $normalizers[] = new ProductVariantModelItemNormalizer(); - $normalizers[] = new ProductVariantModelCollectionNormalizer(); - $normalizers[] = new ProductVariantRequestModelNormalizer(); - $normalizers[] = new ProductVariantPutRequestModelNormalizer(); - $normalizers[] = new ProductVariantPatchRequestModelNormalizer(); - $normalizers[] = new ProductVariantResponseModelNormalizer(); - $normalizers[] = new ProductMediaFileLinkModelItemNormalizer(); - $normalizers[] = new ProductMediaFileLinkModelCollectionNormalizer(); - $normalizers[] = new ProductMediaFileLinkModelNormalizer(); - $normalizers[] = new ProductLanguageModelItemNormalizer(); - $normalizers[] = new ProductLanguageModelCollectionNormalizer(); - $normalizers[] = new ProductLanguageModelNormalizer(); - $normalizers[] = new ProductLanguageSlimModelNormalizer(); - $normalizers[] = new ProductVatRateModelItemNormalizer(); - $normalizers[] = new ProductVatRateModelCollectionNormalizer(); - $normalizers[] = new ProductVatRateModelNormalizer(); - $normalizers[] = new ProductCategoryLinkModelItemNormalizer(); - $normalizers[] = new ProductCategoryLinkModelCollectionNormalizer(); - $normalizers[] = new ProductCategoryLinkModelNormalizer(); - $normalizers[] = new ProductMetaDataModelItemNormalizer(); - $normalizers[] = new ProductMetaDataModelCollectionNormalizer(); - $normalizers[] = new ProductMetaDataModelUpdatableNormalizer(); - $normalizers[] = new ProductMetaDataModelNormalizer(); - $normalizers[] = new ProductMetaLanguageDataModelItemNormalizer(); - $normalizers[] = new ProductMetaLanguageDataModelCollectionNormalizer(); - $normalizers[] = new ProductMetaLanguageDataModelNormalizer(); - $normalizers[] = new ProductUnitModelCollectionNormalizer(); - $normalizers[] = new ProductUnitModelItemNormalizer(); - $normalizers[] = new ProductUnitModelNormalizer(); - $normalizers[] = new ProductUnitModelUpdatableNormalizer(); - $normalizers[] = new ProductUnitLanguageModelCollectionNormalizer(); - $normalizers[] = new ProductUnitLanguageModelNormalizer(); - $normalizers[] = new ProductVariantPriceModelItemNormalizer(); - $normalizers[] = new ProductVariantPriceModelCollectionNormalizer(); - $normalizers[] = new ProductVariantPriceModelNormalizer(); - $normalizers[] = new ProductVariantVolumePriceModelItemNormalizer(); - $normalizers[] = new ProductVariantVolumePriceModelCollectionNormalizer(); - $normalizers[] = new ProductVariantVolumePriceModelNormalizer(); - $normalizers[] = new ProductManufacturerModelItemNormalizer(); - $normalizers[] = new ProductManufacturerModelCollectionNormalizer(); - $normalizers[] = new ProductManufacturerModelNormalizer(); - $normalizers[] = new ProductMetaDataTypeModelCollectionNormalizer(); - $normalizers[] = new ProductMetaDataTypeModelItemNormalizer(); - $normalizers[] = new ProductMetaDataTypeModelNormalizer(); - $normalizers[] = new ProductMetaDataTypeModelUpdatableNormalizer(); - $normalizers[] = new ProductMetaDataTypeLanguageModelCollectionNormalizer(); - $normalizers[] = new ProductMetaDataTypeLanguageModelNormalizer(); - $normalizers[] = new ProductStockStatusResponseModelNormalizer(); - $normalizers[] = new ProductStockStatusResponseModelLanguagesNormalizer(); - $normalizers[] = new ProductStockStatusRequestModelNormalizer(); - $normalizers[] = new ProductStockStatusLanguageModelNormalizer(); - $normalizers[] = new ProductStockStatusModelItemNormalizer(); - $normalizers[] = new ProductStockStatusModelCollectionNormalizer(); - $normalizers[] = new ShopModelNormalizer(); - $normalizers[] = new ShopItemNormalizer(); - $normalizers[] = new ProductVariantAttributeValueModelItemNormalizer(); - $normalizers[] = new ProductVariantAttributeValueModelCollectionNormalizer(); - $normalizers[] = new ProductVariantAttributeValueModelUpdatableNormalizer(); - $normalizers[] = new ProductVariantAttributeValueLanguageModelNormalizer(); - $normalizers[] = new ProductVariantAttributeValueModelNormalizer(); - $normalizers[] = new ProductVariantAttributeValueModelLanguagesNormalizer(); - $normalizers[] = new ProductVariantAttributeModelItemNormalizer(); - $normalizers[] = new ProductVariantAttributeModelCollectionNormalizer(); - $normalizers[] = new ProductVariantAttributeModelUpdatableNormalizer(); - $normalizers[] = new ProductVariantAttributeLanguageModelNormalizer(); - $normalizers[] = new ProductVariantAttributeModelNormalizer(); - $normalizers[] = new ProductVariantAttributeModelLanguagesNormalizer(); - $normalizers[] = new ProductsAttributesModelItemNormalizer(); - $normalizers[] = new VatRateModelItemNormalizer(); - $normalizers[] = new VatRateModelCollectionNormalizer(); - $normalizers[] = new VatRateModelNormalizer(); - $normalizers[] = new WebHookModelNormalizer(); - $normalizers[] = new WebHookModelItemNormalizer(); - $normalizers[] = new WebHookModelCollectionNormalizer(); - $normalizers[] = new BundledProductsModelCollectionNormalizer(); - $normalizers[] = new BundledProductsModelItemNormalizer(); - $normalizers[] = new BundledProductsModelNormalizer(); - $normalizers[] = new StockLocationModelNormalizer(); - $normalizers[] = new StockLocationPostRequestModelNormalizer(); - $normalizers[] = new StockLocationPutRequestModelNormalizer(); - $normalizers[] = new StockLocationLanguagesModelNormalizer(); - $normalizers[] = new StockLocationLanguagesModelCollectionNormalizer(); - $normalizers[] = new StockLocationModelItemNormalizer(); - $normalizers[] = new StockLocationModelCollectionNormalizer(); - $normalizers[] = new ProductVariantStockModelItemNormalizer(); - $normalizers[] = new ProductVariantStockModelCollectionNormalizer(); - $normalizers[] = new ProductVariantStockResponseModelNormalizer(); - $normalizers[] = new ProductVariantStockPutRequestModelNormalizer(); - $normalizers[] = new ProductBundleProductPriceModelItemNormalizer(); - $normalizers[] = new ProductBundleProductPriceModelCollectionNormalizer(); - $normalizers[] = new ProductBundleProductPriceModelNormalizer(); - $normalizers[] = new ProductTagModelNormalizer(); - $normalizers[] = new ProductTagLanguageModelNormalizer(); - $normalizers[] = new ProductTagPostRequestModelNormalizer(); - $normalizers[] = new ProductTagModelItemNormalizer(); - $normalizers[] = new ProductTagModelCollectionNormalizer(); - $normalizers[] = new ProductTagPutRequestModelNormalizer(); - $normalizers[] = new ProductTagPatchRequestModelNormalizer(); - $normalizers[] = new ProductTagLinkModelItemNormalizer(); - $normalizers[] = new ProductTagLinkModelCollectionNormalizer(); - $normalizers[] = new ProductTagLinkModelNormalizer(); - $normalizers[] = new ProductTagLinkPostRequestModelNormalizer(); - $normalizers[] = new ProductTagOptionModelNormalizer(); - $normalizers[] = new ProductTagOptionLanguageModelNormalizer(); - $normalizers[] = new ProductTagOptionPostRequestModelNormalizer(); - $normalizers[] = new ProductTagOptionModelItemNormalizer(); - $normalizers[] = new ProductTagOptionModelCollectionNormalizer(); - $normalizers[] = new ProductTagOptionPutRequestModelNormalizer(); - $normalizers[] = new ProductTagOptionPatchRequestModelNormalizer(); + $normalizers[] = new \Starweb\Api\Generated\Normalizer\JaneObjectNormalizer(); return $normalizers; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php index 4cdbb0ae..7c726a52 100644 --- a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderAddressCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index cadc754a..7ad22e81 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderAddressModel(); if (property_exists($data, 'originalInvoice')) { diff --git a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php index 968dc9d4..273be382 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderCommentModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php index 0d7b2aeb..ebf036f9 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderCommentModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index 0004b063..b71650d0 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderCommentModel(); if (property_exists($data, 'commentId')) { diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php index 2b5916f7..688086df 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderExternalServiceModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index c52c81b7..c6b3f8c6 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderExternalServiceModel(); if (property_exists($data, 'serviceName')) { diff --git a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php index 949932dd..f2dbc70c 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderExternalServicesModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php index c38592f8..7de08190 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderItemBundledModelItemBundledItems(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php index ae8e819a..352d2028 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderItemBundledModelItem(); if (property_exists($data, 'bundledItems')) { diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php index e08885ab..e48d98d4 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderItemModelCollectionDataItem(); if (property_exists($data, 'itemId')) { diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php index b3f5f9ea..d59c585b 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderItemModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php index 49fb8965..2e1b7657 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderItemModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index 2e8214cb..bbcf9334 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderItemModel(); if (property_exists($data, 'itemId')) { diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php index c7f48ff5..4bb552a4 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderModelCollectionMeta(); if (property_exists($data, 'pagination')) { diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php index 8f309e84..5ef2e91d 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php index 40d34d7b..ef562b43 100644 --- a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 5682f2db..9224a639 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderModel(); if (property_exists($data, 'orderId')) { diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index 6f22d05e..3485a41c 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderPutModel(); if (property_exists($data, 'orderId')) { diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php index 9cf3866f..557091f7 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderStatusLanguageModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php index 9949241d..dd03fe16 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderStatusLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php index eb005f78..064fe8a8 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderStatusModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php index 41c5cfa3..142eb632 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderStatusModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index ac6612ac..62114a94 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderStatusModel(); if (property_exists($data, 'statusId')) { diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index e22c968c..f9ce1803 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\OrderUpdateModel(); if (property_exists($data, 'orderId')) { diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index ef32a89e..3fd9b8c8 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PaginationModel(); if (property_exists($data, 'current_page')) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php index c2034a2d..edc28f07 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PaymentMethodLanguageModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index 74ef0797..72d84909 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PaymentMethodLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php index 9b9ed629..6fe9f384 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PaymentMethodModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php index 3d761b82..bf477dfd 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PaymentMethodModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index efc8e504..70a7e8aa 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PaymentMethodModel(); if (property_exists($data, 'paymentMethodId')) { @@ -50,24 +50,39 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setValidCountriesSelected($values); } - if (property_exists($data, 'validForMinItemsSubtotal')) { + if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); } - if (property_exists($data, 'validForMaxItemsSubtotal')) { + elseif (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} === null) { + $object->setValidForMinItemsSubtotal(null); + } + if (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} !== null) { $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'}); } - if (property_exists($data, 'validForMinWeight')) { + elseif (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} === null) { + $object->setValidForMaxItemsSubtotal(null); + } + if (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} !== null) { $object->setValidForMinWeight($data->{'validForMinWeight'}); } - if (property_exists($data, 'validForMaxWeight')) { + elseif (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} === null) { + $object->setValidForMinWeight(null); + } + if (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} !== null) { $object->setValidForMaxWeight($data->{'validForMaxWeight'}); } + elseif (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} === null) { + $object->setValidForMaxWeight(null); + } if (property_exists($data, 'validForShippingMethods')) { $object->setValidForShippingMethods($data->{'validForShippingMethods'}); } - if (property_exists($data, 'validForCustomerType')) { + if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { $object->setValidForCustomerType($data->{'validForCustomerType'}); } + elseif (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} === null) { + $object->setValidForCustomerType(null); + } if (property_exists($data, 'isClickAndCollect')) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } diff --git a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php index cc89c20a..db58717d 100644 --- a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PricelistModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php index 45dcddfe..f193a253 100644 --- a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PricelistModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 426fa7bb..5df2c952 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\PricelistModel(); if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } @@ -59,9 +65,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'currencyCode')) { $object->setCurrencyCode($data->{'currencyCode'}); } - if (property_exists($data, 'parentPricelistId')) { + if (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} !== null) { $object->setParentPricelistId($data->{'parentPricelistId'}); } + elseif (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} === null) { + $object->setParentPricelistId(null); + } if (property_exists($data, 'isCustomerPricelist')) { $object->setIsCustomerPricelist($data->{'isCustomerPricelist'}); } diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php index 59e53e62..f5928eff 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php index 3757a993..a722b123 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php index 75bcdca4..bfbc216e 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php @@ -25,15 +25,18 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModel(); if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } - if (property_exists($data, 'specialPriceExVat')) { + if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } + elseif (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} === null) { + $object->setSpecialPriceExVat(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php index efd2c698..11288b41 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLanguagesModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php index 572bb44b..f201b3d1 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLanguagesModel(); if (property_exists($data, 'langCode')) { @@ -34,21 +34,36 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } - if (property_exists($data, 'pageTitle')) { + if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { $object->setPageTitle($data->{'pageTitle'}); } - if (property_exists($data, 'description')) { + elseif (property_exists($data, 'pageTitle') && $data->{'pageTitle'} === null) { + $object->setPageTitle(null); + } + if (property_exists($data, 'description') && $data->{'description'} !== null) { $object->setDescription($data->{'description'}); } - if (property_exists($data, 'bottomDescription')) { + elseif (property_exists($data, 'description') && $data->{'description'} === null) { + $object->setDescription(null); + } + if (property_exists($data, 'bottomDescription') && $data->{'bottomDescription'} !== null) { $object->setBottomDescription($data->{'bottomDescription'}); } - if (property_exists($data, 'pageMetaDescription')) { + elseif (property_exists($data, 'bottomDescription') && $data->{'bottomDescription'} === null) { + $object->setBottomDescription(null); + } + if (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} !== null) { $object->setPageMetaDescription($data->{'pageMetaDescription'}); } - if (property_exists($data, 'permalink')) { + elseif (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} === null) { + $object->setPageMetaDescription(null); + } + if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { $object->setPermalink($data->{'permalink'}); } + elseif (property_exists($data, 'permalink') && $data->{'permalink'} === null) { + $object->setPermalink(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php index 0d8dcf50..27a88a03 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php index 70909d40..be0ae183 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php index 77616a85..4798b5fb 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModel(); if (property_exists($data, 'categoryId')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php index 21b92ba9..77950586 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelCollectionMeta(); if (property_exists($data, 'pagination')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php index dd5c3213..76764890 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php index a07acd34..72a9556d 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 691b3073..0bf38669 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -25,15 +25,18 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModel(); if (property_exists($data, 'categoryId')) { $object->setCategoryId($data->{'categoryId'}); } - if (property_exists($data, 'parentId')) { + if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { $object->setParentId($data->{'parentId'}); } + elseif (property_exists($data, 'parentId') && $data->{'parentId'} === null) { + $object->setParentId(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -43,18 +46,30 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'openPage')) { $object->setOpenPage($data->{'openPage'}); } - if (property_exists($data, 'imageFileId')) { + if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - if (property_exists($data, 'externalId')) { + elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { + $object->setImageFileId(null); + } + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalType') && $data->{'externalType'} !== null) { $object->setExternalType($data->{'externalType'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalType') && $data->{'externalType'} === null) { + $object->setExternalType(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'hasChildren')) { $object->setHasChildren($data->{'hasChildren'}); } diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index a902c4b9..b32ce9e0 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -25,15 +25,18 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable(); if (property_exists($data, 'categoryId')) { $object->setCategoryId($data->{'categoryId'}); } - if (property_exists($data, 'parentId')) { + if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { $object->setParentId($data->{'parentId'}); } + elseif (property_exists($data, 'parentId') && $data->{'parentId'} === null) { + $object->setParentId(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -43,18 +46,30 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'openPage')) { $object->setOpenPage($data->{'openPage'}); } - if (property_exists($data, 'imageFileId')) { + if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - if (property_exists($data, 'externalId')) { + elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { + $object->setImageFileId(null); + } + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalType') && $data->{'externalType'} !== null) { $object->setExternalType($data->{'externalType'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalType') && $data->{'externalType'} === null) { + $object->setExternalType(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'hasChildren')) { $object->setHasChildren($data->{'hasChildren'}); } diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php index 9b586428..7f11fe00 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductLanguageModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php index b0372006..cffd3768 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductLanguageModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php index aae2e9e2..4bb0742f 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php index 8cb9f68e..713772b2 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductLanguageSlimModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php index db1b2bdc..243bbe23 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php index b7174c7c..607943fd 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index bea6fe9c..43de8f19 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -25,24 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModel(); if (property_exists($data, 'manufacturerId')) { $object->setManufacturerId($data->{'manufacturerId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'name')) { $object->setName($data->{'name'}); } - if (property_exists($data, 'url')) { + if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } + elseif (property_exists($data, 'url') && $data->{'url'} === null) { + $object->setUrl(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php index 3b193305..e6cf081a 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php index 6461dea7..18288e1a 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index 95960dd1..ab6a742e 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModel(); if (property_exists($data, 'productMediaFileId')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php index 9cbe31a7..fe3cd699 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php index 79b7b0be..eefd17ba 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php index 65bc5f96..e2f90437 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModel(); if (property_exists($data, 'metaDataId')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index c724f3e2..5da5b321 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable(); if (property_exists($data, 'metaDataId')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php index c0cbcd0d..b7eec1ef 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeLanguageModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php index 9af55bb6..940f21aa 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php index 03765020..d662ea49 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php index 43f52e7f..22cb2685 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index ca1cf2a0..2f3b97f0 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModel(); if (property_exists($data, 'metaDataTypeId')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php index 7e880738..e0764307 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable(); if (property_exists($data, 'languages')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php index 44f1cd2c..450b18fe 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php index 438f5774..2fe88510 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php index 8c4b9417..edcc15df 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php index 54a7b6c9..1c8ca4cd 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModelCollectionMeta(); if (property_exists($data, 'pagination')) { diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php index adce2bd5..ffb72193 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php index fe05ff1e..b85ec0a3 100644 --- a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php index a08ff9bc..89da5e52 100644 --- a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModelLanguages(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 23d589aa..039aaf03 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -25,24 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModel(); if (property_exists($data, 'productId')) { $object->setProductId($data->{'productId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'defaultVatRate')) { + if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } + elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { + $object->setDefaultVatRate(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } @@ -56,15 +65,24 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'moreInfoUrl')) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } - if (property_exists($data, 'manufacturerId')) { + if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - if (property_exists($data, 'unitId')) { + elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { + $object->setManufacturerId(null); + } + if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { + $object->setUnitId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } if (property_exists($data, 'type')) { $object->setType($data->{'type'}); } @@ -74,9 +92,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'bundleUseManualPrice')) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } - if (property_exists($data, 'accounting')) { + if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } + elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { + $object->setAccounting(null); + } if (property_exists($data, 'hasSeveralVariants')) { $object->setHasSeveralVariants($data->{'hasSeveralVariants'}); } diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 1a4398c2..b209c143 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -25,55 +25,85 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModelPatchable(); - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'defaultVatRate')) { + if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } + elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { + $object->setDefaultVatRate(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'visibilityPricelistIds')) { + if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { $values[] = $value; } $object->setVisibilityPricelistIds($values); } - if (property_exists($data, 'moreInfoUrl')) { + elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { + $object->setVisibilityPricelistIds(null); + } + if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } - if (property_exists($data, 'manufacturerId')) { + elseif (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} === null) { + $object->setMoreInfoUrl(null); + } + if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - if (property_exists($data, 'unitId')) { + elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { + $object->setManufacturerId(null); + } + if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { + $object->setUnitId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } if (property_exists($data, 'type')) { $object->setType($data->{'type'}); } if (property_exists($data, 'isBackInStockWatchable')) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } - if (property_exists($data, 'bundleUseManualPrice')) { + if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } - if (property_exists($data, 'accounting')) { + elseif (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} === null) { + $object->setBundleUseManualPrice(null); + } + if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } + elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { + $object->setAccounting(null); + } if (property_exists($data, 'mediaFiles')) { $values_1 = array(); foreach ($data->{'mediaFiles'} as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index cccc7dba..96cdbcdb 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -25,55 +25,82 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductModelUpdatable(); - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'createdAt')) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'defaultVatRate')) { + if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } + elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { + $object->setDefaultVatRate(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'visibilityPricelistIds')) { + if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { $values[] = $value; } $object->setVisibilityPricelistIds($values); } + elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { + $object->setVisibilityPricelistIds(null); + } if (property_exists($data, 'moreInfoUrl')) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } - if (property_exists($data, 'manufacturerId')) { + if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - if (property_exists($data, 'unitId')) { + elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { + $object->setManufacturerId(null); + } + if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { + $object->setUnitId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } if (property_exists($data, 'type')) { $object->setType($data->{'type'}); } if (property_exists($data, 'isBackInStockWatchable')) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } - if (property_exists($data, 'bundleUseManualPrice')) { + if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } - if (property_exists($data, 'accounting')) { + elseif (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} === null) { + $object->setBundleUseManualPrice(null); + } + if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } + elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { + $object->setAccounting(null); + } if (property_exists($data, 'variants')) { $values_1 = array(); foreach ($data->{'variants'} as $value_1) { @@ -81,13 +108,16 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVariants($values_1); } - if (property_exists($data, 'bundledProducts')) { + if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { $values_2 = array(); foreach ($data->{'bundledProducts'} as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context); } $object->setBundledProducts($values_2); } + elseif (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} === null) { + $object->setBundledProducts(null); + } if (property_exists($data, 'mediaFiles')) { $values_3 = array(); foreach ($data->{'mediaFiles'} as $value_3) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php index 4d85ba60..e5a7a277 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php index 4865c5aa..32e7ae36 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index 46eca444..0621f1db 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php index b112707d..23eca402 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusRequestModel(); if (property_exists($data, 'stockStatusId')) { @@ -37,9 +37,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sortIndex')) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'stockoutNewStatusId')) { + if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); } + elseif (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} === null) { + $object->setStockoutNewStatusId(null); + } if (property_exists($data, 'productBuyable')) { $object->setProductBuyable($data->{'productBuyable'}); } diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php index e9d6e5ec..bd335cfd 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusResponseModelLanguages(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php index addf4ed6..92748e47 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusResponseModel(); if (property_exists($data, 'stockStatusId')) { @@ -37,9 +37,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sortIndex')) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'stockoutNewStatusId')) { + if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); } + elseif (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} === null) { + $object->setStockoutNewStatusId(null); + } if (property_exists($data, 'productBuyable')) { $object->setProductBuyable($data->{'productBuyable'}); } diff --git a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php index 8f238450..625bb4fe 100644 --- a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php index 00212005..230c4eff 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php index 161010c7..e471318e 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php index 6d11c13d..5b49b5cf 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModel(); if (property_exists($data, 'tagOptionId')) { diff --git a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php index f56e4a4b..19ac0c8e 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel(); if (property_exists($data, 'tagOptionId')) { diff --git a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php index 6b4dc2d8..0c8f71a8 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php index 6aee33a8..041eec83 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index 6db8891f..41f99a03 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagModel(); if (property_exists($data, 'tagId')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php index 8e4774ba..8e4c89fe 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php index 7baa78b0..8701856c 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php index dfb85120..87e21841 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index 3c9e7b46..1f1758fa 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModel(); if (property_exists($data, 'tagOptionId')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php index a81ba652..b521dbc6 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel(); if (property_exists($data, 'sortIndex')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php index 9e6b93bd..3ccaefc5 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel(); if (property_exists($data, 'sortIndex')) { diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php index 0171447b..59fd4807 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel(); if (property_exists($data, 'sortIndex')) { diff --git a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php index e5824ec8..5cf3169b 100644 --- a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagPatchRequestModel(); if (property_exists($data, 'name')) { diff --git a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php index 0ab3dcd3..71334c93 100644 --- a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagPostRequestModel(); if (property_exists($data, 'name')) { diff --git a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php index af4005fe..fa4f3322 100644 --- a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductTagPutRequestModel(); if (property_exists($data, 'name')) { diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php index 17736f96..1768c10e 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductUnitLanguageModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php index 1354fad9..7fc7ee97 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductUnitLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php index 365ffafa..bee0cfec 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductUnitModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php index ca61525a..5f5b9b93 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductUnitModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index 66deb44a..c2cedad8 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductUnitModel(); if (property_exists($data, 'unitId')) { $object->setUnitId($data->{'unitId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'languages')) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); } diff --git a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php index c6bb91db..77ca2c06 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductUnitModelUpdatable(); if (property_exists($data, 'unitId')) { $object->setUnitId($data->{'unitId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'languages')) { $values = array(); foreach ($data->{'languages'} as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php index 00315cb8..766e9f82 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php index 67dcdb13..239cbf0f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php index 70f80066..3905c393 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php index 5f89f8bf..35656c46 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelLanguages(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index d64c135a..f622ddb4 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModel(); if (property_exists($data, 'attributeId')) { $object->setAttributeId($data->{'attributeId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'languages')) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index 7249ac08..b516afae 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable(); if (property_exists($data, 'attributeId')) { $object->setAttributeId($data->{'attributeId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'languages')) { $values = array(); foreach ($data->{'languages'} as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php index 32a4f78f..597ecd9c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php index 2e3e1001..64aee6de 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php index 48259ba5..f9f57420 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php index 8a72b3e6..d1a1aab5 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelLanguages(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index 995c49c7..bcfae148 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModel(); if (property_exists($data, 'attributeValueId')) { $object->setAttributeValueId($data->{'attributeValueId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'skuSuffix')) { $object->setSkuSuffix($data->{'skuSuffix'}); } diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 038d892e..654cfa7a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable(); - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'skuSuffix')) { $object->setSkuSuffix($data->{'skuSuffix'}); } diff --git a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php index f1fc4769..b7299b36 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index 022f8e05..b7564bda 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php index 8e65f7ac..e86cc674 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -25,59 +25,98 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel(); if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - if (property_exists($data, 'isActive')) { + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } + if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { + $object->setIsActive(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'stockStatusId')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'stockQuantity')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - if (property_exists($data, 'weightInKg')) { + elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { + $object->setStockQuantity(null); + } + if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - if (property_exists($data, 'costPrice')) { + elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { + $object->setWeightInKg(null); + } + if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - if (property_exists($data, 'ean')) { + elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { + $object->setCostPrice(null); + } + if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - if (property_exists($data, 'mpn')) { + elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { + $object->setEan(null); + } + if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - if (property_exists($data, 'imageFileId')) { + elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { + $object->setMpn(null); + } + if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - if (property_exists($data, 'attributeValueLinks')) { + elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { + $object->setImageFileId(null); + } + if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); } - if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { + $object->setAttributeValueLinks(null); + } + if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); } + elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php index cde36dc6..4ededf93 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php index 9ab62e96..3adc279f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index b2939b70..f2cd043d 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -25,24 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModel(); if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'priceExVat')) { $object->setPriceExVat($data->{'priceExVat'}); } - if (property_exists($data, 'specialPriceExVat')) { + if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } + elseif (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} === null) { + $object->setSpecialPriceExVat(null); + } if (property_exists($data, 'volumePrices')) { $values = array(); foreach ($data->{'volumePrices'} as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php index 9d6d3ad9..aeac04ee 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php @@ -25,59 +25,98 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantPutRequestModel(); if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - if (property_exists($data, 'isActive')) { + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } + if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { + $object->setIsActive(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'stockStatusId')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'stockQuantity')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - if (property_exists($data, 'weightInKg')) { + elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { + $object->setStockQuantity(null); + } + if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - if (property_exists($data, 'costPrice')) { + elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { + $object->setWeightInKg(null); + } + if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - if (property_exists($data, 'ean')) { + elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { + $object->setCostPrice(null); + } + if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - if (property_exists($data, 'mpn')) { + elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { + $object->setEan(null); + } + if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - if (property_exists($data, 'imageFileId')) { + elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { + $object->setMpn(null); + } + if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - if (property_exists($data, 'attributeValueLinks')) { + elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { + $object->setImageFileId(null); + } + if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); } - if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { + $object->setAttributeValueLinks(null); + } + if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); } + elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php index 2140c969..7521c11f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php @@ -25,45 +25,78 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantRequestModel(); if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - if (property_exists($data, 'isActive')) { + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } + if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { + $object->setIsActive(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'stockStatusId')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'stockQuantity')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - if (property_exists($data, 'weightInKg')) { + elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { + $object->setStockQuantity(null); + } + if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - if (property_exists($data, 'costPrice')) { + elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { + $object->setWeightInKg(null); + } + if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - if (property_exists($data, 'ean')) { + elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { + $object->setCostPrice(null); + } + if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - if (property_exists($data, 'mpn')) { + elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { + $object->setEan(null); + } + if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - if (property_exists($data, 'imageFileId')) { + elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { + $object->setMpn(null); + } + if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } + elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { + $object->setImageFileId(null); + } if (property_exists($data, 'attributeValueLinks')) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { @@ -71,13 +104,16 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValueLinks($values); } - if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); } + elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php index 4afd7c9a..9ddfed54 100644 --- a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php @@ -25,45 +25,78 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantResponseModel(); if (property_exists($data, 'sku')) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - if (property_exists($data, 'isActive')) { + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } + if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { + $object->setIsActive(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'stockStatusId')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'stockQuantity')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - if (property_exists($data, 'weightInKg')) { + elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { + $object->setStockQuantity(null); + } + if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - if (property_exists($data, 'costPrice')) { + elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { + $object->setWeightInKg(null); + } + if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - if (property_exists($data, 'ean')) { + elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { + $object->setCostPrice(null); + } + if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - if (property_exists($data, 'mpn')) { + elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { + $object->setEan(null); + } + if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - if (property_exists($data, 'imageFileId')) { + elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { + $object->setMpn(null); + } + if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } + elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { + $object->setImageFileId(null); + } if (property_exists($data, 'attributeValueLinks')) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { @@ -71,13 +104,16 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValueLinks($values); } - if (property_exists($data, 'volumePricingInheritancePricelistIds')) { + if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); } + elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } if (property_exists($data, 'variantId')) { $object->setVariantId($data->{'variantId'}); } diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php index 07de7f27..6ed76bea 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php index ed9e4f9a..3dc78ac2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php index 50317921..dc59128a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel(); if (property_exists($data, 'stockStatusId')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index d58833e6..690e3bbe 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockResponseModel(); if (property_exists($data, 'stockLocationId')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php index c299586e..ae496f0d 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php index f4eaec25..d8639ed5 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php index 7d2a594a..0189ecd7 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel(); if (property_exists($data, 'pricelistId')) { $object->setPricelistId($data->{'pricelistId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'priceExVat')) { $object->setPriceExVat($data->{'priceExVat'}); } diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php index a286c4bc..ce55b524 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVatRateModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php index e768901a..314d388b 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVatRateModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php index d73ff55e..dd1fe2dc 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductVatRateModel(); if (property_exists($data, 'countryCode')) { diff --git a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php index f2182aa5..a3d8e697 100644 --- a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ProductsAttributesModelItem(); if (property_exists($data, 'attributeId')) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php index d95506cf..95909813 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingMethodLanguageModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index 0e3f02bd..4bdcd4b2 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingMethodLanguageModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php index 7f50d8f4..26841cc2 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingMethodModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php index e47cee70..59464780 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingMethodModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index 131208f7..b307fe5f 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingMethodModel(); if (property_exists($data, 'shippingMethodId')) { @@ -44,27 +44,48 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setValidCountriesSelected($values); } - if (property_exists($data, 'validForMinItemsSubtotal')) { + if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); } - if (property_exists($data, 'validForMaxItemsSubtotal')) { + elseif (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} === null) { + $object->setValidForMinItemsSubtotal(null); + } + if (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} !== null) { $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'}); } - if (property_exists($data, 'validForMinWeight')) { + elseif (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} === null) { + $object->setValidForMaxItemsSubtotal(null); + } + if (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} !== null) { $object->setValidForMinWeight($data->{'validForMinWeight'}); } - if (property_exists($data, 'validForMaxWeight')) { + elseif (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} === null) { + $object->setValidForMinWeight(null); + } + if (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} !== null) { $object->setValidForMaxWeight($data->{'validForMaxWeight'}); } - if (property_exists($data, 'validForCustomerType')) { + elseif (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} === null) { + $object->setValidForMaxWeight(null); + } + if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { $object->setValidForCustomerType($data->{'validForCustomerType'}); } - if (property_exists($data, 'freeShippingMinItemsSubtotal')) { + elseif (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} === null) { + $object->setValidForCustomerType(null); + } + if (property_exists($data, 'freeShippingMinItemsSubtotal') && $data->{'freeShippingMinItemsSubtotal'} !== null) { $object->setFreeShippingMinItemsSubtotal($data->{'freeShippingMinItemsSubtotal'}); } - if (property_exists($data, 'freeShippingMinWeight')) { + elseif (property_exists($data, 'freeShippingMinItemsSubtotal') && $data->{'freeShippingMinItemsSubtotal'} === null) { + $object->setFreeShippingMinItemsSubtotal(null); + } + if (property_exists($data, 'freeShippingMinWeight') && $data->{'freeShippingMinWeight'} !== null) { $object->setFreeShippingMinWeight($data->{'freeShippingMinWeight'}); } + elseif (property_exists($data, 'freeShippingMinWeight') && $data->{'freeShippingMinWeight'} === null) { + $object->setFreeShippingMinWeight(null); + } if (property_exists($data, 'isClickAndCollect')) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php index c7fdb7c2..bb4ae394 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingTrackingTypeModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index 1de708d5..81dc7ec9 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShippingTrackingTypeModel(); if (property_exists($data, 'type')) { diff --git a/src/Api/Generated/Normalizer/ShopItemNormalizer.php b/src/Api/Generated/Normalizer/ShopItemNormalizer.php index ea87072d..8549926b 100644 --- a/src/Api/Generated/Normalizer/ShopItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShopItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index f6ad2432..c1b350f5 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\ShopModel(); if (property_exists($data, 'name')) { diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php index ea58c26a..9374bc7c 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationLanguagesModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php index 278125cc..39194930 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationLanguagesModel(); if (property_exists($data, 'langCode')) { diff --git a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php index 17e38201..064b4489 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php index abe6c8a4..84fbb8df 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 84d56b53..29a37b0e 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -25,18 +25,24 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationModel(); if (property_exists($data, 'stockLocationId')) { $object->setStockLocationId($data->{'stockLocationId'}); } - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index 904f08ab..e484a4f0 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationPostRequestModel(); - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index 0b4ab01d..09c8fd59 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\StockLocationPutRequestModel(); - if (property_exists($data, 'externalId')) { + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - if (property_exists($data, 'externalIdType')) { + elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { + $object->setExternalId(null); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } + elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { + $object->setExternalIdType(null); + } if (property_exists($data, 'visibility')) { $object->setVisibility($data->{'visibility'}); } diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index e6f84f60..d61567a6 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\TokenModel(); if (property_exists($data, 'access_token')) { diff --git a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php index 9704752b..b7f0532a 100644 --- a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\VatRateModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php index 9f1a8790..59b9d13e 100644 --- a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\VatRateModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php index ff9bb54b..7771a79d 100644 --- a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\VatRateModel(); if (property_exists($data, 'countryCode')) { diff --git a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php index 8b57286e..1ea9aedc 100644 --- a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\WebHookModelCollection(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php index ff80d310..ab908b5a 100644 --- a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\WebHookModelItem(); if (property_exists($data, 'data')) { diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index 36780e4a..af76de08 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); } $object = new \Starweb\Api\Generated\Model\WebHookModel(); if (property_exists($data, 'webHookId')) { @@ -37,9 +37,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'event')) { $object->setEvent($data->{'event'}); } - if (property_exists($data, 'statusId')) { + if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } + elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { + $object->setStatusId(null); + } if (property_exists($data, 'url')) { $object->setUrl($data->{'url'}); } From 52f3ff565efd10e0377e9e8e4de3b223f2cee1e6 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 15:46:33 +0200 Subject: [PATCH 65/87] Revert "make sure address objects can be null" This reverts commit 7c6a43236b49920f98627166d7ec536b5b98aa40. --- resources/specification/openapi.json | 55 ++--------------- src/Api/Generated/Model/OrderAddressModel.php | 60 +++++++++---------- .../OrderAddressModelNormalizer.php | 24 ++++---- 3 files changed, 48 insertions(+), 91 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index a0187e6b..038013e5 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -9498,65 +9498,22 @@ "type": "object", "properties": { "originalInvoice": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/AddressModel" - - }, - { - "type": null - } - ] + "$ref": "#\/components\/schemas\/AddressModel" }, "originalDelivery": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/AddressModel" - }, - { - "nullable": true - } - ] + "$ref": "#\/components\/schemas\/AddressModel" }, "customerInvoice": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/AddressModel" - }, - { - "nullable": true - } - ] + "$ref": "#\/components\/schemas\/AddressModel" }, "customerDelivery": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/AddressModel" - }, - { - "nullable": true - } - ] + "$ref": "#\/components\/schemas\/AddressModel" }, "paymentMethodInvoice": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/AddressModel" - }, - { - "nullable": true - } - ] + "$ref": "#\/components\/schemas\/AddressModel" }, "paymentMethodDelivery": { - "oneOf": [ - { - "$ref": "#\/components\/schemas\/AddressModel" - }, - { - "nullable": true - } - ] + "$ref": "#\/components\/schemas\/AddressModel" } } }, diff --git a/src/Api/Generated/Model/OrderAddressModel.php b/src/Api/Generated/Model/OrderAddressModel.php index fa82ed58..381e9afc 100644 --- a/src/Api/Generated/Model/OrderAddressModel.php +++ b/src/Api/Generated/Model/OrderAddressModel.php @@ -7,56 +7,56 @@ class OrderAddressModel /** * * - * @var mixed + * @var AddressModel */ protected $originalInvoice; /** * * - * @var mixed + * @var AddressModel */ protected $originalDelivery; /** * * - * @var mixed + * @var AddressModel */ protected $customerInvoice; /** * * - * @var mixed + * @var AddressModel */ protected $customerDelivery; /** * * - * @var mixed + * @var AddressModel */ protected $paymentMethodInvoice; /** * * - * @var mixed + * @var AddressModel */ protected $paymentMethodDelivery; /** * * - * @return mixed + * @return AddressModel */ - public function getOriginalInvoice() + public function getOriginalInvoice() : AddressModel { return $this->originalInvoice; } /** * * - * @param mixed $originalInvoice + * @param AddressModel $originalInvoice * * @return self */ - public function setOriginalInvoice($originalInvoice) : self + public function setOriginalInvoice(AddressModel $originalInvoice) : self { $this->originalInvoice = $originalInvoice; return $this; @@ -64,20 +64,20 @@ public function setOriginalInvoice($originalInvoice) : self /** * * - * @return mixed + * @return AddressModel */ - public function getOriginalDelivery() + public function getOriginalDelivery() : AddressModel { return $this->originalDelivery; } /** * * - * @param mixed $originalDelivery + * @param AddressModel $originalDelivery * * @return self */ - public function setOriginalDelivery($originalDelivery) : self + public function setOriginalDelivery(AddressModel $originalDelivery) : self { $this->originalDelivery = $originalDelivery; return $this; @@ -85,20 +85,20 @@ public function setOriginalDelivery($originalDelivery) : self /** * * - * @return mixed + * @return AddressModel */ - public function getCustomerInvoice() + public function getCustomerInvoice() : AddressModel { return $this->customerInvoice; } /** * * - * @param mixed $customerInvoice + * @param AddressModel $customerInvoice * * @return self */ - public function setCustomerInvoice($customerInvoice) : self + public function setCustomerInvoice(AddressModel $customerInvoice) : self { $this->customerInvoice = $customerInvoice; return $this; @@ -106,20 +106,20 @@ public function setCustomerInvoice($customerInvoice) : self /** * * - * @return mixed + * @return AddressModel */ - public function getCustomerDelivery() + public function getCustomerDelivery() : AddressModel { return $this->customerDelivery; } /** * * - * @param mixed $customerDelivery + * @param AddressModel $customerDelivery * * @return self */ - public function setCustomerDelivery($customerDelivery) : self + public function setCustomerDelivery(AddressModel $customerDelivery) : self { $this->customerDelivery = $customerDelivery; return $this; @@ -127,20 +127,20 @@ public function setCustomerDelivery($customerDelivery) : self /** * * - * @return mixed + * @return AddressModel */ - public function getPaymentMethodInvoice() + public function getPaymentMethodInvoice() : AddressModel { return $this->paymentMethodInvoice; } /** * * - * @param mixed $paymentMethodInvoice + * @param AddressModel $paymentMethodInvoice * * @return self */ - public function setPaymentMethodInvoice($paymentMethodInvoice) : self + public function setPaymentMethodInvoice(AddressModel $paymentMethodInvoice) : self { $this->paymentMethodInvoice = $paymentMethodInvoice; return $this; @@ -148,20 +148,20 @@ public function setPaymentMethodInvoice($paymentMethodInvoice) : self /** * * - * @return mixed + * @return AddressModel */ - public function getPaymentMethodDelivery() + public function getPaymentMethodDelivery() : AddressModel { return $this->paymentMethodDelivery; } /** * * - * @param mixed $paymentMethodDelivery + * @param AddressModel $paymentMethodDelivery * * @return self */ - public function setPaymentMethodDelivery($paymentMethodDelivery) : self + public function setPaymentMethodDelivery(AddressModel $paymentMethodDelivery) : self { $this->paymentMethodDelivery = $paymentMethodDelivery; return $this; diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index 7ad22e81..1bd42189 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -29,22 +29,22 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object = new \Starweb\Api\Generated\Model\OrderAddressModel(); if (property_exists($data, 'originalInvoice')) { - $object->setOriginalInvoice($data->{'originalInvoice'}); + $object->setOriginalInvoice($this->denormalizer->denormalize($data->{'originalInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } if (property_exists($data, 'originalDelivery')) { - $object->setOriginalDelivery($data->{'originalDelivery'}); + $object->setOriginalDelivery($this->denormalizer->denormalize($data->{'originalDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } if (property_exists($data, 'customerInvoice')) { - $object->setCustomerInvoice($data->{'customerInvoice'}); + $object->setCustomerInvoice($this->denormalizer->denormalize($data->{'customerInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } if (property_exists($data, 'customerDelivery')) { - $object->setCustomerDelivery($data->{'customerDelivery'}); + $object->setCustomerDelivery($this->denormalizer->denormalize($data->{'customerDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } if (property_exists($data, 'paymentMethodInvoice')) { - $object->setPaymentMethodInvoice($data->{'paymentMethodInvoice'}); + $object->setPaymentMethodInvoice($this->denormalizer->denormalize($data->{'paymentMethodInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } if (property_exists($data, 'paymentMethodDelivery')) { - $object->setPaymentMethodDelivery($data->{'paymentMethodDelivery'}); + $object->setPaymentMethodDelivery($this->denormalizer->denormalize($data->{'paymentMethodDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } return $object; } @@ -52,22 +52,22 @@ public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); if (null !== $object->getOriginalInvoice()) { - $data->{'originalInvoice'} = $object->getOriginalInvoice(); + $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); } if (null !== $object->getOriginalDelivery()) { - $data->{'originalDelivery'} = $object->getOriginalDelivery(); + $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); } if (null !== $object->getCustomerInvoice()) { - $data->{'customerInvoice'} = $object->getCustomerInvoice(); + $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); } if (null !== $object->getCustomerDelivery()) { - $data->{'customerDelivery'} = $object->getCustomerDelivery(); + $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); } if (null !== $object->getPaymentMethodInvoice()) { - $data->{'paymentMethodInvoice'} = $object->getPaymentMethodInvoice(); + $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); } if (null !== $object->getPaymentMethodDelivery()) { - $data->{'paymentMethodDelivery'} = $object->getPaymentMethodDelivery(); + $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); } return $data; } From 716e717b8235da074db81edee79c689e5699b477 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Mon, 14 Sep 2020 15:47:26 +0200 Subject: [PATCH 66/87] set strict mode to false and regenerate client --- .jane-openapi | 2 +- src/Api/Generated/Model/AddressModel.php | 130 ++--- src/Api/Generated/Model/AddressModelItem.php | 10 +- .../Generated/Model/BundledProductsModel.php | 50 +- .../Model/BundledProductsModelCollection.php | 10 +- .../Model/BundledProductsModelItem.php | 10 +- .../Generated/Model/ClientCredentialModel.php | 30 +- .../Generated/Model/CurrencyCollection.php | 10 +- src/Api/Generated/Model/CurrencyModel.php | 30 +- src/Api/Generated/Model/CurrencyModelItem.php | 10 +- .../Generated/Model/CustomerAddedTagModel.php | 20 +- .../Model/CustomerAddedTagModelCollection.php | 10 +- .../Model/CustomerAddedTagModelItem.php | 10 +- .../CustomerAddressesModelCollection.php | 10 +- .../CustomerAddressesModelCollectionData.php | 20 +- .../Model/CustomerAddressesModelItem.php | 10 +- .../Generated/Model/CustomerCreatedModel.php | 100 ++-- .../Model/CustomerCreatedModelItem.php | 10 +- .../Model/CustomerExternalServicesModel.php | 20 +- ...ustomerExternalServicesModelCollection.php | 10 +- .../CustomerExternalServicesModelItem.php | 10 +- src/Api/Generated/Model/CustomerModel.php | 100 ++-- .../Model/CustomerModelCollection.php | 20 +- .../Model/CustomerModelCollectionMeta.php | 10 +- src/Api/Generated/Model/CustomerModelItem.php | 10 +- src/Api/Generated/Model/CustomerTagModel.php | 20 +- .../Model/CustomerTagModelCollection.php | 10 +- .../Generated/Model/CustomerTagModelItem.php | 10 +- .../Generated/Model/CustomerUpdateModel.php | 100 ++-- .../Model/CustomerUpdateModelAddresses.php | 20 +- src/Api/Generated/Model/ErrorModel.php | 20 +- src/Api/Generated/Model/MediaFileModel.php | 90 +-- .../Model/MediaFileModelCollection.php | 20 +- .../Model/MediaFileModelCollectionMeta.php | 10 +- .../Generated/Model/MediaFileModelItem.php | 10 +- .../Generated/Model/MediaFileUploadModel.php | 10 +- .../Model/OrderAddressCollection.php | 10 +- src/Api/Generated/Model/OrderAddressModel.php | 60 +- src/Api/Generated/Model/OrderCommentModel.php | 40 +- .../Model/OrderCommentModelCollection.php | 10 +- .../Generated/Model/OrderCommentModelItem.php | 10 +- .../Model/OrderExternalServiceModel.php | 30 +- .../OrderExternalServiceModelCollection.php | 10 +- .../Model/OrderExternalServicesModelItem.php | 10 +- .../Model/OrderItemBundledModelItem.php | 10 +- .../OrderItemBundledModelItemBundledItems.php | 10 +- src/Api/Generated/Model/OrderItemModel.php | 100 ++-- .../Model/OrderItemModelCollection.php | 10 +- .../OrderItemModelCollectionDataItem.php | 110 ++-- .../Generated/Model/OrderItemModelItem.php | 10 +- src/Api/Generated/Model/OrderModel.php | 550 +++++++++--------- .../Generated/Model/OrderModelCollection.php | 20 +- .../Model/OrderModelCollectionMeta.php | 10 +- src/Api/Generated/Model/OrderModelItem.php | 10 +- src/Api/Generated/Model/OrderPutModel.php | 510 ++++++++-------- .../Model/OrderStatusLanguageModel.php | 20 +- .../OrderStatusLanguageModelCollection.php | 10 +- src/Api/Generated/Model/OrderStatusModel.php | 40 +- .../Model/OrderStatusModelCollection.php | 10 +- .../Generated/Model/OrderStatusModelItem.php | 10 +- src/Api/Generated/Model/OrderUpdateModel.php | 510 ++++++++-------- src/Api/Generated/Model/PaginationModel.php | 50 +- .../Model/PaymentMethodLanguageModel.php | 40 +- .../PaymentMethodLanguageModelCollection.php | 10 +- .../Generated/Model/PaymentMethodModel.php | 90 +-- .../Model/PaymentMethodModelCollection.php | 10 +- .../Model/PaymentMethodModelItem.php | 10 +- src/Api/Generated/Model/PricelistModel.php | 90 +-- .../Model/PricelistModelCollection.php | 10 +- .../Generated/Model/PricelistModelItem.php | 10 +- .../Model/ProductBundleProductPriceModel.php | 10 +- ...oductBundleProductPriceModelCollection.php | 10 +- .../ProductBundleProductPriceModelItem.php | 10 +- .../Model/ProductCategoryLanguagesModel.php | 20 +- ...roductCategoryLanguagesModelCollection.php | 10 +- .../Model/ProductCategoryLinkModel.php | 20 +- .../ProductCategoryLinkModelCollection.php | 10 +- .../Model/ProductCategoryLinkModelItem.php | 10 +- .../Generated/Model/ProductCategoryModel.php | 60 +- .../Model/ProductCategoryModelCollection.php | 20 +- .../ProductCategoryModelCollectionMeta.php | 10 +- .../Model/ProductCategoryModelItem.php | 10 +- .../Model/ProductCategoryModelUpdatable.php | 60 +- .../Generated/Model/ProductLanguageModel.php | 70 +-- .../Model/ProductLanguageModelCollection.php | 10 +- .../Model/ProductLanguageModelItem.php | 10 +- .../Model/ProductLanguageSlimModel.php | 40 +- .../Model/ProductManufacturerModel.php | 20 +- .../ProductManufacturerModelCollection.php | 10 +- .../Model/ProductManufacturerModelItem.php | 10 +- .../Model/ProductMediaFileLinkModel.php | 40 +- .../ProductMediaFileLinkModelCollection.php | 10 +- .../Model/ProductMediaFileLinkModelItem.php | 10 +- .../Generated/Model/ProductMetaDataModel.php | 40 +- .../Model/ProductMetaDataModelCollection.php | 10 +- .../Model/ProductMetaDataModelItem.php | 10 +- .../Model/ProductMetaDataModelUpdatable.php | 40 +- .../ProductMetaDataTypeLanguageModel.php | 20 +- ...uctMetaDataTypeLanguageModelCollection.php | 10 +- .../Model/ProductMetaDataTypeModel.php | 20 +- .../ProductMetaDataTypeModelCollection.php | 10 +- .../Model/ProductMetaDataTypeModelItem.php | 10 +- .../ProductMetaDataTypeModelUpdatable.php | 10 +- .../Model/ProductMetaLanguageDataModel.php | 20 +- ...ProductMetaLanguageDataModelCollection.php | 10 +- .../ProductMetaLanguageDataModelItem.php | 10 +- src/Api/Generated/Model/ProductModel.php | 180 +++--- .../Model/ProductModelCollection.php | 20 +- .../Model/ProductModelCollectionMeta.php | 10 +- src/Api/Generated/Model/ProductModelItem.php | 10 +- .../Generated/Model/ProductModelLanguages.php | 10 +- .../Generated/Model/ProductModelPatchable.php | 90 +-- .../Generated/Model/ProductModelUpdatable.php | 110 ++-- .../Model/ProductStockStatusLanguageModel.php | 20 +- .../ProductStockStatusModelCollection.php | 10 +- .../Model/ProductStockStatusModelItem.php | 10 +- .../Model/ProductStockStatusRequestModel.php | 60 +- .../Model/ProductStockStatusResponseModel.php | 60 +- ...oductStockStatusResponseModelLanguages.php | 10 +- .../Model/ProductTagLanguageModel.php | 20 +- .../Generated/Model/ProductTagLinkModel.php | 20 +- .../Model/ProductTagLinkModelCollection.php | 10 +- .../Model/ProductTagLinkModelItem.php | 10 +- .../Model/ProductTagLinkPostRequestModel.php | 10 +- src/Api/Generated/Model/ProductTagModel.php | 30 +- .../Model/ProductTagModelCollection.php | 10 +- .../Generated/Model/ProductTagModelItem.php | 10 +- .../Model/ProductTagOptionLanguageModel.php | 20 +- .../Generated/Model/ProductTagOptionModel.php | 40 +- .../Model/ProductTagOptionModelCollection.php | 10 +- .../Model/ProductTagOptionModelItem.php | 10 +- .../ProductTagOptionPatchRequestModel.php | 20 +- .../ProductTagOptionPostRequestModel.php | 20 +- .../Model/ProductTagOptionPutRequestModel.php | 20 +- .../Model/ProductTagPatchRequestModel.php | 30 +- .../Model/ProductTagPostRequestModel.php | 30 +- .../Model/ProductTagPutRequestModel.php | 30 +- .../Model/ProductUnitLanguageModel.php | 30 +- .../ProductUnitLanguageModelCollection.php | 10 +- src/Api/Generated/Model/ProductUnitModel.php | 20 +- .../Model/ProductUnitModelCollection.php | 10 +- .../Generated/Model/ProductUnitModelItem.php | 10 +- .../Model/ProductUnitModelUpdatable.php | 20 +- .../ProductVariantAttributeLanguageModel.php | 20 +- .../Model/ProductVariantAttributeModel.php | 20 +- ...ProductVariantAttributeModelCollection.php | 10 +- .../ProductVariantAttributeModelItem.php | 10 +- .../ProductVariantAttributeModelLanguages.php | 10 +- .../ProductVariantAttributeModelUpdatable.php | 20 +- ...ductVariantAttributeValueLanguageModel.php | 20 +- .../ProductVariantAttributeValueModel.php | 40 +- ...ctVariantAttributeValueModelCollection.php | 10 +- .../ProductVariantAttributeValueModelItem.php | 10 +- ...uctVariantAttributeValueModelLanguages.php | 10 +- ...uctVariantAttributeValueModelUpdatable.php | 30 +- .../Model/ProductVariantModelCollection.php | 10 +- .../Model/ProductVariantModelItem.php | 10 +- .../Model/ProductVariantPatchRequestModel.php | 10 +- .../Model/ProductVariantPriceModel.php | 30 +- .../ProductVariantPriceModelCollection.php | 10 +- .../Model/ProductVariantPriceModelItem.php | 10 +- .../Model/ProductVariantPutRequestModel.php | 10 +- .../Model/ProductVariantRequestModel.php | 20 +- .../Model/ProductVariantResponseModel.php | 50 +- .../ProductVariantStockModelCollection.php | 10 +- .../Model/ProductVariantStockModelItem.php | 10 +- .../ProductVariantStockPutRequestModel.php | 20 +- .../ProductVariantStockResponseModel.php | 30 +- .../Model/ProductVariantVolumePriceModel.php | 30 +- ...oductVariantVolumePriceModelCollection.php | 10 +- .../ProductVariantVolumePriceModelItem.php | 10 +- .../Generated/Model/ProductVatRateModel.php | 20 +- .../Model/ProductVatRateModelCollection.php | 10 +- .../Model/ProductVatRateModelItem.php | 10 +- .../Model/ProductsAttributesModelItem.php | 10 +- .../Model/ShippingMethodLanguageModel.php | 40 +- .../ShippingMethodLanguageModelCollection.php | 10 +- .../Generated/Model/ShippingMethodModel.php | 60 +- .../Model/ShippingMethodModelCollection.php | 10 +- .../Model/ShippingMethodModelItem.php | 10 +- .../Model/ShippingTrackingTypeModel.php | 20 +- .../ShippingTrackingTypeModelCollection.php | 10 +- src/Api/Generated/Model/ShopItem.php | 10 +- src/Api/Generated/Model/ShopModel.php | 160 ++--- .../Model/StockLocationLanguagesModel.php | 20 +- .../StockLocationLanguagesModelCollection.php | 10 +- .../Generated/Model/StockLocationModel.php | 50 +- .../Model/StockLocationModelCollection.php | 10 +- .../Model/StockLocationModelItem.php | 10 +- .../Model/StockLocationPostRequestModel.php | 40 +- .../Model/StockLocationPutRequestModel.php | 40 +- src/Api/Generated/Model/TokenModel.php | 30 +- src/Api/Generated/Model/VatRateModel.php | 50 +- .../Model/VatRateModelCollection.php | 10 +- src/Api/Generated/Model/VatRateModelItem.php | 10 +- src/Api/Generated/Model/WebHookModel.php | 40 +- .../Model/WebHookModelCollection.php | 10 +- src/Api/Generated/Model/WebHookModelItem.php | 10 +- .../Normalizer/AddressModelItemNormalizer.php | 10 +- .../Normalizer/AddressModelNormalizer.php | 106 +++- ...ndledProductsModelCollectionNormalizer.php | 10 +- .../BundledProductsModelItemNormalizer.php | 10 +- .../BundledProductsModelNormalizer.php | 49 +- .../ClientCredentialModelNormalizer.php | 26 +- .../CurrencyCollectionNormalizer.php | 10 +- .../CurrencyModelItemNormalizer.php | 10 +- .../Normalizer/CurrencyModelNormalizer.php | 23 +- ...tomerAddedTagModelCollectionNormalizer.php | 10 +- .../CustomerAddedTagModelItemNormalizer.php | 10 +- .../CustomerAddedTagModelNormalizer.php | 15 +- ...AddressesModelCollectionDataNormalizer.php | 18 +- ...omerAddressesModelCollectionNormalizer.php | 10 +- .../CustomerAddressesModelItemNormalizer.php | 10 +- .../CustomerCreatedModelItemNormalizer.php | 10 +- .../CustomerCreatedModelNormalizer.php | 73 ++- ...ernalServicesModelCollectionNormalizer.php | 10 +- ...merExternalServicesModelItemNormalizer.php | 10 +- ...ustomerExternalServicesModelNormalizer.php | 18 +- .../CustomerModelCollectionMetaNormalizer.php | 10 +- .../CustomerModelCollectionNormalizer.php | 18 +- .../CustomerModelItemNormalizer.php | 10 +- .../Normalizer/CustomerModelNormalizer.php | 73 ++- .../CustomerTagModelCollectionNormalizer.php | 10 +- .../CustomerTagModelItemNormalizer.php | 10 +- .../Normalizer/CustomerTagModelNormalizer.php | 12 +- ...CustomerUpdateModelAddressesNormalizer.php | 18 +- .../CustomerUpdateModelNormalizer.php | 83 ++- .../Normalizer/ErrorModelNormalizer.php | 12 +- ...MediaFileModelCollectionMetaNormalizer.php | 10 +- .../MediaFileModelCollectionNormalizer.php | 18 +- .../MediaFileModelItemNormalizer.php | 10 +- .../Normalizer/MediaFileModelNormalizer.php | 47 +- .../MediaFileUploadModelNormalizer.php | 10 +- .../OrderAddressCollectionNormalizer.php | 10 +- .../OrderAddressModelNormalizer.php | 50 +- .../OrderCommentModelCollectionNormalizer.php | 10 +- .../OrderCommentModelItemNormalizer.php | 10 +- .../OrderCommentModelNormalizer.php | 31 +- ...ternalServiceModelCollectionNormalizer.php | 10 +- .../OrderExternalServiceModelNormalizer.php | 23 +- ...derExternalServicesModelItemNormalizer.php | 10 +- ...BundledModelItemBundledItemsNormalizer.php | 10 +- .../OrderItemBundledModelItemNormalizer.php | 10 +- ...rItemModelCollectionDataItemNormalizer.php | 87 ++- .../OrderItemModelCollectionNormalizer.php | 10 +- .../OrderItemModelItemNormalizer.php | 10 +- .../Normalizer/OrderItemModelNormalizer.php | 79 ++- .../OrderModelCollectionMetaNormalizer.php | 10 +- .../OrderModelCollectionNormalizer.php | 18 +- .../Normalizer/OrderModelItemNormalizer.php | 10 +- .../Normalizer/OrderModelNormalizer.php | 400 +++++++++++-- .../Normalizer/OrderPutModelNormalizer.php | 368 ++++++++++-- ...tatusLanguageModelCollectionNormalizer.php | 10 +- .../OrderStatusLanguageModelNormalizer.php | 18 +- .../OrderStatusModelCollectionNormalizer.php | 10 +- .../OrderStatusModelItemNormalizer.php | 10 +- .../Normalizer/OrderStatusModelNormalizer.php | 28 +- .../Normalizer/OrderUpdateModelNormalizer.php | 368 ++++++++++-- .../Normalizer/PaginationModelNormalizer.php | 27 +- ...ethodLanguageModelCollectionNormalizer.php | 10 +- .../PaymentMethodLanguageModelNormalizer.php | 22 +- ...PaymentMethodModelCollectionNormalizer.php | 10 +- .../PaymentMethodModelItemNormalizer.php | 10 +- .../PaymentMethodModelNormalizer.php | 50 +- .../PricelistModelCollectionNormalizer.php | 10 +- .../PricelistModelItemNormalizer.php | 10 +- .../Normalizer/PricelistModelNormalizer.php | 74 ++- ...eProductPriceModelCollectionNormalizer.php | 10 +- ...tBundleProductPriceModelItemNormalizer.php | 10 +- ...oductBundleProductPriceModelNormalizer.php | 17 +- ...goryLanguagesModelCollectionNormalizer.php | 10 +- ...roductCategoryLanguagesModelNormalizer.php | 53 +- ...tCategoryLinkModelCollectionNormalizer.php | 10 +- ...ProductCategoryLinkModelItemNormalizer.php | 10 +- .../ProductCategoryLinkModelNormalizer.php | 18 +- ...tCategoryModelCollectionMetaNormalizer.php | 10 +- ...oductCategoryModelCollectionNormalizer.php | 18 +- .../ProductCategoryModelItemNormalizer.php | 10 +- .../ProductCategoryModelNormalizer.php | 79 ++- ...roductCategoryModelUpdatableNormalizer.php | 79 ++- ...oductLanguageModelCollectionNormalizer.php | 10 +- .../ProductLanguageModelItemNormalizer.php | 10 +- .../ProductLanguageModelNormalizer.php | 58 +- .../ProductLanguageSlimModelNormalizer.php | 34 +- ...tManufacturerModelCollectionNormalizer.php | 10 +- ...ProductManufacturerModelItemNormalizer.php | 10 +- .../ProductManufacturerModelNormalizer.php | 36 +- ...MediaFileLinkModelCollectionNormalizer.php | 10 +- ...roductMediaFileLinkModelItemNormalizer.php | 10 +- .../ProductMediaFileLinkModelNormalizer.php | 28 +- ...oductMetaDataModelCollectionNormalizer.php | 10 +- .../ProductMetaDataModelItemNormalizer.php | 10 +- .../ProductMetaDataModelNormalizer.php | 34 +- ...roductMetaDataModelUpdatableNormalizer.php | 31 +- ...aTypeLanguageModelCollectionNormalizer.php | 10 +- ...uctMetaDataTypeLanguageModelNormalizer.php | 18 +- ...tMetaDataTypeModelCollectionNormalizer.php | 10 +- ...ProductMetaDataTypeModelItemNormalizer.php | 10 +- .../ProductMetaDataTypeModelNormalizer.php | 15 +- ...ctMetaDataTypeModelUpdatableNormalizer.php | 10 +- ...aLanguageDataModelCollectionNormalizer.php | 10 +- ...uctMetaLanguageDataModelItemNormalizer.php | 10 +- ...ProductMetaLanguageDataModelNormalizer.php | 18 +- .../ProductModelCollectionMetaNormalizer.php | 10 +- .../ProductModelCollectionNormalizer.php | 18 +- .../Normalizer/ProductModelItemNormalizer.php | 10 +- .../ProductModelLanguagesNormalizer.php | 10 +- .../Normalizer/ProductModelNormalizer.php | 186 +++++- .../ProductModelPatchableNormalizer.php | 137 ++++- .../ProductModelUpdatableNormalizer.php | 146 ++++- ...ductStockStatusLanguageModelNormalizer.php | 18 +- ...ctStockStatusModelCollectionNormalizer.php | 10 +- .../ProductStockStatusModelItemNormalizer.php | 10 +- ...oductStockStatusRequestModelNormalizer.php | 51 +- ...StatusResponseModelLanguagesNormalizer.php | 10 +- ...ductStockStatusResponseModelNormalizer.php | 51 +- .../ProductTagLanguageModelNormalizer.php | 18 +- ...roductTagLinkModelCollectionNormalizer.php | 10 +- .../ProductTagLinkModelItemNormalizer.php | 10 +- .../ProductTagLinkModelNormalizer.php | 18 +- ...oductTagLinkPostRequestModelNormalizer.php | 10 +- .../ProductTagModelCollectionNormalizer.php | 10 +- .../ProductTagModelItemNormalizer.php | 10 +- .../Normalizer/ProductTagModelNormalizer.php | 20 +- ...roductTagOptionLanguageModelNormalizer.php | 18 +- ...ductTagOptionModelCollectionNormalizer.php | 10 +- .../ProductTagOptionModelItemNormalizer.php | 10 +- .../ProductTagOptionModelNormalizer.php | 28 +- ...ctTagOptionPatchRequestModelNormalizer.php | 18 +- ...uctTagOptionPostRequestModelNormalizer.php | 18 +- ...ductTagOptionPutRequestModelNormalizer.php | 18 +- .../ProductTagPatchRequestModelNormalizer.php | 26 +- .../ProductTagPostRequestModelNormalizer.php | 26 +- .../ProductTagPutRequestModelNormalizer.php | 26 +- ...tUnitLanguageModelCollectionNormalizer.php | 10 +- .../ProductUnitLanguageModelNormalizer.php | 26 +- .../ProductUnitModelCollectionNormalizer.php | 10 +- .../ProductUnitModelItemNormalizer.php | 10 +- .../Normalizer/ProductUnitModelNormalizer.php | 29 +- .../ProductUnitModelUpdatableNormalizer.php | 29 +- ...ariantAttributeLanguageModelNormalizer.php | 18 +- ...iantAttributeModelCollectionNormalizer.php | 10 +- ...uctVariantAttributeModelItemNormalizer.php | 10 +- ...riantAttributeModelLanguagesNormalizer.php | 10 +- ...ProductVariantAttributeModelNormalizer.php | 32 +- ...riantAttributeModelUpdatableNormalizer.php | 29 +- ...tAttributeValueLanguageModelNormalizer.php | 18 +- ...ttributeValueModelCollectionNormalizer.php | 10 +- ...riantAttributeValueModelItemNormalizer.php | 10 +- ...AttributeValueModelLanguagesNormalizer.php | 10 +- ...ctVariantAttributeValueModelNormalizer.php | 48 +- ...AttributeValueModelUpdatableNormalizer.php | 40 +- ...roductVariantModelCollectionNormalizer.php | 10 +- .../ProductVariantModelItemNormalizer.php | 10 +- ...ductVariantPatchRequestModelNormalizer.php | 87 ++- ...tVariantPriceModelCollectionNormalizer.php | 10 +- ...ProductVariantPriceModelItemNormalizer.php | 10 +- .../ProductVariantPriceModelNormalizer.php | 47 +- ...roductVariantPutRequestModelNormalizer.php | 87 ++- .../ProductVariantRequestModelNormalizer.php | 95 ++- .../ProductVariantResponseModelNormalizer.php | 116 +++- ...tVariantStockModelCollectionNormalizer.php | 10 +- ...ProductVariantStockModelItemNormalizer.php | 10 +- ...tVariantStockPutRequestModelNormalizer.php | 18 +- ...uctVariantStockResponseModelNormalizer.php | 23 +- ...ntVolumePriceModelCollectionNormalizer.php | 10 +- ...tVariantVolumePriceModelItemNormalizer.php | 10 +- ...oductVariantVolumePriceModelNormalizer.php | 40 +- ...roductVatRateModelCollectionNormalizer.php | 10 +- .../ProductVatRateModelItemNormalizer.php | 10 +- .../ProductVatRateModelNormalizer.php | 18 +- .../ProductsAttributesModelItemNormalizer.php | 10 +- ...ethodLanguageModelCollectionNormalizer.php | 10 +- .../ShippingMethodLanguageModelNormalizer.php | 22 +- ...hippingMethodModelCollectionNormalizer.php | 10 +- .../ShippingMethodModelItemNormalizer.php | 10 +- .../ShippingMethodModelNormalizer.php | 35 +- ...gTrackingTypeModelCollectionNormalizer.php | 10 +- .../ShippingTrackingTypeModelNormalizer.php | 12 +- .../Normalizer/ShopItemNormalizer.php | 10 +- .../Normalizer/ShopModelNormalizer.php | 82 ++- ...tionLanguagesModelCollectionNormalizer.php | 10 +- .../StockLocationLanguagesModelNormalizer.php | 18 +- ...StockLocationModelCollectionNormalizer.php | 10 +- .../StockLocationModelItemNormalizer.php | 10 +- .../StockLocationModelNormalizer.php | 53 +- ...tockLocationPostRequestModelNormalizer.php | 48 +- ...StockLocationPutRequestModelNormalizer.php | 48 +- .../Normalizer/TokenModelNormalizer.php | 17 +- .../VatRateModelCollectionNormalizer.php | 10 +- .../Normalizer/VatRateModelItemNormalizer.php | 10 +- .../Normalizer/VatRateModelNormalizer.php | 42 +- .../WebHookModelCollectionNormalizer.php | 10 +- .../Normalizer/WebHookModelItemNormalizer.php | 10 +- .../Normalizer/WebHookModelNormalizer.php | 38 +- 395 files changed, 8130 insertions(+), 4156 deletions(-) diff --git a/.jane-openapi b/.jane-openapi index 884ea69e..57d5121f 100644 --- a/.jane-openapi +++ b/.jane-openapi @@ -4,5 +4,5 @@ return [ 'openapi-file' => __DIR__ . '/resources/specification/openapi.json', 'namespace' => 'Starweb\Api\Generated', 'directory' => __DIR__ . '/src/Api/Generated', - 'strict' => true + 'strict' => false ]; diff --git a/src/Api/Generated/Model/AddressModel.php b/src/Api/Generated/Model/AddressModel.php index bd535166..76300196 100644 --- a/src/Api/Generated/Model/AddressModel.php +++ b/src/Api/Generated/Model/AddressModel.php @@ -7,98 +7,98 @@ class AddressModel /** * Company name * - * @var string + * @var string|null */ protected $companyName; /** * First name * - * @var string + * @var string|null */ protected $firstName; /** * Last name * - * @var string + * @var string|null */ protected $lastName; /** * Care Of * - * @var string + * @var string|null */ protected $careOf; /** * Attention * - * @var string + * @var string|null */ protected $attention; /** * Reference * - * @var string + * @var string|null */ protected $reference; /** * Address * - * @var string + * @var string|null */ protected $address; /** * Postal Code * - * @var string + * @var string|null */ protected $postalCode; /** * City * - * @var string + * @var string|null */ protected $city; /** * State * - * @var string + * @var string|null */ protected $state; /** * Country code in ISO 3166-1 alpha-2 format * - * @var string + * @var string|null */ protected $countryCode; /** * Phone number in an international format * - * @var string + * @var string|null */ protected $phoneNo; /** * Mobile phone number in an international format * - * @var string + * @var string|null */ protected $mobilePhoneNo; /** * Company name * - * @return string + * @return string|null */ - public function getCompanyName() : string + public function getCompanyName() : ?string { return $this->companyName; } /** * Company name * - * @param string $companyName + * @param string|null $companyName * * @return self */ - public function setCompanyName(string $companyName) : self + public function setCompanyName(?string $companyName) : self { $this->companyName = $companyName; return $this; @@ -106,20 +106,20 @@ public function setCompanyName(string $companyName) : self /** * First name * - * @return string + * @return string|null */ - public function getFirstName() : string + public function getFirstName() : ?string { return $this->firstName; } /** * First name * - * @param string $firstName + * @param string|null $firstName * * @return self */ - public function setFirstName(string $firstName) : self + public function setFirstName(?string $firstName) : self { $this->firstName = $firstName; return $this; @@ -127,20 +127,20 @@ public function setFirstName(string $firstName) : self /** * Last name * - * @return string + * @return string|null */ - public function getLastName() : string + public function getLastName() : ?string { return $this->lastName; } /** * Last name * - * @param string $lastName + * @param string|null $lastName * * @return self */ - public function setLastName(string $lastName) : self + public function setLastName(?string $lastName) : self { $this->lastName = $lastName; return $this; @@ -148,20 +148,20 @@ public function setLastName(string $lastName) : self /** * Care Of * - * @return string + * @return string|null */ - public function getCareOf() : string + public function getCareOf() : ?string { return $this->careOf; } /** * Care Of * - * @param string $careOf + * @param string|null $careOf * * @return self */ - public function setCareOf(string $careOf) : self + public function setCareOf(?string $careOf) : self { $this->careOf = $careOf; return $this; @@ -169,20 +169,20 @@ public function setCareOf(string $careOf) : self /** * Attention * - * @return string + * @return string|null */ - public function getAttention() : string + public function getAttention() : ?string { return $this->attention; } /** * Attention * - * @param string $attention + * @param string|null $attention * * @return self */ - public function setAttention(string $attention) : self + public function setAttention(?string $attention) : self { $this->attention = $attention; return $this; @@ -190,20 +190,20 @@ public function setAttention(string $attention) : self /** * Reference * - * @return string + * @return string|null */ - public function getReference() : string + public function getReference() : ?string { return $this->reference; } /** * Reference * - * @param string $reference + * @param string|null $reference * * @return self */ - public function setReference(string $reference) : self + public function setReference(?string $reference) : self { $this->reference = $reference; return $this; @@ -211,20 +211,20 @@ public function setReference(string $reference) : self /** * Address * - * @return string + * @return string|null */ - public function getAddress() : string + public function getAddress() : ?string { return $this->address; } /** * Address * - * @param string $address + * @param string|null $address * * @return self */ - public function setAddress(string $address) : self + public function setAddress(?string $address) : self { $this->address = $address; return $this; @@ -232,20 +232,20 @@ public function setAddress(string $address) : self /** * Postal Code * - * @return string + * @return string|null */ - public function getPostalCode() : string + public function getPostalCode() : ?string { return $this->postalCode; } /** * Postal Code * - * @param string $postalCode + * @param string|null $postalCode * * @return self */ - public function setPostalCode(string $postalCode) : self + public function setPostalCode(?string $postalCode) : self { $this->postalCode = $postalCode; return $this; @@ -253,20 +253,20 @@ public function setPostalCode(string $postalCode) : self /** * City * - * @return string + * @return string|null */ - public function getCity() : string + public function getCity() : ?string { return $this->city; } /** * City * - * @param string $city + * @param string|null $city * * @return self */ - public function setCity(string $city) : self + public function setCity(?string $city) : self { $this->city = $city; return $this; @@ -274,20 +274,20 @@ public function setCity(string $city) : self /** * State * - * @return string + * @return string|null */ - public function getState() : string + public function getState() : ?string { return $this->state; } /** * State * - * @param string $state + * @param string|null $state * * @return self */ - public function setState(string $state) : self + public function setState(?string $state) : self { $this->state = $state; return $this; @@ -295,20 +295,20 @@ public function setState(string $state) : self /** * Country code in ISO 3166-1 alpha-2 format * - * @return string + * @return string|null */ - public function getCountryCode() : string + public function getCountryCode() : ?string { return $this->countryCode; } /** * Country code in ISO 3166-1 alpha-2 format * - * @param string $countryCode + * @param string|null $countryCode * * @return self */ - public function setCountryCode(string $countryCode) : self + public function setCountryCode(?string $countryCode) : self { $this->countryCode = $countryCode; return $this; @@ -316,20 +316,20 @@ public function setCountryCode(string $countryCode) : self /** * Phone number in an international format * - * @return string + * @return string|null */ - public function getPhoneNo() : string + public function getPhoneNo() : ?string { return $this->phoneNo; } /** * Phone number in an international format * - * @param string $phoneNo + * @param string|null $phoneNo * * @return self */ - public function setPhoneNo(string $phoneNo) : self + public function setPhoneNo(?string $phoneNo) : self { $this->phoneNo = $phoneNo; return $this; @@ -337,20 +337,20 @@ public function setPhoneNo(string $phoneNo) : self /** * Mobile phone number in an international format * - * @return string + * @return string|null */ - public function getMobilePhoneNo() : string + public function getMobilePhoneNo() : ?string { return $this->mobilePhoneNo; } /** * Mobile phone number in an international format * - * @param string $mobilePhoneNo + * @param string|null $mobilePhoneNo * * @return self */ - public function setMobilePhoneNo(string $mobilePhoneNo) : self + public function setMobilePhoneNo(?string $mobilePhoneNo) : self { $this->mobilePhoneNo = $mobilePhoneNo; return $this; diff --git a/src/Api/Generated/Model/AddressModelItem.php b/src/Api/Generated/Model/AddressModelItem.php index 32f8846a..018e58f5 100644 --- a/src/Api/Generated/Model/AddressModelItem.php +++ b/src/Api/Generated/Model/AddressModelItem.php @@ -7,26 +7,26 @@ class AddressModelItem /** * * - * @var AddressModel + * @var AddressModel|null */ protected $data; /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getData() : AddressModel + public function getData() : ?AddressModel { return $this->data; } /** * * - * @param AddressModel $data + * @param AddressModel|null $data * * @return self */ - public function setData(AddressModel $data) : self + public function setData(?AddressModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/BundledProductsModel.php b/src/Api/Generated/Model/BundledProductsModel.php index 8e2cd7a5..cbd2598c 100644 --- a/src/Api/Generated/Model/BundledProductsModel.php +++ b/src/Api/Generated/Model/BundledProductsModel.php @@ -7,19 +7,19 @@ class BundledProductsModel /** * Bundled product only valid for a single variant * - * @var bool + * @var bool|null */ protected $singleVariant; /** * The bundled products id * - * @var int + * @var int|null */ protected $bundledProductId; /** * The sku of the variant the product is locked to in the variant * - * @var string + * @var string|null */ protected $variantSku; /** @@ -31,32 +31,32 @@ class BundledProductsModel /** * The sort index of this bundled product. * - * @var int + * @var int|null */ protected $sortIndex; /** * A collection of bundled product prices * - * @var ProductBundleProductPriceModel[] + * @var ProductBundleProductPriceModel[]|null */ protected $prices; /** * Bundled product only valid for a single variant * - * @return bool + * @return bool|null */ - public function getSingleVariant() : bool + public function getSingleVariant() : ?bool { return $this->singleVariant; } /** * Bundled product only valid for a single variant * - * @param bool $singleVariant + * @param bool|null $singleVariant * * @return self */ - public function setSingleVariant(bool $singleVariant) : self + public function setSingleVariant(?bool $singleVariant) : self { $this->singleVariant = $singleVariant; return $this; @@ -64,20 +64,20 @@ public function setSingleVariant(bool $singleVariant) : self /** * The bundled products id * - * @return int + * @return int|null */ - public function getBundledProductId() : int + public function getBundledProductId() : ?int { return $this->bundledProductId; } /** * The bundled products id * - * @param int $bundledProductId + * @param int|null $bundledProductId * * @return self */ - public function setBundledProductId(int $bundledProductId) : self + public function setBundledProductId(?int $bundledProductId) : self { $this->bundledProductId = $bundledProductId; return $this; @@ -85,20 +85,20 @@ public function setBundledProductId(int $bundledProductId) : self /** * The sku of the variant the product is locked to in the variant * - * @return string + * @return string|null */ - public function getVariantSku() : string + public function getVariantSku() : ?string { return $this->variantSku; } /** * The sku of the variant the product is locked to in the variant * - * @param string $variantSku + * @param string|null $variantSku * * @return self */ - public function setVariantSku(string $variantSku) : self + public function setVariantSku(?string $variantSku) : self { $this->variantSku = $variantSku; return $this; @@ -127,20 +127,20 @@ public function setQuantity(?int $quantity) : self /** * The sort index of this bundled product. * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of this bundled product. * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -148,20 +148,20 @@ public function setSortIndex(int $sortIndex) : self /** * A collection of bundled product prices * - * @return ProductBundleProductPriceModel[] + * @return ProductBundleProductPriceModel[]|null */ - public function getPrices() : array + public function getPrices() : ?array { return $this->prices; } /** * A collection of bundled product prices * - * @param ProductBundleProductPriceModel[] $prices + * @param ProductBundleProductPriceModel[]|null $prices * * @return self */ - public function setPrices(array $prices) : self + public function setPrices(?array $prices) : self { $this->prices = $prices; return $this; diff --git a/src/Api/Generated/Model/BundledProductsModelCollection.php b/src/Api/Generated/Model/BundledProductsModelCollection.php index 65bf542a..64080188 100644 --- a/src/Api/Generated/Model/BundledProductsModelCollection.php +++ b/src/Api/Generated/Model/BundledProductsModelCollection.php @@ -7,26 +7,26 @@ class BundledProductsModelCollection /** * A collection of bundled products * - * @var BundledProductsModel[] + * @var BundledProductsModel[]|null */ protected $data; /** * A collection of bundled products * - * @return BundledProductsModel[] + * @return BundledProductsModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of bundled products * - * @param BundledProductsModel[] $data + * @param BundledProductsModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/BundledProductsModelItem.php b/src/Api/Generated/Model/BundledProductsModelItem.php index 6588d0eb..bb75211b 100644 --- a/src/Api/Generated/Model/BundledProductsModelItem.php +++ b/src/Api/Generated/Model/BundledProductsModelItem.php @@ -7,26 +7,26 @@ class BundledProductsModelItem /** * * - * @var BundledProductsModel + * @var BundledProductsModel|null */ protected $data; /** * * - * @return BundledProductsModel + * @return BundledProductsModel|null */ - public function getData() : BundledProductsModel + public function getData() : ?BundledProductsModel { return $this->data; } /** * * - * @param BundledProductsModel $data + * @param BundledProductsModel|null $data * * @return self */ - public function setData(BundledProductsModel $data) : self + public function setData(?BundledProductsModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ClientCredentialModel.php b/src/Api/Generated/Model/ClientCredentialModel.php index 2b375348..333eb801 100644 --- a/src/Api/Generated/Model/ClientCredentialModel.php +++ b/src/Api/Generated/Model/ClientCredentialModel.php @@ -7,38 +7,38 @@ class ClientCredentialModel /** * The grant type to use for the request. At this time, only client_credentials is allowed * - * @var string + * @var string|null */ protected $grantType; /** * Your client id * - * @var string + * @var string|null */ protected $clientId; /** * Your client secret * - * @var string + * @var string|null */ protected $clientSecret; /** * The grant type to use for the request. At this time, only client_credentials is allowed * - * @return string + * @return string|null */ - public function getGrantType() : string + public function getGrantType() : ?string { return $this->grantType; } /** * The grant type to use for the request. At this time, only client_credentials is allowed * - * @param string $grantType + * @param string|null $grantType * * @return self */ - public function setGrantType(string $grantType) : self + public function setGrantType(?string $grantType) : self { $this->grantType = $grantType; return $this; @@ -46,20 +46,20 @@ public function setGrantType(string $grantType) : self /** * Your client id * - * @return string + * @return string|null */ - public function getClientId() : string + public function getClientId() : ?string { return $this->clientId; } /** * Your client id * - * @param string $clientId + * @param string|null $clientId * * @return self */ - public function setClientId(string $clientId) : self + public function setClientId(?string $clientId) : self { $this->clientId = $clientId; return $this; @@ -67,20 +67,20 @@ public function setClientId(string $clientId) : self /** * Your client secret * - * @return string + * @return string|null */ - public function getClientSecret() : string + public function getClientSecret() : ?string { return $this->clientSecret; } /** * Your client secret * - * @param string $clientSecret + * @param string|null $clientSecret * * @return self */ - public function setClientSecret(string $clientSecret) : self + public function setClientSecret(?string $clientSecret) : self { $this->clientSecret = $clientSecret; return $this; diff --git a/src/Api/Generated/Model/CurrencyCollection.php b/src/Api/Generated/Model/CurrencyCollection.php index 6cc05fd6..4f9d2b98 100644 --- a/src/Api/Generated/Model/CurrencyCollection.php +++ b/src/Api/Generated/Model/CurrencyCollection.php @@ -7,26 +7,26 @@ class CurrencyCollection /** * A collection of currencies * - * @var CurrencyModel[] + * @var CurrencyModel[]|null */ protected $data; /** * A collection of currencies * - * @return CurrencyModel[] + * @return CurrencyModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of currencies * - * @param CurrencyModel[] $data + * @param CurrencyModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CurrencyModel.php b/src/Api/Generated/Model/CurrencyModel.php index a2a89fbd..d925d165 100644 --- a/src/Api/Generated/Model/CurrencyModel.php +++ b/src/Api/Generated/Model/CurrencyModel.php @@ -7,38 +7,38 @@ class CurrencyModel /** * The currency code * - * @var string + * @var string|null */ protected $code; /** * The exchange rate against the shops default currency. Used in reports, etc. The default currency can be fetched from /shop * - * @var float + * @var float|null */ protected $exchangeRate; /** * The number of decimals to show and use * - * @var int + * @var int|null */ protected $precision; /** * The currency code * - * @return string + * @return string|null */ - public function getCode() : string + public function getCode() : ?string { return $this->code; } /** * The currency code * - * @param string $code + * @param string|null $code * * @return self */ - public function setCode(string $code) : self + public function setCode(?string $code) : self { $this->code = $code; return $this; @@ -46,20 +46,20 @@ public function setCode(string $code) : self /** * The exchange rate against the shops default currency. Used in reports, etc. The default currency can be fetched from /shop * - * @return float + * @return float|null */ - public function getExchangeRate() : float + public function getExchangeRate() : ?float { return $this->exchangeRate; } /** * The exchange rate against the shops default currency. Used in reports, etc. The default currency can be fetched from /shop * - * @param float $exchangeRate + * @param float|null $exchangeRate * * @return self */ - public function setExchangeRate(float $exchangeRate) : self + public function setExchangeRate(?float $exchangeRate) : self { $this->exchangeRate = $exchangeRate; return $this; @@ -67,20 +67,20 @@ public function setExchangeRate(float $exchangeRate) : self /** * The number of decimals to show and use * - * @return int + * @return int|null */ - public function getPrecision() : int + public function getPrecision() : ?int { return $this->precision; } /** * The number of decimals to show and use * - * @param int $precision + * @param int|null $precision * * @return self */ - public function setPrecision(int $precision) : self + public function setPrecision(?int $precision) : self { $this->precision = $precision; return $this; diff --git a/src/Api/Generated/Model/CurrencyModelItem.php b/src/Api/Generated/Model/CurrencyModelItem.php index 79a4ac44..0a06725c 100644 --- a/src/Api/Generated/Model/CurrencyModelItem.php +++ b/src/Api/Generated/Model/CurrencyModelItem.php @@ -7,26 +7,26 @@ class CurrencyModelItem /** * * - * @var CurrencyModel + * @var CurrencyModel|null */ protected $data; /** * * - * @return CurrencyModel + * @return CurrencyModel|null */ - public function getData() : CurrencyModel + public function getData() : ?CurrencyModel { return $this->data; } /** * * - * @param CurrencyModel $data + * @param CurrencyModel|null $data * * @return self */ - public function setData(CurrencyModel $data) : self + public function setData(?CurrencyModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerAddedTagModel.php b/src/Api/Generated/Model/CustomerAddedTagModel.php index e22c7a16..09217e13 100644 --- a/src/Api/Generated/Model/CustomerAddedTagModel.php +++ b/src/Api/Generated/Model/CustomerAddedTagModel.php @@ -7,32 +7,32 @@ class CustomerAddedTagModel /** * The id of the tag * - * @var int + * @var int|null */ protected $tagId; /** * The name of the tag * - * @var string + * @var string|null */ protected $name; /** * The id of the tag * - * @return int + * @return int|null */ - public function getTagId() : int + public function getTagId() : ?int { return $this->tagId; } /** * The id of the tag * - * @param int $tagId + * @param int|null $tagId * * @return self */ - public function setTagId(int $tagId) : self + public function setTagId(?int $tagId) : self { $this->tagId = $tagId; return $this; @@ -40,20 +40,20 @@ public function setTagId(int $tagId) : self /** * The name of the tag * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of the tag * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/CustomerAddedTagModelCollection.php b/src/Api/Generated/Model/CustomerAddedTagModelCollection.php index 0fad2977..6df00abf 100644 --- a/src/Api/Generated/Model/CustomerAddedTagModelCollection.php +++ b/src/Api/Generated/Model/CustomerAddedTagModelCollection.php @@ -7,26 +7,26 @@ class CustomerAddedTagModelCollection /** * A list of customer tags * - * @var CustomerAddedTagModel[] + * @var CustomerAddedTagModel[]|null */ protected $data; /** * A list of customer tags * - * @return CustomerAddedTagModel[] + * @return CustomerAddedTagModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of customer tags * - * @param CustomerAddedTagModel[] $data + * @param CustomerAddedTagModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerAddedTagModelItem.php b/src/Api/Generated/Model/CustomerAddedTagModelItem.php index 7e9975db..5e3bd619 100644 --- a/src/Api/Generated/Model/CustomerAddedTagModelItem.php +++ b/src/Api/Generated/Model/CustomerAddedTagModelItem.php @@ -7,26 +7,26 @@ class CustomerAddedTagModelItem /** * * - * @var CustomerAddedTagModel + * @var CustomerAddedTagModel|null */ protected $data; /** * * - * @return CustomerAddedTagModel + * @return CustomerAddedTagModel|null */ - public function getData() : CustomerAddedTagModel + public function getData() : ?CustomerAddedTagModel { return $this->data; } /** * * - * @param CustomerAddedTagModel $data + * @param CustomerAddedTagModel|null $data * * @return self */ - public function setData(CustomerAddedTagModel $data) : self + public function setData(?CustomerAddedTagModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerAddressesModelCollection.php b/src/Api/Generated/Model/CustomerAddressesModelCollection.php index 6812530c..ad830b29 100644 --- a/src/Api/Generated/Model/CustomerAddressesModelCollection.php +++ b/src/Api/Generated/Model/CustomerAddressesModelCollection.php @@ -7,26 +7,26 @@ class CustomerAddressesModelCollection /** * * - * @var CustomerAddressesModelCollectionData + * @var CustomerAddressesModelCollectionData|null */ protected $data; /** * * - * @return CustomerAddressesModelCollectionData + * @return CustomerAddressesModelCollectionData|null */ - public function getData() : CustomerAddressesModelCollectionData + public function getData() : ?CustomerAddressesModelCollectionData { return $this->data; } /** * * - * @param CustomerAddressesModelCollectionData $data + * @param CustomerAddressesModelCollectionData|null $data * * @return self */ - public function setData(CustomerAddressesModelCollectionData $data) : self + public function setData(?CustomerAddressesModelCollectionData $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php b/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php index 90d6a498..e857e079 100644 --- a/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php +++ b/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php @@ -7,32 +7,32 @@ class CustomerAddressesModelCollectionData /** * * - * @var AddressModel + * @var AddressModel|null */ protected $invoice; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $delivery; /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getInvoice() : AddressModel + public function getInvoice() : ?AddressModel { return $this->invoice; } /** * * - * @param AddressModel $invoice + * @param AddressModel|null $invoice * * @return self */ - public function setInvoice(AddressModel $invoice) : self + public function setInvoice(?AddressModel $invoice) : self { $this->invoice = $invoice; return $this; @@ -40,20 +40,20 @@ public function setInvoice(AddressModel $invoice) : self /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getDelivery() : AddressModel + public function getDelivery() : ?AddressModel { return $this->delivery; } /** * * - * @param AddressModel $delivery + * @param AddressModel|null $delivery * * @return self */ - public function setDelivery(AddressModel $delivery) : self + public function setDelivery(?AddressModel $delivery) : self { $this->delivery = $delivery; return $this; diff --git a/src/Api/Generated/Model/CustomerAddressesModelItem.php b/src/Api/Generated/Model/CustomerAddressesModelItem.php index b3375f4c..547ef8e9 100644 --- a/src/Api/Generated/Model/CustomerAddressesModelItem.php +++ b/src/Api/Generated/Model/CustomerAddressesModelItem.php @@ -7,26 +7,26 @@ class CustomerAddressesModelItem /** * * - * @var AddressModel + * @var AddressModel|null */ protected $data; /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getData() : AddressModel + public function getData() : ?AddressModel { return $this->data; } /** * * - * @param AddressModel $data + * @param AddressModel|null $data * * @return self */ - public function setData(AddressModel $data) : self + public function setData(?AddressModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerCreatedModel.php b/src/Api/Generated/Model/CustomerCreatedModel.php index d8373fe0..95ea3734 100644 --- a/src/Api/Generated/Model/CustomerCreatedModel.php +++ b/src/Api/Generated/Model/CustomerCreatedModel.php @@ -7,55 +7,55 @@ class CustomerCreatedModel /** * The customers ID * - * @var int + * @var int|null */ protected $customerId; /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The type of customer this is. Either: ”person” or ”company” * - * @var string + * @var string|null */ protected $type; /** * Email address of the customer * - * @var string + * @var string|null */ protected $email; /** * National id number of the customer * - * @var string + * @var string|null */ protected $nationalIdNo; /** * VAT number of the customer * - * @var string + * @var string|null */ protected $vatNo; /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @var string + * @var string|null */ protected $customInfo1; /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @var string + * @var string|null */ protected $customInfo2; /** * A timestamp of when the customer was modified. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** @@ -67,7 +67,7 @@ class CustomerCreatedModel /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $approvedAt; /** @@ -79,20 +79,20 @@ class CustomerCreatedModel /** * The customers ID * - * @return int + * @return int|null */ - public function getCustomerId() : int + public function getCustomerId() : ?int { return $this->customerId; } /** * The customers ID * - * @param int $customerId + * @param int|null $customerId * * @return self */ - public function setCustomerId(int $customerId) : self + public function setCustomerId(?int $customerId) : self { $this->customerId = $customerId; return $this; @@ -100,20 +100,20 @@ public function setCustomerId(int $customerId) : self /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -121,20 +121,20 @@ public function setCreatedAt(string $createdAt) : self /** * The type of customer this is. Either: ”person” or ”company” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of customer this is. Either: ”person” or ”company” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -142,20 +142,20 @@ public function setType(string $type) : self /** * Email address of the customer * - * @return string + * @return string|null */ - public function getEmail() : string + public function getEmail() : ?string { return $this->email; } /** * Email address of the customer * - * @param string $email + * @param string|null $email * * @return self */ - public function setEmail(string $email) : self + public function setEmail(?string $email) : self { $this->email = $email; return $this; @@ -163,20 +163,20 @@ public function setEmail(string $email) : self /** * National id number of the customer * - * @return string + * @return string|null */ - public function getNationalIdNo() : string + public function getNationalIdNo() : ?string { return $this->nationalIdNo; } /** * National id number of the customer * - * @param string $nationalIdNo + * @param string|null $nationalIdNo * * @return self */ - public function setNationalIdNo(string $nationalIdNo) : self + public function setNationalIdNo(?string $nationalIdNo) : self { $this->nationalIdNo = $nationalIdNo; return $this; @@ -184,20 +184,20 @@ public function setNationalIdNo(string $nationalIdNo) : self /** * VAT number of the customer * - * @return string + * @return string|null */ - public function getVatNo() : string + public function getVatNo() : ?string { return $this->vatNo; } /** * VAT number of the customer * - * @param string $vatNo + * @param string|null $vatNo * * @return self */ - public function setVatNo(string $vatNo) : self + public function setVatNo(?string $vatNo) : self { $this->vatNo = $vatNo; return $this; @@ -205,20 +205,20 @@ public function setVatNo(string $vatNo) : self /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo1() : string + public function getCustomInfo1() : ?string { return $this->customInfo1; } /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @param string $customInfo1 + * @param string|null $customInfo1 * * @return self */ - public function setCustomInfo1(string $customInfo1) : self + public function setCustomInfo1(?string $customInfo1) : self { $this->customInfo1 = $customInfo1; return $this; @@ -226,20 +226,20 @@ public function setCustomInfo1(string $customInfo1) : self /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo2() : string + public function getCustomInfo2() : ?string { return $this->customInfo2; } /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @param string $customInfo2 + * @param string|null $customInfo2 * * @return self */ - public function setCustomInfo2(string $customInfo2) : self + public function setCustomInfo2(?string $customInfo2) : self { $this->customInfo2 = $customInfo2; return $this; @@ -247,20 +247,20 @@ public function setCustomInfo2(string $customInfo2) : self /** * A timestamp of when the customer was modified. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the customer was modified. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -289,20 +289,20 @@ public function setApproved(?bool $approved) : self /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getApprovedAt() : string + public function getApprovedAt() : ?string { return $this->approvedAt; } /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @param string $approvedAt + * @param string|null $approvedAt * * @return self */ - public function setApprovedAt(string $approvedAt) : self + public function setApprovedAt(?string $approvedAt) : self { $this->approvedAt = $approvedAt; return $this; diff --git a/src/Api/Generated/Model/CustomerCreatedModelItem.php b/src/Api/Generated/Model/CustomerCreatedModelItem.php index 32850ad0..2aa25173 100644 --- a/src/Api/Generated/Model/CustomerCreatedModelItem.php +++ b/src/Api/Generated/Model/CustomerCreatedModelItem.php @@ -7,26 +7,26 @@ class CustomerCreatedModelItem /** * * - * @var CustomerCreatedModel + * @var CustomerCreatedModel|null */ protected $data; /** * * - * @return CustomerCreatedModel + * @return CustomerCreatedModel|null */ - public function getData() : CustomerCreatedModel + public function getData() : ?CustomerCreatedModel { return $this->data; } /** * * - * @param CustomerCreatedModel $data + * @param CustomerCreatedModel|null $data * * @return self */ - public function setData(CustomerCreatedModel $data) : self + public function setData(?CustomerCreatedModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerExternalServicesModel.php b/src/Api/Generated/Model/CustomerExternalServicesModel.php index 72f4704d..0b6d7341 100644 --- a/src/Api/Generated/Model/CustomerExternalServicesModel.php +++ b/src/Api/Generated/Model/CustomerExternalServicesModel.php @@ -7,32 +7,32 @@ class CustomerExternalServicesModel /** * The service name of the external service * - * @var string + * @var string|null */ protected $serviceName; /** * The external service ID * - * @var string + * @var string|null */ protected $externalIdValue; /** * The service name of the external service * - * @return string + * @return string|null */ - public function getServiceName() : string + public function getServiceName() : ?string { return $this->serviceName; } /** * The service name of the external service * - * @param string $serviceName + * @param string|null $serviceName * * @return self */ - public function setServiceName(string $serviceName) : self + public function setServiceName(?string $serviceName) : self { $this->serviceName = $serviceName; return $this; @@ -40,20 +40,20 @@ public function setServiceName(string $serviceName) : self /** * The external service ID * - * @return string + * @return string|null */ - public function getExternalIdValue() : string + public function getExternalIdValue() : ?string { return $this->externalIdValue; } /** * The external service ID * - * @param string $externalIdValue + * @param string|null $externalIdValue * * @return self */ - public function setExternalIdValue(string $externalIdValue) : self + public function setExternalIdValue(?string $externalIdValue) : self { $this->externalIdValue = $externalIdValue; return $this; diff --git a/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php b/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php index a34e7feb..9df347fc 100644 --- a/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php +++ b/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php @@ -7,26 +7,26 @@ class CustomerExternalServicesModelCollection /** * A list of customer external services * - * @var CustomerExternalServicesModel[] + * @var CustomerExternalServicesModel[]|null */ protected $data; /** * A list of customer external services * - * @return CustomerExternalServicesModel[] + * @return CustomerExternalServicesModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of customer external services * - * @param CustomerExternalServicesModel[] $data + * @param CustomerExternalServicesModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerExternalServicesModelItem.php b/src/Api/Generated/Model/CustomerExternalServicesModelItem.php index 413f0279..b5a7493b 100644 --- a/src/Api/Generated/Model/CustomerExternalServicesModelItem.php +++ b/src/Api/Generated/Model/CustomerExternalServicesModelItem.php @@ -7,26 +7,26 @@ class CustomerExternalServicesModelItem /** * * - * @var CustomerExternalServicesModel + * @var CustomerExternalServicesModel|null */ protected $data; /** * * - * @return CustomerExternalServicesModel + * @return CustomerExternalServicesModel|null */ - public function getData() : CustomerExternalServicesModel + public function getData() : ?CustomerExternalServicesModel { return $this->data; } /** * * - * @param CustomerExternalServicesModel $data + * @param CustomerExternalServicesModel|null $data * * @return self */ - public function setData(CustomerExternalServicesModel $data) : self + public function setData(?CustomerExternalServicesModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerModel.php b/src/Api/Generated/Model/CustomerModel.php index cc60f4c3..684d41c0 100644 --- a/src/Api/Generated/Model/CustomerModel.php +++ b/src/Api/Generated/Model/CustomerModel.php @@ -7,55 +7,55 @@ class CustomerModel /** * The customers ID * - * @var int + * @var int|null */ protected $customerId; /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The type of customer this is. Either: ”person” or ”company” * - * @var string + * @var string|null */ protected $type; /** * Email address of the customer * - * @var string + * @var string|null */ protected $email; /** * National id number of the customer * - * @var string + * @var string|null */ protected $nationalIdNo; /** * VAT number of the customer * - * @var string + * @var string|null */ protected $vatNo; /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @var string + * @var string|null */ protected $customInfo1; /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @var string + * @var string|null */ protected $customInfo2; /** * A timestamp of when the customer was modified. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** @@ -67,7 +67,7 @@ class CustomerModel /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $approvedAt; /** @@ -79,20 +79,20 @@ class CustomerModel /** * The customers ID * - * @return int + * @return int|null */ - public function getCustomerId() : int + public function getCustomerId() : ?int { return $this->customerId; } /** * The customers ID * - * @param int $customerId + * @param int|null $customerId * * @return self */ - public function setCustomerId(int $customerId) : self + public function setCustomerId(?int $customerId) : self { $this->customerId = $customerId; return $this; @@ -100,20 +100,20 @@ public function setCustomerId(int $customerId) : self /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -121,20 +121,20 @@ public function setCreatedAt(string $createdAt) : self /** * The type of customer this is. Either: ”person” or ”company” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of customer this is. Either: ”person” or ”company” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -142,20 +142,20 @@ public function setType(string $type) : self /** * Email address of the customer * - * @return string + * @return string|null */ - public function getEmail() : string + public function getEmail() : ?string { return $this->email; } /** * Email address of the customer * - * @param string $email + * @param string|null $email * * @return self */ - public function setEmail(string $email) : self + public function setEmail(?string $email) : self { $this->email = $email; return $this; @@ -163,20 +163,20 @@ public function setEmail(string $email) : self /** * National id number of the customer * - * @return string + * @return string|null */ - public function getNationalIdNo() : string + public function getNationalIdNo() : ?string { return $this->nationalIdNo; } /** * National id number of the customer * - * @param string $nationalIdNo + * @param string|null $nationalIdNo * * @return self */ - public function setNationalIdNo(string $nationalIdNo) : self + public function setNationalIdNo(?string $nationalIdNo) : self { $this->nationalIdNo = $nationalIdNo; return $this; @@ -184,20 +184,20 @@ public function setNationalIdNo(string $nationalIdNo) : self /** * VAT number of the customer * - * @return string + * @return string|null */ - public function getVatNo() : string + public function getVatNo() : ?string { return $this->vatNo; } /** * VAT number of the customer * - * @param string $vatNo + * @param string|null $vatNo * * @return self */ - public function setVatNo(string $vatNo) : self + public function setVatNo(?string $vatNo) : self { $this->vatNo = $vatNo; return $this; @@ -205,20 +205,20 @@ public function setVatNo(string $vatNo) : self /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo1() : string + public function getCustomInfo1() : ?string { return $this->customInfo1; } /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @param string $customInfo1 + * @param string|null $customInfo1 * * @return self */ - public function setCustomInfo1(string $customInfo1) : self + public function setCustomInfo1(?string $customInfo1) : self { $this->customInfo1 = $customInfo1; return $this; @@ -226,20 +226,20 @@ public function setCustomInfo1(string $customInfo1) : self /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo2() : string + public function getCustomInfo2() : ?string { return $this->customInfo2; } /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @param string $customInfo2 + * @param string|null $customInfo2 * * @return self */ - public function setCustomInfo2(string $customInfo2) : self + public function setCustomInfo2(?string $customInfo2) : self { $this->customInfo2 = $customInfo2; return $this; @@ -247,20 +247,20 @@ public function setCustomInfo2(string $customInfo2) : self /** * A timestamp of when the customer was modified. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the customer was modified. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -289,20 +289,20 @@ public function setApproved(?bool $approved) : self /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getApprovedAt() : string + public function getApprovedAt() : ?string { return $this->approvedAt; } /** * A timestamp of when the customer was was approved/disapproved. The time should be formatted using ISO-8601 * - * @param string $approvedAt + * @param string|null $approvedAt * * @return self */ - public function setApprovedAt(string $approvedAt) : self + public function setApprovedAt(?string $approvedAt) : self { $this->approvedAt = $approvedAt; return $this; diff --git a/src/Api/Generated/Model/CustomerModelCollection.php b/src/Api/Generated/Model/CustomerModelCollection.php index 4b438885..ba4105e5 100644 --- a/src/Api/Generated/Model/CustomerModelCollection.php +++ b/src/Api/Generated/Model/CustomerModelCollection.php @@ -7,32 +7,32 @@ class CustomerModelCollection /** * A list of customers * - * @var CustomerModel[] + * @var CustomerModel[]|null */ protected $data; /** * * - * @var CustomerModelCollectionMeta + * @var CustomerModelCollectionMeta|null */ protected $meta; /** * A list of customers * - * @return CustomerModel[] + * @return CustomerModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of customers * - * @param CustomerModel[] $data + * @param CustomerModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; @@ -40,20 +40,20 @@ public function setData(array $data) : self /** * * - * @return CustomerModelCollectionMeta + * @return CustomerModelCollectionMeta|null */ - public function getMeta() : CustomerModelCollectionMeta + public function getMeta() : ?CustomerModelCollectionMeta { return $this->meta; } /** * * - * @param CustomerModelCollectionMeta $meta + * @param CustomerModelCollectionMeta|null $meta * * @return self */ - public function setMeta(CustomerModelCollectionMeta $meta) : self + public function setMeta(?CustomerModelCollectionMeta $meta) : self { $this->meta = $meta; return $this; diff --git a/src/Api/Generated/Model/CustomerModelCollectionMeta.php b/src/Api/Generated/Model/CustomerModelCollectionMeta.php index 814944c7..b3bd2b20 100644 --- a/src/Api/Generated/Model/CustomerModelCollectionMeta.php +++ b/src/Api/Generated/Model/CustomerModelCollectionMeta.php @@ -7,26 +7,26 @@ class CustomerModelCollectionMeta /** * * - * @var PaginationModel + * @var PaginationModel|null */ protected $pagination; /** * * - * @return PaginationModel + * @return PaginationModel|null */ - public function getPagination() : PaginationModel + public function getPagination() : ?PaginationModel { return $this->pagination; } /** * * - * @param PaginationModel $pagination + * @param PaginationModel|null $pagination * * @return self */ - public function setPagination(PaginationModel $pagination) : self + public function setPagination(?PaginationModel $pagination) : self { $this->pagination = $pagination; return $this; diff --git a/src/Api/Generated/Model/CustomerModelItem.php b/src/Api/Generated/Model/CustomerModelItem.php index b9aaadea..fd898aa8 100644 --- a/src/Api/Generated/Model/CustomerModelItem.php +++ b/src/Api/Generated/Model/CustomerModelItem.php @@ -7,26 +7,26 @@ class CustomerModelItem /** * * - * @var CustomerModel + * @var CustomerModel|null */ protected $data; /** * * - * @return CustomerModel + * @return CustomerModel|null */ - public function getData() : CustomerModel + public function getData() : ?CustomerModel { return $this->data; } /** * * - * @param CustomerModel $data + * @param CustomerModel|null $data * * @return self */ - public function setData(CustomerModel $data) : self + public function setData(?CustomerModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerTagModel.php b/src/Api/Generated/Model/CustomerTagModel.php index 10dd5f63..a8b3e976 100644 --- a/src/Api/Generated/Model/CustomerTagModel.php +++ b/src/Api/Generated/Model/CustomerTagModel.php @@ -7,32 +7,32 @@ class CustomerTagModel /** * The tag Id * - * @var int + * @var int|null */ protected $tagId; /** * The tag name * - * @var string + * @var string|null */ protected $name; /** * The tag Id * - * @return int + * @return int|null */ - public function getTagId() : int + public function getTagId() : ?int { return $this->tagId; } /** * The tag Id * - * @param int $tagId + * @param int|null $tagId * * @return self */ - public function setTagId(int $tagId) : self + public function setTagId(?int $tagId) : self { $this->tagId = $tagId; return $this; @@ -40,20 +40,20 @@ public function setTagId(int $tagId) : self /** * The tag name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The tag name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/CustomerTagModelCollection.php b/src/Api/Generated/Model/CustomerTagModelCollection.php index 6dd1510d..3f3d3ce5 100644 --- a/src/Api/Generated/Model/CustomerTagModelCollection.php +++ b/src/Api/Generated/Model/CustomerTagModelCollection.php @@ -7,26 +7,26 @@ class CustomerTagModelCollection /** * A list of customer tags * - * @var CustomerTagModel[] + * @var CustomerTagModel[]|null */ protected $data; /** * A list of customer tags * - * @return CustomerTagModel[] + * @return CustomerTagModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of customer tags * - * @param CustomerTagModel[] $data + * @param CustomerTagModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerTagModelItem.php b/src/Api/Generated/Model/CustomerTagModelItem.php index 030cdd2b..0db2256e 100644 --- a/src/Api/Generated/Model/CustomerTagModelItem.php +++ b/src/Api/Generated/Model/CustomerTagModelItem.php @@ -7,26 +7,26 @@ class CustomerTagModelItem /** * * - * @var CustomerTagModel + * @var CustomerTagModel|null */ protected $data; /** * * - * @return CustomerTagModel + * @return CustomerTagModel|null */ - public function getData() : CustomerTagModel + public function getData() : ?CustomerTagModel { return $this->data; } /** * * - * @param CustomerTagModel $data + * @param CustomerTagModel|null $data * * @return self */ - public function setData(CustomerTagModel $data) : self + public function setData(?CustomerTagModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/CustomerUpdateModel.php b/src/Api/Generated/Model/CustomerUpdateModel.php index 7b1578e7..1918d9f7 100644 --- a/src/Api/Generated/Model/CustomerUpdateModel.php +++ b/src/Api/Generated/Model/CustomerUpdateModel.php @@ -7,49 +7,49 @@ class CustomerUpdateModel /** * The customers ID * - * @var int + * @var int|null */ protected $customerId; /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The type of customer this is. Either: ”person” or ”company” * - * @var string + * @var string|null */ protected $type; /** * Email address of the customer * - * @var string + * @var string|null */ protected $email; /** * National id number of the customer * - * @var string + * @var string|null */ protected $nationalIdNo; /** * VAT number of the customer * - * @var string + * @var string|null */ protected $vatNo; /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @var string + * @var string|null */ protected $customInfo1; /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @var string + * @var string|null */ protected $customInfo2; /** @@ -61,32 +61,32 @@ class CustomerUpdateModel /** * Language code for the customer * - * @var string + * @var string|null */ protected $langCode; /** * * - * @var CustomerUpdateModelAddresses + * @var CustomerUpdateModelAddresses|null */ protected $addresses; /** * The customers ID * - * @return int + * @return int|null */ - public function getCustomerId() : int + public function getCustomerId() : ?int { return $this->customerId; } /** * The customers ID * - * @param int $customerId + * @param int|null $customerId * * @return self */ - public function setCustomerId(int $customerId) : self + public function setCustomerId(?int $customerId) : self { $this->customerId = $customerId; return $this; @@ -94,20 +94,20 @@ public function setCustomerId(int $customerId) : self /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the customer was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -115,20 +115,20 @@ public function setCreatedAt(string $createdAt) : self /** * The type of customer this is. Either: ”person” or ”company” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of customer this is. Either: ”person” or ”company” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -136,20 +136,20 @@ public function setType(string $type) : self /** * Email address of the customer * - * @return string + * @return string|null */ - public function getEmail() : string + public function getEmail() : ?string { return $this->email; } /** * Email address of the customer * - * @param string $email + * @param string|null $email * * @return self */ - public function setEmail(string $email) : self + public function setEmail(?string $email) : self { $this->email = $email; return $this; @@ -157,20 +157,20 @@ public function setEmail(string $email) : self /** * National id number of the customer * - * @return string + * @return string|null */ - public function getNationalIdNo() : string + public function getNationalIdNo() : ?string { return $this->nationalIdNo; } /** * National id number of the customer * - * @param string $nationalIdNo + * @param string|null $nationalIdNo * * @return self */ - public function setNationalIdNo(string $nationalIdNo) : self + public function setNationalIdNo(?string $nationalIdNo) : self { $this->nationalIdNo = $nationalIdNo; return $this; @@ -178,20 +178,20 @@ public function setNationalIdNo(string $nationalIdNo) : self /** * VAT number of the customer * - * @return string + * @return string|null */ - public function getVatNo() : string + public function getVatNo() : ?string { return $this->vatNo; } /** * VAT number of the customer * - * @param string $vatNo + * @param string|null $vatNo * * @return self */ - public function setVatNo(string $vatNo) : self + public function setVatNo(?string $vatNo) : self { $this->vatNo = $vatNo; return $this; @@ -199,20 +199,20 @@ public function setVatNo(string $vatNo) : self /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo1() : string + public function getCustomInfo1() : ?string { return $this->customInfo1; } /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @param string $customInfo1 + * @param string|null $customInfo1 * * @return self */ - public function setCustomInfo1(string $customInfo1) : self + public function setCustomInfo1(?string $customInfo1) : self { $this->customInfo1 = $customInfo1; return $this; @@ -220,20 +220,20 @@ public function setCustomInfo1(string $customInfo1) : self /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo2() : string + public function getCustomInfo2() : ?string { return $this->customInfo2; } /** * Custom info saved to a customer. Can be linked to text fields on the customer registration page for additional data collection * - * @param string $customInfo2 + * @param string|null $customInfo2 * * @return self */ - public function setCustomInfo2(string $customInfo2) : self + public function setCustomInfo2(?string $customInfo2) : self { $this->customInfo2 = $customInfo2; return $this; @@ -262,20 +262,20 @@ public function setPricelistId(?int $pricelistId) : self /** * Language code for the customer * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language code for the customer * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -283,20 +283,20 @@ public function setLangCode(string $langCode) : self /** * * - * @return CustomerUpdateModelAddresses + * @return CustomerUpdateModelAddresses|null */ - public function getAddresses() : CustomerUpdateModelAddresses + public function getAddresses() : ?CustomerUpdateModelAddresses { return $this->addresses; } /** * * - * @param CustomerUpdateModelAddresses $addresses + * @param CustomerUpdateModelAddresses|null $addresses * * @return self */ - public function setAddresses(CustomerUpdateModelAddresses $addresses) : self + public function setAddresses(?CustomerUpdateModelAddresses $addresses) : self { $this->addresses = $addresses; return $this; diff --git a/src/Api/Generated/Model/CustomerUpdateModelAddresses.php b/src/Api/Generated/Model/CustomerUpdateModelAddresses.php index 7748f97e..9faada00 100644 --- a/src/Api/Generated/Model/CustomerUpdateModelAddresses.php +++ b/src/Api/Generated/Model/CustomerUpdateModelAddresses.php @@ -7,32 +7,32 @@ class CustomerUpdateModelAddresses /** * * - * @var AddressModel + * @var AddressModel|null */ protected $invoice; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $delivery; /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getInvoice() : AddressModel + public function getInvoice() : ?AddressModel { return $this->invoice; } /** * * - * @param AddressModel $invoice + * @param AddressModel|null $invoice * * @return self */ - public function setInvoice(AddressModel $invoice) : self + public function setInvoice(?AddressModel $invoice) : self { $this->invoice = $invoice; return $this; @@ -40,20 +40,20 @@ public function setInvoice(AddressModel $invoice) : self /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getDelivery() : AddressModel + public function getDelivery() : ?AddressModel { return $this->delivery; } /** * * - * @param AddressModel $delivery + * @param AddressModel|null $delivery * * @return self */ - public function setDelivery(AddressModel $delivery) : self + public function setDelivery(?AddressModel $delivery) : self { $this->delivery = $delivery; return $this; diff --git a/src/Api/Generated/Model/ErrorModel.php b/src/Api/Generated/Model/ErrorModel.php index 3b867b2b..814f6fb8 100644 --- a/src/Api/Generated/Model/ErrorModel.php +++ b/src/Api/Generated/Model/ErrorModel.php @@ -7,32 +7,32 @@ class ErrorModel /** * An error code for this type of error * - * @var string + * @var string|null */ protected $error; /** * A human readable description of the error * - * @var string + * @var string|null */ protected $errorDescription; /** * An error code for this type of error * - * @return string + * @return string|null */ - public function getError() : string + public function getError() : ?string { return $this->error; } /** * An error code for this type of error * - * @param string $error + * @param string|null $error * * @return self */ - public function setError(string $error) : self + public function setError(?string $error) : self { $this->error = $error; return $this; @@ -40,20 +40,20 @@ public function setError(string $error) : self /** * A human readable description of the error * - * @return string + * @return string|null */ - public function getErrorDescription() : string + public function getErrorDescription() : ?string { return $this->errorDescription; } /** * A human readable description of the error * - * @param string $errorDescription + * @param string|null $errorDescription * * @return self */ - public function setErrorDescription(string $errorDescription) : self + public function setErrorDescription(?string $errorDescription) : self { $this->errorDescription = $errorDescription; return $this; diff --git a/src/Api/Generated/Model/MediaFileModel.php b/src/Api/Generated/Model/MediaFileModel.php index 31124a36..05e5133d 100644 --- a/src/Api/Generated/Model/MediaFileModel.php +++ b/src/Api/Generated/Model/MediaFileModel.php @@ -7,74 +7,74 @@ class MediaFileModel /** * The media file ID * - * @var int + * @var int|null */ protected $mediaFileId; /** * The name of the media file * - * @var string + * @var string|null */ protected $name; /** * A timestamp of when the media file was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * A timestamp of when the media file was modifies. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** * The media files size in bytes * - * @var int + * @var int|null */ protected $size; /** * The media files mime type * - * @var string + * @var string|null */ protected $mime; /** * The media files height in pixels * - * @var int + * @var int|null */ protected $height; /** * The media files width in pixels * - * @var int + * @var int|null */ protected $width; /** * The media files URL * - * @var string + * @var string|null */ protected $url; /** * The media file ID * - * @return int + * @return int|null */ - public function getMediaFileId() : int + public function getMediaFileId() : ?int { return $this->mediaFileId; } /** * The media file ID * - * @param int $mediaFileId + * @param int|null $mediaFileId * * @return self */ - public function setMediaFileId(int $mediaFileId) : self + public function setMediaFileId(?int $mediaFileId) : self { $this->mediaFileId = $mediaFileId; return $this; @@ -82,20 +82,20 @@ public function setMediaFileId(int $mediaFileId) : self /** * The name of the media file * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of the media file * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -103,20 +103,20 @@ public function setName(string $name) : self /** * A timestamp of when the media file was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the media file was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -124,20 +124,20 @@ public function setCreatedAt(string $createdAt) : self /** * A timestamp of when the media file was modifies. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the media file was modifies. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -145,20 +145,20 @@ public function setModifiedAt(string $modifiedAt) : self /** * The media files size in bytes * - * @return int + * @return int|null */ - public function getSize() : int + public function getSize() : ?int { return $this->size; } /** * The media files size in bytes * - * @param int $size + * @param int|null $size * * @return self */ - public function setSize(int $size) : self + public function setSize(?int $size) : self { $this->size = $size; return $this; @@ -166,20 +166,20 @@ public function setSize(int $size) : self /** * The media files mime type * - * @return string + * @return string|null */ - public function getMime() : string + public function getMime() : ?string { return $this->mime; } /** * The media files mime type * - * @param string $mime + * @param string|null $mime * * @return self */ - public function setMime(string $mime) : self + public function setMime(?string $mime) : self { $this->mime = $mime; return $this; @@ -187,20 +187,20 @@ public function setMime(string $mime) : self /** * The media files height in pixels * - * @return int + * @return int|null */ - public function getHeight() : int + public function getHeight() : ?int { return $this->height; } /** * The media files height in pixels * - * @param int $height + * @param int|null $height * * @return self */ - public function setHeight(int $height) : self + public function setHeight(?int $height) : self { $this->height = $height; return $this; @@ -208,20 +208,20 @@ public function setHeight(int $height) : self /** * The media files width in pixels * - * @return int + * @return int|null */ - public function getWidth() : int + public function getWidth() : ?int { return $this->width; } /** * The media files width in pixels * - * @param int $width + * @param int|null $width * * @return self */ - public function setWidth(int $width) : self + public function setWidth(?int $width) : self { $this->width = $width; return $this; @@ -229,20 +229,20 @@ public function setWidth(int $width) : self /** * The media files URL * - * @return string + * @return string|null */ - public function getUrl() : string + public function getUrl() : ?string { return $this->url; } /** * The media files URL * - * @param string $url + * @param string|null $url * * @return self */ - public function setUrl(string $url) : self + public function setUrl(?string $url) : self { $this->url = $url; return $this; diff --git a/src/Api/Generated/Model/MediaFileModelCollection.php b/src/Api/Generated/Model/MediaFileModelCollection.php index f7905b13..3e4ef839 100644 --- a/src/Api/Generated/Model/MediaFileModelCollection.php +++ b/src/Api/Generated/Model/MediaFileModelCollection.php @@ -7,32 +7,32 @@ class MediaFileModelCollection /** * A collection of media files * - * @var MediaFileModel[] + * @var MediaFileModel[]|null */ protected $data; /** * * - * @var MediaFileModelCollectionMeta + * @var MediaFileModelCollectionMeta|null */ protected $meta; /** * A collection of media files * - * @return MediaFileModel[] + * @return MediaFileModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of media files * - * @param MediaFileModel[] $data + * @param MediaFileModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; @@ -40,20 +40,20 @@ public function setData(array $data) : self /** * * - * @return MediaFileModelCollectionMeta + * @return MediaFileModelCollectionMeta|null */ - public function getMeta() : MediaFileModelCollectionMeta + public function getMeta() : ?MediaFileModelCollectionMeta { return $this->meta; } /** * * - * @param MediaFileModelCollectionMeta $meta + * @param MediaFileModelCollectionMeta|null $meta * * @return self */ - public function setMeta(MediaFileModelCollectionMeta $meta) : self + public function setMeta(?MediaFileModelCollectionMeta $meta) : self { $this->meta = $meta; return $this; diff --git a/src/Api/Generated/Model/MediaFileModelCollectionMeta.php b/src/Api/Generated/Model/MediaFileModelCollectionMeta.php index efaa07fa..fd39b45e 100644 --- a/src/Api/Generated/Model/MediaFileModelCollectionMeta.php +++ b/src/Api/Generated/Model/MediaFileModelCollectionMeta.php @@ -7,26 +7,26 @@ class MediaFileModelCollectionMeta /** * * - * @var PaginationModel + * @var PaginationModel|null */ protected $pagination; /** * * - * @return PaginationModel + * @return PaginationModel|null */ - public function getPagination() : PaginationModel + public function getPagination() : ?PaginationModel { return $this->pagination; } /** * * - * @param PaginationModel $pagination + * @param PaginationModel|null $pagination * * @return self */ - public function setPagination(PaginationModel $pagination) : self + public function setPagination(?PaginationModel $pagination) : self { $this->pagination = $pagination; return $this; diff --git a/src/Api/Generated/Model/MediaFileModelItem.php b/src/Api/Generated/Model/MediaFileModelItem.php index a51d7dc5..06b89d47 100644 --- a/src/Api/Generated/Model/MediaFileModelItem.php +++ b/src/Api/Generated/Model/MediaFileModelItem.php @@ -7,26 +7,26 @@ class MediaFileModelItem /** * * - * @var MediaFileModel + * @var MediaFileModel|null */ protected $data; /** * * - * @return MediaFileModel + * @return MediaFileModel|null */ - public function getData() : MediaFileModel + public function getData() : ?MediaFileModel { return $this->data; } /** * * - * @param MediaFileModel $data + * @param MediaFileModel|null $data * * @return self */ - public function setData(MediaFileModel $data) : self + public function setData(?MediaFileModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/MediaFileUploadModel.php b/src/Api/Generated/Model/MediaFileUploadModel.php index 8e0d38ad..45c55496 100644 --- a/src/Api/Generated/Model/MediaFileUploadModel.php +++ b/src/Api/Generated/Model/MediaFileUploadModel.php @@ -7,26 +7,26 @@ class MediaFileUploadModel /** * * - * @var string + * @var string|null */ protected $file; /** * * - * @return string + * @return string|null */ - public function getFile() : string + public function getFile() : ?string { return $this->file; } /** * * - * @param string $file + * @param string|null $file * * @return self */ - public function setFile(string $file) : self + public function setFile(?string $file) : self { $this->file = $file; return $this; diff --git a/src/Api/Generated/Model/OrderAddressCollection.php b/src/Api/Generated/Model/OrderAddressCollection.php index e7936386..48f245eb 100644 --- a/src/Api/Generated/Model/OrderAddressCollection.php +++ b/src/Api/Generated/Model/OrderAddressCollection.php @@ -7,26 +7,26 @@ class OrderAddressCollection /** * * - * @var OrderAddressModel + * @var OrderAddressModel|null */ protected $data; /** * * - * @return OrderAddressModel + * @return OrderAddressModel|null */ - public function getData() : OrderAddressModel + public function getData() : ?OrderAddressModel { return $this->data; } /** * * - * @param OrderAddressModel $data + * @param OrderAddressModel|null $data * * @return self */ - public function setData(OrderAddressModel $data) : self + public function setData(?OrderAddressModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderAddressModel.php b/src/Api/Generated/Model/OrderAddressModel.php index 381e9afc..2a50ce07 100644 --- a/src/Api/Generated/Model/OrderAddressModel.php +++ b/src/Api/Generated/Model/OrderAddressModel.php @@ -7,56 +7,56 @@ class OrderAddressModel /** * * - * @var AddressModel + * @var AddressModel|null */ protected $originalInvoice; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $originalDelivery; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $customerInvoice; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $customerDelivery; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $paymentMethodInvoice; /** * * - * @var AddressModel + * @var AddressModel|null */ protected $paymentMethodDelivery; /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getOriginalInvoice() : AddressModel + public function getOriginalInvoice() : ?AddressModel { return $this->originalInvoice; } /** * * - * @param AddressModel $originalInvoice + * @param AddressModel|null $originalInvoice * * @return self */ - public function setOriginalInvoice(AddressModel $originalInvoice) : self + public function setOriginalInvoice(?AddressModel $originalInvoice) : self { $this->originalInvoice = $originalInvoice; return $this; @@ -64,20 +64,20 @@ public function setOriginalInvoice(AddressModel $originalInvoice) : self /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getOriginalDelivery() : AddressModel + public function getOriginalDelivery() : ?AddressModel { return $this->originalDelivery; } /** * * - * @param AddressModel $originalDelivery + * @param AddressModel|null $originalDelivery * * @return self */ - public function setOriginalDelivery(AddressModel $originalDelivery) : self + public function setOriginalDelivery(?AddressModel $originalDelivery) : self { $this->originalDelivery = $originalDelivery; return $this; @@ -85,20 +85,20 @@ public function setOriginalDelivery(AddressModel $originalDelivery) : self /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getCustomerInvoice() : AddressModel + public function getCustomerInvoice() : ?AddressModel { return $this->customerInvoice; } /** * * - * @param AddressModel $customerInvoice + * @param AddressModel|null $customerInvoice * * @return self */ - public function setCustomerInvoice(AddressModel $customerInvoice) : self + public function setCustomerInvoice(?AddressModel $customerInvoice) : self { $this->customerInvoice = $customerInvoice; return $this; @@ -106,20 +106,20 @@ public function setCustomerInvoice(AddressModel $customerInvoice) : self /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getCustomerDelivery() : AddressModel + public function getCustomerDelivery() : ?AddressModel { return $this->customerDelivery; } /** * * - * @param AddressModel $customerDelivery + * @param AddressModel|null $customerDelivery * * @return self */ - public function setCustomerDelivery(AddressModel $customerDelivery) : self + public function setCustomerDelivery(?AddressModel $customerDelivery) : self { $this->customerDelivery = $customerDelivery; return $this; @@ -127,20 +127,20 @@ public function setCustomerDelivery(AddressModel $customerDelivery) : self /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getPaymentMethodInvoice() : AddressModel + public function getPaymentMethodInvoice() : ?AddressModel { return $this->paymentMethodInvoice; } /** * * - * @param AddressModel $paymentMethodInvoice + * @param AddressModel|null $paymentMethodInvoice * * @return self */ - public function setPaymentMethodInvoice(AddressModel $paymentMethodInvoice) : self + public function setPaymentMethodInvoice(?AddressModel $paymentMethodInvoice) : self { $this->paymentMethodInvoice = $paymentMethodInvoice; return $this; @@ -148,20 +148,20 @@ public function setPaymentMethodInvoice(AddressModel $paymentMethodInvoice) : se /** * * - * @return AddressModel + * @return AddressModel|null */ - public function getPaymentMethodDelivery() : AddressModel + public function getPaymentMethodDelivery() : ?AddressModel { return $this->paymentMethodDelivery; } /** * * - * @param AddressModel $paymentMethodDelivery + * @param AddressModel|null $paymentMethodDelivery * * @return self */ - public function setPaymentMethodDelivery(AddressModel $paymentMethodDelivery) : self + public function setPaymentMethodDelivery(?AddressModel $paymentMethodDelivery) : self { $this->paymentMethodDelivery = $paymentMethodDelivery; return $this; diff --git a/src/Api/Generated/Model/OrderCommentModel.php b/src/Api/Generated/Model/OrderCommentModel.php index aefa0c77..13e5ecc0 100644 --- a/src/Api/Generated/Model/OrderCommentModel.php +++ b/src/Api/Generated/Model/OrderCommentModel.php @@ -7,44 +7,44 @@ class OrderCommentModel /** * The comments id * - * @var int + * @var int|null */ protected $commentId; /** * A timestamp of when the comment was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The comment * - * @var string + * @var string|null */ protected $text; /** * The author of the comment. Either ”admin” or ”customer” * - * @var string + * @var string|null */ protected $from; /** * The comments id * - * @return int + * @return int|null */ - public function getCommentId() : int + public function getCommentId() : ?int { return $this->commentId; } /** * The comments id * - * @param int $commentId + * @param int|null $commentId * * @return self */ - public function setCommentId(int $commentId) : self + public function setCommentId(?int $commentId) : self { $this->commentId = $commentId; return $this; @@ -52,20 +52,20 @@ public function setCommentId(int $commentId) : self /** * A timestamp of when the comment was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the comment was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -73,20 +73,20 @@ public function setCreatedAt(string $createdAt) : self /** * The comment * - * @return string + * @return string|null */ - public function getText() : string + public function getText() : ?string { return $this->text; } /** * The comment * - * @param string $text + * @param string|null $text * * @return self */ - public function setText(string $text) : self + public function setText(?string $text) : self { $this->text = $text; return $this; @@ -94,20 +94,20 @@ public function setText(string $text) : self /** * The author of the comment. Either ”admin” or ”customer” * - * @return string + * @return string|null */ - public function getFrom() : string + public function getFrom() : ?string { return $this->from; } /** * The author of the comment. Either ”admin” or ”customer” * - * @param string $from + * @param string|null $from * * @return self */ - public function setFrom(string $from) : self + public function setFrom(?string $from) : self { $this->from = $from; return $this; diff --git a/src/Api/Generated/Model/OrderCommentModelCollection.php b/src/Api/Generated/Model/OrderCommentModelCollection.php index 4afd154e..bf54ff4c 100644 --- a/src/Api/Generated/Model/OrderCommentModelCollection.php +++ b/src/Api/Generated/Model/OrderCommentModelCollection.php @@ -7,26 +7,26 @@ class OrderCommentModelCollection /** * A list of order comments * - * @var OrderCommentModel[] + * @var OrderCommentModel[]|null */ protected $data; /** * A list of order comments * - * @return OrderCommentModel[] + * @return OrderCommentModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of order comments * - * @param OrderCommentModel[] $data + * @param OrderCommentModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderCommentModelItem.php b/src/Api/Generated/Model/OrderCommentModelItem.php index ffb4216f..cdafed81 100644 --- a/src/Api/Generated/Model/OrderCommentModelItem.php +++ b/src/Api/Generated/Model/OrderCommentModelItem.php @@ -7,26 +7,26 @@ class OrderCommentModelItem /** * * - * @var OrderCommentModel + * @var OrderCommentModel|null */ protected $data; /** * * - * @return OrderCommentModel + * @return OrderCommentModel|null */ - public function getData() : OrderCommentModel + public function getData() : ?OrderCommentModel { return $this->data; } /** * * - * @param OrderCommentModel $data + * @param OrderCommentModel|null $data * * @return self */ - public function setData(OrderCommentModel $data) : self + public function setData(?OrderCommentModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderExternalServiceModel.php b/src/Api/Generated/Model/OrderExternalServiceModel.php index 7dea00f1..cfd9f5d5 100644 --- a/src/Api/Generated/Model/OrderExternalServiceModel.php +++ b/src/Api/Generated/Model/OrderExternalServiceModel.php @@ -7,38 +7,38 @@ class OrderExternalServiceModel /** * The service name that this external id is linked to. Please note that this service name has to be unique for the order * - * @var string + * @var string|null */ protected $serviceName; /** * The external id * - * @var string + * @var string|null */ protected $externalIdValue; /** * Some external services cannot be updated and they have readOnly set to true * - * @var bool + * @var bool|null */ protected $readOnly; /** * The service name that this external id is linked to. Please note that this service name has to be unique for the order * - * @return string + * @return string|null */ - public function getServiceName() : string + public function getServiceName() : ?string { return $this->serviceName; } /** * The service name that this external id is linked to. Please note that this service name has to be unique for the order * - * @param string $serviceName + * @param string|null $serviceName * * @return self */ - public function setServiceName(string $serviceName) : self + public function setServiceName(?string $serviceName) : self { $this->serviceName = $serviceName; return $this; @@ -46,20 +46,20 @@ public function setServiceName(string $serviceName) : self /** * The external id * - * @return string + * @return string|null */ - public function getExternalIdValue() : string + public function getExternalIdValue() : ?string { return $this->externalIdValue; } /** * The external id * - * @param string $externalIdValue + * @param string|null $externalIdValue * * @return self */ - public function setExternalIdValue(string $externalIdValue) : self + public function setExternalIdValue(?string $externalIdValue) : self { $this->externalIdValue = $externalIdValue; return $this; @@ -67,20 +67,20 @@ public function setExternalIdValue(string $externalIdValue) : self /** * Some external services cannot be updated and they have readOnly set to true * - * @return bool + * @return bool|null */ - public function getReadOnly() : bool + public function getReadOnly() : ?bool { return $this->readOnly; } /** * Some external services cannot be updated and they have readOnly set to true * - * @param bool $readOnly + * @param bool|null $readOnly * * @return self */ - public function setReadOnly(bool $readOnly) : self + public function setReadOnly(?bool $readOnly) : self { $this->readOnly = $readOnly; return $this; diff --git a/src/Api/Generated/Model/OrderExternalServiceModelCollection.php b/src/Api/Generated/Model/OrderExternalServiceModelCollection.php index 130eb2b3..77873ed3 100644 --- a/src/Api/Generated/Model/OrderExternalServiceModelCollection.php +++ b/src/Api/Generated/Model/OrderExternalServiceModelCollection.php @@ -7,26 +7,26 @@ class OrderExternalServiceModelCollection /** * A list of order external services * - * @var OrderExternalServiceModel[] + * @var OrderExternalServiceModel[]|null */ protected $data; /** * A list of order external services * - * @return OrderExternalServiceModel[] + * @return OrderExternalServiceModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of order external services * - * @param OrderExternalServiceModel[] $data + * @param OrderExternalServiceModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderExternalServicesModelItem.php b/src/Api/Generated/Model/OrderExternalServicesModelItem.php index 4c860e92..b773a6e7 100644 --- a/src/Api/Generated/Model/OrderExternalServicesModelItem.php +++ b/src/Api/Generated/Model/OrderExternalServicesModelItem.php @@ -7,26 +7,26 @@ class OrderExternalServicesModelItem /** * * - * @var OrderExternalServiceModel + * @var OrderExternalServiceModel|null */ protected $data; /** * * - * @return OrderExternalServiceModel + * @return OrderExternalServiceModel|null */ - public function getData() : OrderExternalServiceModel + public function getData() : ?OrderExternalServiceModel { return $this->data; } /** * * - * @param OrderExternalServiceModel $data + * @param OrderExternalServiceModel|null $data * * @return self */ - public function setData(OrderExternalServiceModel $data) : self + public function setData(?OrderExternalServiceModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderItemBundledModelItem.php b/src/Api/Generated/Model/OrderItemBundledModelItem.php index ecc7b3e7..7012938d 100644 --- a/src/Api/Generated/Model/OrderItemBundledModelItem.php +++ b/src/Api/Generated/Model/OrderItemBundledModelItem.php @@ -7,26 +7,26 @@ class OrderItemBundledModelItem /** * * - * @var OrderItemBundledModelItemBundledItems + * @var OrderItemBundledModelItemBundledItems|null */ protected $bundledItems; /** * * - * @return OrderItemBundledModelItemBundledItems + * @return OrderItemBundledModelItemBundledItems|null */ - public function getBundledItems() : OrderItemBundledModelItemBundledItems + public function getBundledItems() : ?OrderItemBundledModelItemBundledItems { return $this->bundledItems; } /** * * - * @param OrderItemBundledModelItemBundledItems $bundledItems + * @param OrderItemBundledModelItemBundledItems|null $bundledItems * * @return self */ - public function setBundledItems(OrderItemBundledModelItemBundledItems $bundledItems) : self + public function setBundledItems(?OrderItemBundledModelItemBundledItems $bundledItems) : self { $this->bundledItems = $bundledItems; return $this; diff --git a/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php index 19a7f776..798bfc84 100644 --- a/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php +++ b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php @@ -7,26 +7,26 @@ class OrderItemBundledModelItemBundledItems /** * * - * @var OrderItemModel[] + * @var OrderItemModel[]|null */ protected $data; /** * * - * @return OrderItemModel[] + * @return OrderItemModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * * - * @param OrderItemModel[] $data + * @param OrderItemModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderItemModel.php b/src/Api/Generated/Model/OrderItemModel.php index 9d23c586..fdb13d44 100644 --- a/src/Api/Generated/Model/OrderItemModel.php +++ b/src/Api/Generated/Model/OrderItemModel.php @@ -7,80 +7,80 @@ class OrderItemModel /** * The id of the order item * - * @var int + * @var int|null */ protected $itemId; /** * The SKU of the order item * - * @var string + * @var string|null */ protected $sku; /** * The description of the order item * - * @var string + * @var string|null */ protected $description; /** * The quantity of the order item * - * @var int + * @var int|null */ protected $quantity; /** * The unit symbol of the order item * - * @var string + * @var string|null */ protected $unitSymbol; /** * The price per unit excluding VAT * - * @var float + * @var float|null */ protected $unitPrice; /** * The items VAT rate in percent. 25.0 = 25% VAT * - * @var float + * @var float|null */ protected $vatRate; /** * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. * - * @var float + * @var float|null */ protected $discount; /** * The type of discount. Either ”amount” or ”percent”. Default is ”percent” * - * @var string + * @var string|null */ protected $discountType; /** * The sort order of the order items * - * @var int + * @var int|null */ protected $sortIndex; /** * The id of the order item * - * @return int + * @return int|null */ - public function getItemId() : int + public function getItemId() : ?int { return $this->itemId; } /** * The id of the order item * - * @param int $itemId + * @param int|null $itemId * * @return self */ - public function setItemId(int $itemId) : self + public function setItemId(?int $itemId) : self { $this->itemId = $itemId; return $this; @@ -88,20 +88,20 @@ public function setItemId(int $itemId) : self /** * The SKU of the order item * - * @return string + * @return string|null */ - public function getSku() : string + public function getSku() : ?string { return $this->sku; } /** * The SKU of the order item * - * @param string $sku + * @param string|null $sku * * @return self */ - public function setSku(string $sku) : self + public function setSku(?string $sku) : self { $this->sku = $sku; return $this; @@ -109,20 +109,20 @@ public function setSku(string $sku) : self /** * The description of the order item * - * @return string + * @return string|null */ - public function getDescription() : string + public function getDescription() : ?string { return $this->description; } /** * The description of the order item * - * @param string $description + * @param string|null $description * * @return self */ - public function setDescription(string $description) : self + public function setDescription(?string $description) : self { $this->description = $description; return $this; @@ -130,20 +130,20 @@ public function setDescription(string $description) : self /** * The quantity of the order item * - * @return int + * @return int|null */ - public function getQuantity() : int + public function getQuantity() : ?int { return $this->quantity; } /** * The quantity of the order item * - * @param int $quantity + * @param int|null $quantity * * @return self */ - public function setQuantity(int $quantity) : self + public function setQuantity(?int $quantity) : self { $this->quantity = $quantity; return $this; @@ -151,20 +151,20 @@ public function setQuantity(int $quantity) : self /** * The unit symbol of the order item * - * @return string + * @return string|null */ - public function getUnitSymbol() : string + public function getUnitSymbol() : ?string { return $this->unitSymbol; } /** * The unit symbol of the order item * - * @param string $unitSymbol + * @param string|null $unitSymbol * * @return self */ - public function setUnitSymbol(string $unitSymbol) : self + public function setUnitSymbol(?string $unitSymbol) : self { $this->unitSymbol = $unitSymbol; return $this; @@ -172,20 +172,20 @@ public function setUnitSymbol(string $unitSymbol) : self /** * The price per unit excluding VAT * - * @return float + * @return float|null */ - public function getUnitPrice() : float + public function getUnitPrice() : ?float { return $this->unitPrice; } /** * The price per unit excluding VAT * - * @param float $unitPrice + * @param float|null $unitPrice * * @return self */ - public function setUnitPrice(float $unitPrice) : self + public function setUnitPrice(?float $unitPrice) : self { $this->unitPrice = $unitPrice; return $this; @@ -193,20 +193,20 @@ public function setUnitPrice(float $unitPrice) : self /** * The items VAT rate in percent. 25.0 = 25% VAT * - * @return float + * @return float|null */ - public function getVatRate() : float + public function getVatRate() : ?float { return $this->vatRate; } /** * The items VAT rate in percent. 25.0 = 25% VAT * - * @param float $vatRate + * @param float|null $vatRate * * @return self */ - public function setVatRate(float $vatRate) : self + public function setVatRate(?float $vatRate) : self { $this->vatRate = $vatRate; return $this; @@ -214,20 +214,20 @@ public function setVatRate(float $vatRate) : self /** * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. * - * @return float + * @return float|null */ - public function getDiscount() : float + public function getDiscount() : ?float { return $this->discount; } /** * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. * - * @param float $discount + * @param float|null $discount * * @return self */ - public function setDiscount(float $discount) : self + public function setDiscount(?float $discount) : self { $this->discount = $discount; return $this; @@ -235,20 +235,20 @@ public function setDiscount(float $discount) : self /** * The type of discount. Either ”amount” or ”percent”. Default is ”percent” * - * @return string + * @return string|null */ - public function getDiscountType() : string + public function getDiscountType() : ?string { return $this->discountType; } /** * The type of discount. Either ”amount” or ”percent”. Default is ”percent” * - * @param string $discountType + * @param string|null $discountType * * @return self */ - public function setDiscountType(string $discountType) : self + public function setDiscountType(?string $discountType) : self { $this->discountType = $discountType; return $this; @@ -256,20 +256,20 @@ public function setDiscountType(string $discountType) : self /** * The sort order of the order items * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort order of the order items * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; diff --git a/src/Api/Generated/Model/OrderItemModelCollection.php b/src/Api/Generated/Model/OrderItemModelCollection.php index 84f33837..d9d4dfd3 100644 --- a/src/Api/Generated/Model/OrderItemModelCollection.php +++ b/src/Api/Generated/Model/OrderItemModelCollection.php @@ -7,26 +7,26 @@ class OrderItemModelCollection /** * A list of order items * - * @var OrderItemModelCollectionDataItem[] + * @var OrderItemModelCollectionDataItem[]|null */ protected $data; /** * A list of order items * - * @return OrderItemModelCollectionDataItem[] + * @return OrderItemModelCollectionDataItem[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of order items * - * @param OrderItemModelCollectionDataItem[] $data + * @param OrderItemModelCollectionDataItem[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php index 95e865c4..6d4cbf3d 100644 --- a/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php +++ b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php @@ -7,86 +7,86 @@ class OrderItemModelCollectionDataItem /** * The id of the order item * - * @var int + * @var int|null */ protected $itemId; /** * The SKU of the order item * - * @var string + * @var string|null */ protected $sku; /** * The description of the order item * - * @var string + * @var string|null */ protected $description; /** * The quantity of the order item * - * @var int + * @var int|null */ protected $quantity; /** * The unit symbol of the order item * - * @var string + * @var string|null */ protected $unitSymbol; /** * The price per unit excluding VAT * - * @var float + * @var float|null */ protected $unitPrice; /** * The items VAT rate in percent. 25.0 = 25% VAT * - * @var float + * @var float|null */ protected $vatRate; /** * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. * - * @var float + * @var float|null */ protected $discount; /** * The type of discount. Either ”amount” or ”percent”. Default is ”percent” * - * @var string + * @var string|null */ protected $discountType; /** * The sort order of the order items * - * @var int + * @var int|null */ protected $sortIndex; /** * * - * @var OrderItemBundledModelItemBundledItems + * @var OrderItemBundledModelItemBundledItems|null */ protected $bundledItems; /** * The id of the order item * - * @return int + * @return int|null */ - public function getItemId() : int + public function getItemId() : ?int { return $this->itemId; } /** * The id of the order item * - * @param int $itemId + * @param int|null $itemId * * @return self */ - public function setItemId(int $itemId) : self + public function setItemId(?int $itemId) : self { $this->itemId = $itemId; return $this; @@ -94,20 +94,20 @@ public function setItemId(int $itemId) : self /** * The SKU of the order item * - * @return string + * @return string|null */ - public function getSku() : string + public function getSku() : ?string { return $this->sku; } /** * The SKU of the order item * - * @param string $sku + * @param string|null $sku * * @return self */ - public function setSku(string $sku) : self + public function setSku(?string $sku) : self { $this->sku = $sku; return $this; @@ -115,20 +115,20 @@ public function setSku(string $sku) : self /** * The description of the order item * - * @return string + * @return string|null */ - public function getDescription() : string + public function getDescription() : ?string { return $this->description; } /** * The description of the order item * - * @param string $description + * @param string|null $description * * @return self */ - public function setDescription(string $description) : self + public function setDescription(?string $description) : self { $this->description = $description; return $this; @@ -136,20 +136,20 @@ public function setDescription(string $description) : self /** * The quantity of the order item * - * @return int + * @return int|null */ - public function getQuantity() : int + public function getQuantity() : ?int { return $this->quantity; } /** * The quantity of the order item * - * @param int $quantity + * @param int|null $quantity * * @return self */ - public function setQuantity(int $quantity) : self + public function setQuantity(?int $quantity) : self { $this->quantity = $quantity; return $this; @@ -157,20 +157,20 @@ public function setQuantity(int $quantity) : self /** * The unit symbol of the order item * - * @return string + * @return string|null */ - public function getUnitSymbol() : string + public function getUnitSymbol() : ?string { return $this->unitSymbol; } /** * The unit symbol of the order item * - * @param string $unitSymbol + * @param string|null $unitSymbol * * @return self */ - public function setUnitSymbol(string $unitSymbol) : self + public function setUnitSymbol(?string $unitSymbol) : self { $this->unitSymbol = $unitSymbol; return $this; @@ -178,20 +178,20 @@ public function setUnitSymbol(string $unitSymbol) : self /** * The price per unit excluding VAT * - * @return float + * @return float|null */ - public function getUnitPrice() : float + public function getUnitPrice() : ?float { return $this->unitPrice; } /** * The price per unit excluding VAT * - * @param float $unitPrice + * @param float|null $unitPrice * * @return self */ - public function setUnitPrice(float $unitPrice) : self + public function setUnitPrice(?float $unitPrice) : self { $this->unitPrice = $unitPrice; return $this; @@ -199,20 +199,20 @@ public function setUnitPrice(float $unitPrice) : self /** * The items VAT rate in percent. 25.0 = 25% VAT * - * @return float + * @return float|null */ - public function getVatRate() : float + public function getVatRate() : ?float { return $this->vatRate; } /** * The items VAT rate in percent. 25.0 = 25% VAT * - * @param float $vatRate + * @param float|null $vatRate * * @return self */ - public function setVatRate(float $vatRate) : self + public function setVatRate(?float $vatRate) : self { $this->vatRate = $vatRate; return $this; @@ -220,20 +220,20 @@ public function setVatRate(float $vatRate) : self /** * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. * - * @return float + * @return float|null */ - public function getDiscount() : float + public function getDiscount() : ?float { return $this->discount; } /** * The discount for the entire order row. Either as a percentage or an amount. If this is an amount and set to 20.0, the sum 20.0 will be subtracted from the order total no matter what the quantity is set to. * - * @param float $discount + * @param float|null $discount * * @return self */ - public function setDiscount(float $discount) : self + public function setDiscount(?float $discount) : self { $this->discount = $discount; return $this; @@ -241,20 +241,20 @@ public function setDiscount(float $discount) : self /** * The type of discount. Either ”amount” or ”percent”. Default is ”percent” * - * @return string + * @return string|null */ - public function getDiscountType() : string + public function getDiscountType() : ?string { return $this->discountType; } /** * The type of discount. Either ”amount” or ”percent”. Default is ”percent” * - * @param string $discountType + * @param string|null $discountType * * @return self */ - public function setDiscountType(string $discountType) : self + public function setDiscountType(?string $discountType) : self { $this->discountType = $discountType; return $this; @@ -262,20 +262,20 @@ public function setDiscountType(string $discountType) : self /** * The sort order of the order items * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort order of the order items * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -283,20 +283,20 @@ public function setSortIndex(int $sortIndex) : self /** * * - * @return OrderItemBundledModelItemBundledItems + * @return OrderItemBundledModelItemBundledItems|null */ - public function getBundledItems() : OrderItemBundledModelItemBundledItems + public function getBundledItems() : ?OrderItemBundledModelItemBundledItems { return $this->bundledItems; } /** * * - * @param OrderItemBundledModelItemBundledItems $bundledItems + * @param OrderItemBundledModelItemBundledItems|null $bundledItems * * @return self */ - public function setBundledItems(OrderItemBundledModelItemBundledItems $bundledItems) : self + public function setBundledItems(?OrderItemBundledModelItemBundledItems $bundledItems) : self { $this->bundledItems = $bundledItems; return $this; diff --git a/src/Api/Generated/Model/OrderItemModelItem.php b/src/Api/Generated/Model/OrderItemModelItem.php index 66fd5a54..52c6451a 100644 --- a/src/Api/Generated/Model/OrderItemModelItem.php +++ b/src/Api/Generated/Model/OrderItemModelItem.php @@ -7,26 +7,26 @@ class OrderItemModelItem /** * * - * @var OrderItemModel + * @var OrderItemModel|null */ protected $data; /** * * - * @return OrderItemModel + * @return OrderItemModel|null */ - public function getData() : OrderItemModel + public function getData() : ?OrderItemModel { return $this->data; } /** * * - * @param OrderItemModel $data + * @param OrderItemModel|null $data * * @return self */ - public function setData(OrderItemModel $data) : self + public function setData(?OrderItemModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderModel.php b/src/Api/Generated/Model/OrderModel.php index 59cdf4e9..f3fa3a98 100644 --- a/src/Api/Generated/Model/OrderModel.php +++ b/src/Api/Generated/Model/OrderModel.php @@ -7,350 +7,350 @@ class OrderModel /** * The orders ID * - * @var int + * @var int|null */ protected $orderId; /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** * The shops base currency code at the point of order creation * - * @var string + * @var string|null */ protected $baseCurrencyCode; /** * The shops country code at the point of order creation * - * @var string + * @var string|null */ protected $shopCountryCode; /** * The total order amount * - * @var float + * @var float|null */ protected $totalAmount; /** * The total order VAT amount * - * @var float + * @var float|null */ protected $totalVat; /** * The total order amount to pay * - * @var float + * @var float|null */ protected $amountToPay; /** * The total order amount, in the shops base currency * - * @var float + * @var float|null */ protected $totalAmountInBaseCurrency; /** * The total VAT amount, in the shops base currency * - * @var float + * @var float|null */ protected $totalVatInBaseCurrency; /** * The total amount to pay, in the shops base currency * - * @var float + * @var float|null */ protected $amountToPayInBaseCurrency; /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The ID of the orders customer * - * @var int + * @var int|null */ protected $customerId; /** * The ID of the orders status * - * @var int + * @var int|null */ protected $statusId; /** * Set this to false to prevent sending email to customer on changes to statusId and new orders for a single call * - * @var bool + * @var bool|null */ protected $onOrderStatusChangeSendEmail = true; /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @var bool + * @var bool|null */ protected $onOrderStatusChangeProcessPayment = true; /** * Set this to false to prevent sending email to customer on changes to statusId and new orders for this and all future calls * - * @var bool + * @var bool|null */ protected $sendEmailsOnStatusChange = true; /** * The ID of the orders shipping method * - * @var int + * @var int|null */ protected $shippingMethodId; /** * The ID of the orders payment method * - * @var int + * @var int|null */ protected $paymentMethodId; /** * The ID code of the payment method. * - * @var string + * @var string|null */ protected $paymentMethodIdCode; /** * Title of the orders payment method * - * @var string + * @var string|null */ protected $paymentMethodName; /** * Payment fee * - * @var float + * @var float|null */ protected $paymentFee; /** * The VAT rate of the paymentFee in percent * - * @var float + * @var float|null */ protected $paymentVatRate; /** * Title of the orders shipping method * - * @var string + * @var string|null */ protected $shippingMethodName; /** * Shipping cost * - * @var float + * @var float|null */ protected $shippingCost; /** * The VAT rate of the shippingCost in percent * - * @var float + * @var float|null */ protected $shippingVatRate; /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @var float + * @var float|null */ protected $totalWeight; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo1; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo2; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo3; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo4; /** * The code ID of a discount code that was used for this order * - * @var string + * @var string|null */ protected $discountCode; /** * The amount paid via the payment method for this order * - * @var float + * @var float|null */ protected $amountPaid; /** * Same as amountPaid, but in the shops base currency * - * @var float + * @var float|null */ protected $amountPaidInBaseCurrency; /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @var bool + * @var bool|null */ protected $isComplete; /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @var string + * @var string|null */ protected $currencyCode; /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @var float + * @var float|null */ protected $currencyExchangeRate; /** * The number of decimals to display * - * @var int + * @var int|null */ protected $currencyPrecision; /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @var string + * @var string|null */ protected $langCode; /** * Reference to the payment methods payment transaction * - * @var string + * @var string|null */ protected $paymentReference; /** * Status of the payment methods payment transaction * - * @var string + * @var string|null */ protected $paymentStatus; /** * An order is read when an administrator has read it via the admin GUI * - * @var bool + * @var bool|null */ protected $isRead; /** * Whether the customer or an admin has added a comment to the order * - * @var bool + * @var bool|null */ protected $hasComments; /** * An internal comment placed by an administrator. Not available to the customer * - * @var string + * @var string|null */ protected $internalComment; /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @var int + * @var int|null */ protected $shippingTrackerType; /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @var string + * @var string|null */ protected $shippingTrackingNo; /** * The email address of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerEmail; /** * The national id number of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerNationalIdNo; /** * The VAT number of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerVatNo; /** * Custom customer info at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerCustomInfo1; /** * Custom customer info at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerCustomInfo2; /** * * - * @var OrderItemModelCollection + * @var OrderItemModelCollection|null */ protected $items; /** * * - * @var OrderAddressCollection + * @var OrderAddressCollection|null */ protected $addresses; /** * * - * @var OrderExternalServiceModelCollection + * @var OrderExternalServiceModelCollection|null */ protected $externalServices; /** * * - * @var CustomerModelItem + * @var CustomerModelItem|null */ protected $customer; /** * * - * @var OrderStatusModelItem + * @var OrderStatusModelItem|null */ protected $status; /** * The orders ID * - * @return int + * @return int|null */ - public function getOrderId() : int + public function getOrderId() : ?int { return $this->orderId; } /** * The orders ID * - * @param int $orderId + * @param int|null $orderId * * @return self */ - public function setOrderId(int $orderId) : self + public function setOrderId(?int $orderId) : self { $this->orderId = $orderId; return $this; @@ -358,20 +358,20 @@ public function setOrderId(int $orderId) : self /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -379,20 +379,20 @@ public function setModifiedAt(string $modifiedAt) : self /** * The shops base currency code at the point of order creation * - * @return string + * @return string|null */ - public function getBaseCurrencyCode() : string + public function getBaseCurrencyCode() : ?string { return $this->baseCurrencyCode; } /** * The shops base currency code at the point of order creation * - * @param string $baseCurrencyCode + * @param string|null $baseCurrencyCode * * @return self */ - public function setBaseCurrencyCode(string $baseCurrencyCode) : self + public function setBaseCurrencyCode(?string $baseCurrencyCode) : self { $this->baseCurrencyCode = $baseCurrencyCode; return $this; @@ -400,20 +400,20 @@ public function setBaseCurrencyCode(string $baseCurrencyCode) : self /** * The shops country code at the point of order creation * - * @return string + * @return string|null */ - public function getShopCountryCode() : string + public function getShopCountryCode() : ?string { return $this->shopCountryCode; } /** * The shops country code at the point of order creation * - * @param string $shopCountryCode + * @param string|null $shopCountryCode * * @return self */ - public function setShopCountryCode(string $shopCountryCode) : self + public function setShopCountryCode(?string $shopCountryCode) : self { $this->shopCountryCode = $shopCountryCode; return $this; @@ -421,20 +421,20 @@ public function setShopCountryCode(string $shopCountryCode) : self /** * The total order amount * - * @return float + * @return float|null */ - public function getTotalAmount() : float + public function getTotalAmount() : ?float { return $this->totalAmount; } /** * The total order amount * - * @param float $totalAmount + * @param float|null $totalAmount * * @return self */ - public function setTotalAmount(float $totalAmount) : self + public function setTotalAmount(?float $totalAmount) : self { $this->totalAmount = $totalAmount; return $this; @@ -442,20 +442,20 @@ public function setTotalAmount(float $totalAmount) : self /** * The total order VAT amount * - * @return float + * @return float|null */ - public function getTotalVat() : float + public function getTotalVat() : ?float { return $this->totalVat; } /** * The total order VAT amount * - * @param float $totalVat + * @param float|null $totalVat * * @return self */ - public function setTotalVat(float $totalVat) : self + public function setTotalVat(?float $totalVat) : self { $this->totalVat = $totalVat; return $this; @@ -463,20 +463,20 @@ public function setTotalVat(float $totalVat) : self /** * The total order amount to pay * - * @return float + * @return float|null */ - public function getAmountToPay() : float + public function getAmountToPay() : ?float { return $this->amountToPay; } /** * The total order amount to pay * - * @param float $amountToPay + * @param float|null $amountToPay * * @return self */ - public function setAmountToPay(float $amountToPay) : self + public function setAmountToPay(?float $amountToPay) : self { $this->amountToPay = $amountToPay; return $this; @@ -484,20 +484,20 @@ public function setAmountToPay(float $amountToPay) : self /** * The total order amount, in the shops base currency * - * @return float + * @return float|null */ - public function getTotalAmountInBaseCurrency() : float + public function getTotalAmountInBaseCurrency() : ?float { return $this->totalAmountInBaseCurrency; } /** * The total order amount, in the shops base currency * - * @param float $totalAmountInBaseCurrency + * @param float|null $totalAmountInBaseCurrency * * @return self */ - public function setTotalAmountInBaseCurrency(float $totalAmountInBaseCurrency) : self + public function setTotalAmountInBaseCurrency(?float $totalAmountInBaseCurrency) : self { $this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency; return $this; @@ -505,20 +505,20 @@ public function setTotalAmountInBaseCurrency(float $totalAmountInBaseCurrency) : /** * The total VAT amount, in the shops base currency * - * @return float + * @return float|null */ - public function getTotalVatInBaseCurrency() : float + public function getTotalVatInBaseCurrency() : ?float { return $this->totalVatInBaseCurrency; } /** * The total VAT amount, in the shops base currency * - * @param float $totalVatInBaseCurrency + * @param float|null $totalVatInBaseCurrency * * @return self */ - public function setTotalVatInBaseCurrency(float $totalVatInBaseCurrency) : self + public function setTotalVatInBaseCurrency(?float $totalVatInBaseCurrency) : self { $this->totalVatInBaseCurrency = $totalVatInBaseCurrency; return $this; @@ -526,20 +526,20 @@ public function setTotalVatInBaseCurrency(float $totalVatInBaseCurrency) : self /** * The total amount to pay, in the shops base currency * - * @return float + * @return float|null */ - public function getAmountToPayInBaseCurrency() : float + public function getAmountToPayInBaseCurrency() : ?float { return $this->amountToPayInBaseCurrency; } /** * The total amount to pay, in the shops base currency * - * @param float $amountToPayInBaseCurrency + * @param float|null $amountToPayInBaseCurrency * * @return self */ - public function setAmountToPayInBaseCurrency(float $amountToPayInBaseCurrency) : self + public function setAmountToPayInBaseCurrency(?float $amountToPayInBaseCurrency) : self { $this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency; return $this; @@ -547,20 +547,20 @@ public function setAmountToPayInBaseCurrency(float $amountToPayInBaseCurrency) : /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -568,20 +568,20 @@ public function setCreatedAt(string $createdAt) : self /** * The ID of the orders customer * - * @return int + * @return int|null */ - public function getCustomerId() : int + public function getCustomerId() : ?int { return $this->customerId; } /** * The ID of the orders customer * - * @param int $customerId + * @param int|null $customerId * * @return self */ - public function setCustomerId(int $customerId) : self + public function setCustomerId(?int $customerId) : self { $this->customerId = $customerId; return $this; @@ -589,20 +589,20 @@ public function setCustomerId(int $customerId) : self /** * The ID of the orders status * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The ID of the orders status * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; @@ -610,20 +610,20 @@ public function setStatusId(int $statusId) : self /** * Set this to false to prevent sending email to customer on changes to statusId and new orders for a single call * - * @return bool + * @return bool|null */ - public function getOnOrderStatusChangeSendEmail() : bool + public function getOnOrderStatusChangeSendEmail() : ?bool { return $this->onOrderStatusChangeSendEmail; } /** * Set this to false to prevent sending email to customer on changes to statusId and new orders for a single call * - * @param bool $onOrderStatusChangeSendEmail + * @param bool|null $onOrderStatusChangeSendEmail * * @return self */ - public function setOnOrderStatusChangeSendEmail(bool $onOrderStatusChangeSendEmail) : self + public function setOnOrderStatusChangeSendEmail(?bool $onOrderStatusChangeSendEmail) : self { $this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail; return $this; @@ -631,20 +631,20 @@ public function setOnOrderStatusChangeSendEmail(bool $onOrderStatusChangeSendEma /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @return bool + * @return bool|null */ - public function getOnOrderStatusChangeProcessPayment() : bool + public function getOnOrderStatusChangeProcessPayment() : ?bool { return $this->onOrderStatusChangeProcessPayment; } /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @param bool $onOrderStatusChangeProcessPayment + * @param bool|null $onOrderStatusChangeProcessPayment * * @return self */ - public function setOnOrderStatusChangeProcessPayment(bool $onOrderStatusChangeProcessPayment) : self + public function setOnOrderStatusChangeProcessPayment(?bool $onOrderStatusChangeProcessPayment) : self { $this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment; return $this; @@ -652,20 +652,20 @@ public function setOnOrderStatusChangeProcessPayment(bool $onOrderStatusChangePr /** * Set this to false to prevent sending email to customer on changes to statusId and new orders for this and all future calls * - * @return bool + * @return bool|null */ - public function getSendEmailsOnStatusChange() : bool + public function getSendEmailsOnStatusChange() : ?bool { return $this->sendEmailsOnStatusChange; } /** * Set this to false to prevent sending email to customer on changes to statusId and new orders for this and all future calls * - * @param bool $sendEmailsOnStatusChange + * @param bool|null $sendEmailsOnStatusChange * * @return self */ - public function setSendEmailsOnStatusChange(bool $sendEmailsOnStatusChange) : self + public function setSendEmailsOnStatusChange(?bool $sendEmailsOnStatusChange) : self { $this->sendEmailsOnStatusChange = $sendEmailsOnStatusChange; return $this; @@ -673,20 +673,20 @@ public function setSendEmailsOnStatusChange(bool $sendEmailsOnStatusChange) : se /** * The ID of the orders shipping method * - * @return int + * @return int|null */ - public function getShippingMethodId() : int + public function getShippingMethodId() : ?int { return $this->shippingMethodId; } /** * The ID of the orders shipping method * - * @param int $shippingMethodId + * @param int|null $shippingMethodId * * @return self */ - public function setShippingMethodId(int $shippingMethodId) : self + public function setShippingMethodId(?int $shippingMethodId) : self { $this->shippingMethodId = $shippingMethodId; return $this; @@ -694,20 +694,20 @@ public function setShippingMethodId(int $shippingMethodId) : self /** * The ID of the orders payment method * - * @return int + * @return int|null */ - public function getPaymentMethodId() : int + public function getPaymentMethodId() : ?int { return $this->paymentMethodId; } /** * The ID of the orders payment method * - * @param int $paymentMethodId + * @param int|null $paymentMethodId * * @return self */ - public function setPaymentMethodId(int $paymentMethodId) : self + public function setPaymentMethodId(?int $paymentMethodId) : self { $this->paymentMethodId = $paymentMethodId; return $this; @@ -715,20 +715,20 @@ public function setPaymentMethodId(int $paymentMethodId) : self /** * The ID code of the payment method. * - * @return string + * @return string|null */ - public function getPaymentMethodIdCode() : string + public function getPaymentMethodIdCode() : ?string { return $this->paymentMethodIdCode; } /** * The ID code of the payment method. * - * @param string $paymentMethodIdCode + * @param string|null $paymentMethodIdCode * * @return self */ - public function setPaymentMethodIdCode(string $paymentMethodIdCode) : self + public function setPaymentMethodIdCode(?string $paymentMethodIdCode) : self { $this->paymentMethodIdCode = $paymentMethodIdCode; return $this; @@ -736,20 +736,20 @@ public function setPaymentMethodIdCode(string $paymentMethodIdCode) : self /** * Title of the orders payment method * - * @return string + * @return string|null */ - public function getPaymentMethodName() : string + public function getPaymentMethodName() : ?string { return $this->paymentMethodName; } /** * Title of the orders payment method * - * @param string $paymentMethodName + * @param string|null $paymentMethodName * * @return self */ - public function setPaymentMethodName(string $paymentMethodName) : self + public function setPaymentMethodName(?string $paymentMethodName) : self { $this->paymentMethodName = $paymentMethodName; return $this; @@ -757,20 +757,20 @@ public function setPaymentMethodName(string $paymentMethodName) : self /** * Payment fee * - * @return float + * @return float|null */ - public function getPaymentFee() : float + public function getPaymentFee() : ?float { return $this->paymentFee; } /** * Payment fee * - * @param float $paymentFee + * @param float|null $paymentFee * * @return self */ - public function setPaymentFee(float $paymentFee) : self + public function setPaymentFee(?float $paymentFee) : self { $this->paymentFee = $paymentFee; return $this; @@ -778,20 +778,20 @@ public function setPaymentFee(float $paymentFee) : self /** * The VAT rate of the paymentFee in percent * - * @return float + * @return float|null */ - public function getPaymentVatRate() : float + public function getPaymentVatRate() : ?float { return $this->paymentVatRate; } /** * The VAT rate of the paymentFee in percent * - * @param float $paymentVatRate + * @param float|null $paymentVatRate * * @return self */ - public function setPaymentVatRate(float $paymentVatRate) : self + public function setPaymentVatRate(?float $paymentVatRate) : self { $this->paymentVatRate = $paymentVatRate; return $this; @@ -799,20 +799,20 @@ public function setPaymentVatRate(float $paymentVatRate) : self /** * Title of the orders shipping method * - * @return string + * @return string|null */ - public function getShippingMethodName() : string + public function getShippingMethodName() : ?string { return $this->shippingMethodName; } /** * Title of the orders shipping method * - * @param string $shippingMethodName + * @param string|null $shippingMethodName * * @return self */ - public function setShippingMethodName(string $shippingMethodName) : self + public function setShippingMethodName(?string $shippingMethodName) : self { $this->shippingMethodName = $shippingMethodName; return $this; @@ -820,20 +820,20 @@ public function setShippingMethodName(string $shippingMethodName) : self /** * Shipping cost * - * @return float + * @return float|null */ - public function getShippingCost() : float + public function getShippingCost() : ?float { return $this->shippingCost; } /** * Shipping cost * - * @param float $shippingCost + * @param float|null $shippingCost * * @return self */ - public function setShippingCost(float $shippingCost) : self + public function setShippingCost(?float $shippingCost) : self { $this->shippingCost = $shippingCost; return $this; @@ -841,20 +841,20 @@ public function setShippingCost(float $shippingCost) : self /** * The VAT rate of the shippingCost in percent * - * @return float + * @return float|null */ - public function getShippingVatRate() : float + public function getShippingVatRate() : ?float { return $this->shippingVatRate; } /** * The VAT rate of the shippingCost in percent * - * @param float $shippingVatRate + * @param float|null $shippingVatRate * * @return self */ - public function setShippingVatRate(float $shippingVatRate) : self + public function setShippingVatRate(?float $shippingVatRate) : self { $this->shippingVatRate = $shippingVatRate; return $this; @@ -862,20 +862,20 @@ public function setShippingVatRate(float $shippingVatRate) : self /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @return float + * @return float|null */ - public function getTotalWeight() : float + public function getTotalWeight() : ?float { return $this->totalWeight; } /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @param float $totalWeight + * @param float|null $totalWeight * * @return self */ - public function setTotalWeight(float $totalWeight) : self + public function setTotalWeight(?float $totalWeight) : self { $this->totalWeight = $totalWeight; return $this; @@ -883,20 +883,20 @@ public function setTotalWeight(float $totalWeight) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo1() : string + public function getCustomInfo1() : ?string { return $this->customInfo1; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo1 + * @param string|null $customInfo1 * * @return self */ - public function setCustomInfo1(string $customInfo1) : self + public function setCustomInfo1(?string $customInfo1) : self { $this->customInfo1 = $customInfo1; return $this; @@ -904,20 +904,20 @@ public function setCustomInfo1(string $customInfo1) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo2() : string + public function getCustomInfo2() : ?string { return $this->customInfo2; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo2 + * @param string|null $customInfo2 * * @return self */ - public function setCustomInfo2(string $customInfo2) : self + public function setCustomInfo2(?string $customInfo2) : self { $this->customInfo2 = $customInfo2; return $this; @@ -925,20 +925,20 @@ public function setCustomInfo2(string $customInfo2) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo3() : string + public function getCustomInfo3() : ?string { return $this->customInfo3; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo3 + * @param string|null $customInfo3 * * @return self */ - public function setCustomInfo3(string $customInfo3) : self + public function setCustomInfo3(?string $customInfo3) : self { $this->customInfo3 = $customInfo3; return $this; @@ -946,20 +946,20 @@ public function setCustomInfo3(string $customInfo3) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo4() : string + public function getCustomInfo4() : ?string { return $this->customInfo4; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo4 + * @param string|null $customInfo4 * * @return self */ - public function setCustomInfo4(string $customInfo4) : self + public function setCustomInfo4(?string $customInfo4) : self { $this->customInfo4 = $customInfo4; return $this; @@ -967,20 +967,20 @@ public function setCustomInfo4(string $customInfo4) : self /** * The code ID of a discount code that was used for this order * - * @return string + * @return string|null */ - public function getDiscountCode() : string + public function getDiscountCode() : ?string { return $this->discountCode; } /** * The code ID of a discount code that was used for this order * - * @param string $discountCode + * @param string|null $discountCode * * @return self */ - public function setDiscountCode(string $discountCode) : self + public function setDiscountCode(?string $discountCode) : self { $this->discountCode = $discountCode; return $this; @@ -988,20 +988,20 @@ public function setDiscountCode(string $discountCode) : self /** * The amount paid via the payment method for this order * - * @return float + * @return float|null */ - public function getAmountPaid() : float + public function getAmountPaid() : ?float { return $this->amountPaid; } /** * The amount paid via the payment method for this order * - * @param float $amountPaid + * @param float|null $amountPaid * * @return self */ - public function setAmountPaid(float $amountPaid) : self + public function setAmountPaid(?float $amountPaid) : self { $this->amountPaid = $amountPaid; return $this; @@ -1009,20 +1009,20 @@ public function setAmountPaid(float $amountPaid) : self /** * Same as amountPaid, but in the shops base currency * - * @return float + * @return float|null */ - public function getAmountPaidInBaseCurrency() : float + public function getAmountPaidInBaseCurrency() : ?float { return $this->amountPaidInBaseCurrency; } /** * Same as amountPaid, but in the shops base currency * - * @param float $amountPaidInBaseCurrency + * @param float|null $amountPaidInBaseCurrency * * @return self */ - public function setAmountPaidInBaseCurrency(float $amountPaidInBaseCurrency) : self + public function setAmountPaidInBaseCurrency(?float $amountPaidInBaseCurrency) : self { $this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency; return $this; @@ -1030,20 +1030,20 @@ public function setAmountPaidInBaseCurrency(float $amountPaidInBaseCurrency) : s /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @return bool + * @return bool|null */ - public function getIsComplete() : bool + public function getIsComplete() : ?bool { return $this->isComplete; } /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @param bool $isComplete + * @param bool|null $isComplete * * @return self */ - public function setIsComplete(bool $isComplete) : self + public function setIsComplete(?bool $isComplete) : self { $this->isComplete = $isComplete; return $this; @@ -1051,20 +1051,20 @@ public function setIsComplete(bool $isComplete) : self /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @return string + * @return string|null */ - public function getCurrencyCode() : string + public function getCurrencyCode() : ?string { return $this->currencyCode; } /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @param string $currencyCode + * @param string|null $currencyCode * * @return self */ - public function setCurrencyCode(string $currencyCode) : self + public function setCurrencyCode(?string $currencyCode) : self { $this->currencyCode = $currencyCode; return $this; @@ -1072,20 +1072,20 @@ public function setCurrencyCode(string $currencyCode) : self /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @return float + * @return float|null */ - public function getCurrencyExchangeRate() : float + public function getCurrencyExchangeRate() : ?float { return $this->currencyExchangeRate; } /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @param float $currencyExchangeRate + * @param float|null $currencyExchangeRate * * @return self */ - public function setCurrencyExchangeRate(float $currencyExchangeRate) : self + public function setCurrencyExchangeRate(?float $currencyExchangeRate) : self { $this->currencyExchangeRate = $currencyExchangeRate; return $this; @@ -1093,20 +1093,20 @@ public function setCurrencyExchangeRate(float $currencyExchangeRate) : self /** * The number of decimals to display * - * @return int + * @return int|null */ - public function getCurrencyPrecision() : int + public function getCurrencyPrecision() : ?int { return $this->currencyPrecision; } /** * The number of decimals to display * - * @param int $currencyPrecision + * @param int|null $currencyPrecision * * @return self */ - public function setCurrencyPrecision(int $currencyPrecision) : self + public function setCurrencyPrecision(?int $currencyPrecision) : self { $this->currencyPrecision = $currencyPrecision; return $this; @@ -1114,20 +1114,20 @@ public function setCurrencyPrecision(int $currencyPrecision) : self /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -1135,20 +1135,20 @@ public function setLangCode(string $langCode) : self /** * Reference to the payment methods payment transaction * - * @return string + * @return string|null */ - public function getPaymentReference() : string + public function getPaymentReference() : ?string { return $this->paymentReference; } /** * Reference to the payment methods payment transaction * - * @param string $paymentReference + * @param string|null $paymentReference * * @return self */ - public function setPaymentReference(string $paymentReference) : self + public function setPaymentReference(?string $paymentReference) : self { $this->paymentReference = $paymentReference; return $this; @@ -1156,20 +1156,20 @@ public function setPaymentReference(string $paymentReference) : self /** * Status of the payment methods payment transaction * - * @return string + * @return string|null */ - public function getPaymentStatus() : string + public function getPaymentStatus() : ?string { return $this->paymentStatus; } /** * Status of the payment methods payment transaction * - * @param string $paymentStatus + * @param string|null $paymentStatus * * @return self */ - public function setPaymentStatus(string $paymentStatus) : self + public function setPaymentStatus(?string $paymentStatus) : self { $this->paymentStatus = $paymentStatus; return $this; @@ -1177,20 +1177,20 @@ public function setPaymentStatus(string $paymentStatus) : self /** * An order is read when an administrator has read it via the admin GUI * - * @return bool + * @return bool|null */ - public function getIsRead() : bool + public function getIsRead() : ?bool { return $this->isRead; } /** * An order is read when an administrator has read it via the admin GUI * - * @param bool $isRead + * @param bool|null $isRead * * @return self */ - public function setIsRead(bool $isRead) : self + public function setIsRead(?bool $isRead) : self { $this->isRead = $isRead; return $this; @@ -1198,20 +1198,20 @@ public function setIsRead(bool $isRead) : self /** * Whether the customer or an admin has added a comment to the order * - * @return bool + * @return bool|null */ - public function getHasComments() : bool + public function getHasComments() : ?bool { return $this->hasComments; } /** * Whether the customer or an admin has added a comment to the order * - * @param bool $hasComments + * @param bool|null $hasComments * * @return self */ - public function setHasComments(bool $hasComments) : self + public function setHasComments(?bool $hasComments) : self { $this->hasComments = $hasComments; return $this; @@ -1219,20 +1219,20 @@ public function setHasComments(bool $hasComments) : self /** * An internal comment placed by an administrator. Not available to the customer * - * @return string + * @return string|null */ - public function getInternalComment() : string + public function getInternalComment() : ?string { return $this->internalComment; } /** * An internal comment placed by an administrator. Not available to the customer * - * @param string $internalComment + * @param string|null $internalComment * * @return self */ - public function setInternalComment(string $internalComment) : self + public function setInternalComment(?string $internalComment) : self { $this->internalComment = $internalComment; return $this; @@ -1240,20 +1240,20 @@ public function setInternalComment(string $internalComment) : self /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @return int + * @return int|null */ - public function getShippingTrackerType() : int + public function getShippingTrackerType() : ?int { return $this->shippingTrackerType; } /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @param int $shippingTrackerType + * @param int|null $shippingTrackerType * * @return self */ - public function setShippingTrackerType(int $shippingTrackerType) : self + public function setShippingTrackerType(?int $shippingTrackerType) : self { $this->shippingTrackerType = $shippingTrackerType; return $this; @@ -1261,20 +1261,20 @@ public function setShippingTrackerType(int $shippingTrackerType) : self /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @return string + * @return string|null */ - public function getShippingTrackingNo() : string + public function getShippingTrackingNo() : ?string { return $this->shippingTrackingNo; } /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @param string $shippingTrackingNo + * @param string|null $shippingTrackingNo * * @return self */ - public function setShippingTrackingNo(string $shippingTrackingNo) : self + public function setShippingTrackingNo(?string $shippingTrackingNo) : self { $this->shippingTrackingNo = $shippingTrackingNo; return $this; @@ -1282,20 +1282,20 @@ public function setShippingTrackingNo(string $shippingTrackingNo) : self /** * The email address of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerEmail() : string + public function getOriginalCustomerEmail() : ?string { return $this->originalCustomerEmail; } /** * The email address of the customer at the point of order creation * - * @param string $originalCustomerEmail + * @param string|null $originalCustomerEmail * * @return self */ - public function setOriginalCustomerEmail(string $originalCustomerEmail) : self + public function setOriginalCustomerEmail(?string $originalCustomerEmail) : self { $this->originalCustomerEmail = $originalCustomerEmail; return $this; @@ -1303,20 +1303,20 @@ public function setOriginalCustomerEmail(string $originalCustomerEmail) : self /** * The national id number of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerNationalIdNo() : string + public function getOriginalCustomerNationalIdNo() : ?string { return $this->originalCustomerNationalIdNo; } /** * The national id number of the customer at the point of order creation * - * @param string $originalCustomerNationalIdNo + * @param string|null $originalCustomerNationalIdNo * * @return self */ - public function setOriginalCustomerNationalIdNo(string $originalCustomerNationalIdNo) : self + public function setOriginalCustomerNationalIdNo(?string $originalCustomerNationalIdNo) : self { $this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo; return $this; @@ -1324,20 +1324,20 @@ public function setOriginalCustomerNationalIdNo(string $originalCustomerNational /** * The VAT number of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerVatNo() : string + public function getOriginalCustomerVatNo() : ?string { return $this->originalCustomerVatNo; } /** * The VAT number of the customer at the point of order creation * - * @param string $originalCustomerVatNo + * @param string|null $originalCustomerVatNo * * @return self */ - public function setOriginalCustomerVatNo(string $originalCustomerVatNo) : self + public function setOriginalCustomerVatNo(?string $originalCustomerVatNo) : self { $this->originalCustomerVatNo = $originalCustomerVatNo; return $this; @@ -1345,20 +1345,20 @@ public function setOriginalCustomerVatNo(string $originalCustomerVatNo) : self /** * Custom customer info at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerCustomInfo1() : string + public function getOriginalCustomerCustomInfo1() : ?string { return $this->originalCustomerCustomInfo1; } /** * Custom customer info at the point of order creation * - * @param string $originalCustomerCustomInfo1 + * @param string|null $originalCustomerCustomInfo1 * * @return self */ - public function setOriginalCustomerCustomInfo1(string $originalCustomerCustomInfo1) : self + public function setOriginalCustomerCustomInfo1(?string $originalCustomerCustomInfo1) : self { $this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1; return $this; @@ -1366,20 +1366,20 @@ public function setOriginalCustomerCustomInfo1(string $originalCustomerCustomInf /** * Custom customer info at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerCustomInfo2() : string + public function getOriginalCustomerCustomInfo2() : ?string { return $this->originalCustomerCustomInfo2; } /** * Custom customer info at the point of order creation * - * @param string $originalCustomerCustomInfo2 + * @param string|null $originalCustomerCustomInfo2 * * @return self */ - public function setOriginalCustomerCustomInfo2(string $originalCustomerCustomInfo2) : self + public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomInfo2) : self { $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; @@ -1387,20 +1387,20 @@ public function setOriginalCustomerCustomInfo2(string $originalCustomerCustomInf /** * * - * @return OrderItemModelCollection + * @return OrderItemModelCollection|null */ - public function getItems() : OrderItemModelCollection + public function getItems() : ?OrderItemModelCollection { return $this->items; } /** * * - * @param OrderItemModelCollection $items + * @param OrderItemModelCollection|null $items * * @return self */ - public function setItems(OrderItemModelCollection $items) : self + public function setItems(?OrderItemModelCollection $items) : self { $this->items = $items; return $this; @@ -1408,20 +1408,20 @@ public function setItems(OrderItemModelCollection $items) : self /** * * - * @return OrderAddressCollection + * @return OrderAddressCollection|null */ - public function getAddresses() : OrderAddressCollection + public function getAddresses() : ?OrderAddressCollection { return $this->addresses; } /** * * - * @param OrderAddressCollection $addresses + * @param OrderAddressCollection|null $addresses * * @return self */ - public function setAddresses(OrderAddressCollection $addresses) : self + public function setAddresses(?OrderAddressCollection $addresses) : self { $this->addresses = $addresses; return $this; @@ -1429,20 +1429,20 @@ public function setAddresses(OrderAddressCollection $addresses) : self /** * * - * @return OrderExternalServiceModelCollection + * @return OrderExternalServiceModelCollection|null */ - public function getExternalServices() : OrderExternalServiceModelCollection + public function getExternalServices() : ?OrderExternalServiceModelCollection { return $this->externalServices; } /** * * - * @param OrderExternalServiceModelCollection $externalServices + * @param OrderExternalServiceModelCollection|null $externalServices * * @return self */ - public function setExternalServices(OrderExternalServiceModelCollection $externalServices) : self + public function setExternalServices(?OrderExternalServiceModelCollection $externalServices) : self { $this->externalServices = $externalServices; return $this; @@ -1450,20 +1450,20 @@ public function setExternalServices(OrderExternalServiceModelCollection $externa /** * * - * @return CustomerModelItem + * @return CustomerModelItem|null */ - public function getCustomer() : CustomerModelItem + public function getCustomer() : ?CustomerModelItem { return $this->customer; } /** * * - * @param CustomerModelItem $customer + * @param CustomerModelItem|null $customer * * @return self */ - public function setCustomer(CustomerModelItem $customer) : self + public function setCustomer(?CustomerModelItem $customer) : self { $this->customer = $customer; return $this; @@ -1471,20 +1471,20 @@ public function setCustomer(CustomerModelItem $customer) : self /** * * - * @return OrderStatusModelItem + * @return OrderStatusModelItem|null */ - public function getStatus() : OrderStatusModelItem + public function getStatus() : ?OrderStatusModelItem { return $this->status; } /** * * - * @param OrderStatusModelItem $status + * @param OrderStatusModelItem|null $status * * @return self */ - public function setStatus(OrderStatusModelItem $status) : self + public function setStatus(?OrderStatusModelItem $status) : self { $this->status = $status; return $this; diff --git a/src/Api/Generated/Model/OrderModelCollection.php b/src/Api/Generated/Model/OrderModelCollection.php index 8334513d..c85f5c0d 100644 --- a/src/Api/Generated/Model/OrderModelCollection.php +++ b/src/Api/Generated/Model/OrderModelCollection.php @@ -7,32 +7,32 @@ class OrderModelCollection /** * A list of orders * - * @var OrderModel[] + * @var OrderModel[]|null */ protected $data; /** * * - * @var OrderModelCollectionMeta + * @var OrderModelCollectionMeta|null */ protected $meta; /** * A list of orders * - * @return OrderModel[] + * @return OrderModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of orders * - * @param OrderModel[] $data + * @param OrderModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; @@ -40,20 +40,20 @@ public function setData(array $data) : self /** * * - * @return OrderModelCollectionMeta + * @return OrderModelCollectionMeta|null */ - public function getMeta() : OrderModelCollectionMeta + public function getMeta() : ?OrderModelCollectionMeta { return $this->meta; } /** * * - * @param OrderModelCollectionMeta $meta + * @param OrderModelCollectionMeta|null $meta * * @return self */ - public function setMeta(OrderModelCollectionMeta $meta) : self + public function setMeta(?OrderModelCollectionMeta $meta) : self { $this->meta = $meta; return $this; diff --git a/src/Api/Generated/Model/OrderModelCollectionMeta.php b/src/Api/Generated/Model/OrderModelCollectionMeta.php index 7362e717..8936f9b8 100644 --- a/src/Api/Generated/Model/OrderModelCollectionMeta.php +++ b/src/Api/Generated/Model/OrderModelCollectionMeta.php @@ -7,26 +7,26 @@ class OrderModelCollectionMeta /** * * - * @var PaginationModel + * @var PaginationModel|null */ protected $pagination; /** * * - * @return PaginationModel + * @return PaginationModel|null */ - public function getPagination() : PaginationModel + public function getPagination() : ?PaginationModel { return $this->pagination; } /** * * - * @param PaginationModel $pagination + * @param PaginationModel|null $pagination * * @return self */ - public function setPagination(PaginationModel $pagination) : self + public function setPagination(?PaginationModel $pagination) : self { $this->pagination = $pagination; return $this; diff --git a/src/Api/Generated/Model/OrderModelItem.php b/src/Api/Generated/Model/OrderModelItem.php index e5bf3dcc..4e606dd8 100644 --- a/src/Api/Generated/Model/OrderModelItem.php +++ b/src/Api/Generated/Model/OrderModelItem.php @@ -7,26 +7,26 @@ class OrderModelItem /** * * - * @var OrderModel + * @var OrderModel|null */ protected $data; /** * * - * @return OrderModel + * @return OrderModel|null */ - public function getData() : OrderModel + public function getData() : ?OrderModel { return $this->data; } /** * * - * @param OrderModel $data + * @param OrderModel|null $data * * @return self */ - public function setData(OrderModel $data) : self + public function setData(?OrderModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderPutModel.php b/src/Api/Generated/Model/OrderPutModel.php index 9f439e48..f127386e 100644 --- a/src/Api/Generated/Model/OrderPutModel.php +++ b/src/Api/Generated/Model/OrderPutModel.php @@ -7,326 +7,326 @@ class OrderPutModel /** * The orders ID * - * @var int + * @var int|null */ protected $orderId; /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** * The shops base currency code at the point of order creation * - * @var string + * @var string|null */ protected $baseCurrencyCode; /** * The shops country code at the point of order creation * - * @var string + * @var string|null */ protected $shopCountryCode; /** * The total order amount * - * @var float + * @var float|null */ protected $totalAmount; /** * The total order VAT amount * - * @var float + * @var float|null */ protected $totalVat; /** * The total order amount to pay * - * @var float + * @var float|null */ protected $amountToPay; /** * The total order amount, in the shops base currency * - * @var float + * @var float|null */ protected $totalAmountInBaseCurrency; /** * The total VAT amount, in the shops base currency * - * @var float + * @var float|null */ protected $totalVatInBaseCurrency; /** * The total amount to pay, in the shops base currency * - * @var float + * @var float|null */ protected $amountToPayInBaseCurrency; /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The ID of the orders customer * - * @var int + * @var int|null */ protected $customerId; /** * The ID of the orders status * - * @var int + * @var int|null */ protected $statusId; /** * Set this to false to prevent sending email to customer on changes to statusId and new orders * - * @var bool + * @var bool|null */ protected $onOrderStatusChangeSendEmail = true; /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @var bool + * @var bool|null */ protected $onOrderStatusChangeProcessPayment = true; /** * The ID of the orders shipping method * - * @var int + * @var int|null */ protected $shippingMethodId; /** * The ID of the orders payment method * - * @var int + * @var int|null */ protected $paymentMethodId; /** * The ID code of the payment method. * - * @var string + * @var string|null */ protected $paymentMethodIdCode; /** * Title of the orders payment method * - * @var string + * @var string|null */ protected $paymentMethodName; /** * Payment fee * - * @var float + * @var float|null */ protected $paymentFee; /** * The VAT rate of the paymentFee in percent * - * @var float + * @var float|null */ protected $paymentVatRate; /** * Title of the orders shipping method * - * @var string + * @var string|null */ protected $shippingMethodName; /** * Shipping cost * - * @var float + * @var float|null */ protected $shippingCost; /** * The VAT rate of the shippingCost in percent * - * @var float + * @var float|null */ protected $shippingVatRate; /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @var float + * @var float|null */ protected $totalWeight; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo1; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo2; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo3; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo4; /** * The code ID of a discount code that was used for this order * - * @var string + * @var string|null */ protected $discountCode; /** * The amount paid via the payment method for this order * - * @var float + * @var float|null */ protected $amountPaid; /** * Same as amountPaid, but in the shops base currency * - * @var float + * @var float|null */ protected $amountPaidInBaseCurrency; /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @var bool + * @var bool|null */ protected $isComplete; /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @var string + * @var string|null */ protected $currencyCode; /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @var float + * @var float|null */ protected $currencyExchangeRate; /** * The number of decimals to display * - * @var int + * @var int|null */ protected $currencyPrecision; /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @var string + * @var string|null */ protected $langCode; /** * Reference to the payment methods payment transaction * - * @var string + * @var string|null */ protected $paymentReference; /** * Status of the payment methods payment transaction * - * @var string + * @var string|null */ protected $paymentStatus; /** * An order is read when an administrator has read it via the admin GUI * - * @var bool + * @var bool|null */ protected $isRead; /** * Whether the customer or an admin has added a comment to the order * - * @var bool + * @var bool|null */ protected $hasComment; /** * An internal comment placed by an administrator. Not available to the customer * - * @var string + * @var string|null */ protected $internalComment; /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @var int + * @var int|null */ protected $shippingTrackerType; /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @var string + * @var string|null */ protected $shippingTrackingNo; /** * The email address of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerEmail; /** * The national id number of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerNationalIdNo; /** * The VAT number of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerVatNo; /** * Custom customer info at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerCustomInfo1; /** * Custom customer info at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerCustomInfo2; /** * A collection of order items * - * @var OrderItemModel[] + * @var OrderItemModel[]|null */ protected $items; /** * * - * @var OrderAddressModel + * @var OrderAddressModel|null */ protected $addresses; /** * The orders ID * - * @return int + * @return int|null */ - public function getOrderId() : int + public function getOrderId() : ?int { return $this->orderId; } /** * The orders ID * - * @param int $orderId + * @param int|null $orderId * * @return self */ - public function setOrderId(int $orderId) : self + public function setOrderId(?int $orderId) : self { $this->orderId = $orderId; return $this; @@ -334,20 +334,20 @@ public function setOrderId(int $orderId) : self /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -355,20 +355,20 @@ public function setModifiedAt(string $modifiedAt) : self /** * The shops base currency code at the point of order creation * - * @return string + * @return string|null */ - public function getBaseCurrencyCode() : string + public function getBaseCurrencyCode() : ?string { return $this->baseCurrencyCode; } /** * The shops base currency code at the point of order creation * - * @param string $baseCurrencyCode + * @param string|null $baseCurrencyCode * * @return self */ - public function setBaseCurrencyCode(string $baseCurrencyCode) : self + public function setBaseCurrencyCode(?string $baseCurrencyCode) : self { $this->baseCurrencyCode = $baseCurrencyCode; return $this; @@ -376,20 +376,20 @@ public function setBaseCurrencyCode(string $baseCurrencyCode) : self /** * The shops country code at the point of order creation * - * @return string + * @return string|null */ - public function getShopCountryCode() : string + public function getShopCountryCode() : ?string { return $this->shopCountryCode; } /** * The shops country code at the point of order creation * - * @param string $shopCountryCode + * @param string|null $shopCountryCode * * @return self */ - public function setShopCountryCode(string $shopCountryCode) : self + public function setShopCountryCode(?string $shopCountryCode) : self { $this->shopCountryCode = $shopCountryCode; return $this; @@ -397,20 +397,20 @@ public function setShopCountryCode(string $shopCountryCode) : self /** * The total order amount * - * @return float + * @return float|null */ - public function getTotalAmount() : float + public function getTotalAmount() : ?float { return $this->totalAmount; } /** * The total order amount * - * @param float $totalAmount + * @param float|null $totalAmount * * @return self */ - public function setTotalAmount(float $totalAmount) : self + public function setTotalAmount(?float $totalAmount) : self { $this->totalAmount = $totalAmount; return $this; @@ -418,20 +418,20 @@ public function setTotalAmount(float $totalAmount) : self /** * The total order VAT amount * - * @return float + * @return float|null */ - public function getTotalVat() : float + public function getTotalVat() : ?float { return $this->totalVat; } /** * The total order VAT amount * - * @param float $totalVat + * @param float|null $totalVat * * @return self */ - public function setTotalVat(float $totalVat) : self + public function setTotalVat(?float $totalVat) : self { $this->totalVat = $totalVat; return $this; @@ -439,20 +439,20 @@ public function setTotalVat(float $totalVat) : self /** * The total order amount to pay * - * @return float + * @return float|null */ - public function getAmountToPay() : float + public function getAmountToPay() : ?float { return $this->amountToPay; } /** * The total order amount to pay * - * @param float $amountToPay + * @param float|null $amountToPay * * @return self */ - public function setAmountToPay(float $amountToPay) : self + public function setAmountToPay(?float $amountToPay) : self { $this->amountToPay = $amountToPay; return $this; @@ -460,20 +460,20 @@ public function setAmountToPay(float $amountToPay) : self /** * The total order amount, in the shops base currency * - * @return float + * @return float|null */ - public function getTotalAmountInBaseCurrency() : float + public function getTotalAmountInBaseCurrency() : ?float { return $this->totalAmountInBaseCurrency; } /** * The total order amount, in the shops base currency * - * @param float $totalAmountInBaseCurrency + * @param float|null $totalAmountInBaseCurrency * * @return self */ - public function setTotalAmountInBaseCurrency(float $totalAmountInBaseCurrency) : self + public function setTotalAmountInBaseCurrency(?float $totalAmountInBaseCurrency) : self { $this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency; return $this; @@ -481,20 +481,20 @@ public function setTotalAmountInBaseCurrency(float $totalAmountInBaseCurrency) : /** * The total VAT amount, in the shops base currency * - * @return float + * @return float|null */ - public function getTotalVatInBaseCurrency() : float + public function getTotalVatInBaseCurrency() : ?float { return $this->totalVatInBaseCurrency; } /** * The total VAT amount, in the shops base currency * - * @param float $totalVatInBaseCurrency + * @param float|null $totalVatInBaseCurrency * * @return self */ - public function setTotalVatInBaseCurrency(float $totalVatInBaseCurrency) : self + public function setTotalVatInBaseCurrency(?float $totalVatInBaseCurrency) : self { $this->totalVatInBaseCurrency = $totalVatInBaseCurrency; return $this; @@ -502,20 +502,20 @@ public function setTotalVatInBaseCurrency(float $totalVatInBaseCurrency) : self /** * The total amount to pay, in the shops base currency * - * @return float + * @return float|null */ - public function getAmountToPayInBaseCurrency() : float + public function getAmountToPayInBaseCurrency() : ?float { return $this->amountToPayInBaseCurrency; } /** * The total amount to pay, in the shops base currency * - * @param float $amountToPayInBaseCurrency + * @param float|null $amountToPayInBaseCurrency * * @return self */ - public function setAmountToPayInBaseCurrency(float $amountToPayInBaseCurrency) : self + public function setAmountToPayInBaseCurrency(?float $amountToPayInBaseCurrency) : self { $this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency; return $this; @@ -523,20 +523,20 @@ public function setAmountToPayInBaseCurrency(float $amountToPayInBaseCurrency) : /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -544,20 +544,20 @@ public function setCreatedAt(string $createdAt) : self /** * The ID of the orders customer * - * @return int + * @return int|null */ - public function getCustomerId() : int + public function getCustomerId() : ?int { return $this->customerId; } /** * The ID of the orders customer * - * @param int $customerId + * @param int|null $customerId * * @return self */ - public function setCustomerId(int $customerId) : self + public function setCustomerId(?int $customerId) : self { $this->customerId = $customerId; return $this; @@ -565,20 +565,20 @@ public function setCustomerId(int $customerId) : self /** * The ID of the orders status * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The ID of the orders status * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; @@ -586,20 +586,20 @@ public function setStatusId(int $statusId) : self /** * Set this to false to prevent sending email to customer on changes to statusId and new orders * - * @return bool + * @return bool|null */ - public function getOnOrderStatusChangeSendEmail() : bool + public function getOnOrderStatusChangeSendEmail() : ?bool { return $this->onOrderStatusChangeSendEmail; } /** * Set this to false to prevent sending email to customer on changes to statusId and new orders * - * @param bool $onOrderStatusChangeSendEmail + * @param bool|null $onOrderStatusChangeSendEmail * * @return self */ - public function setOnOrderStatusChangeSendEmail(bool $onOrderStatusChangeSendEmail) : self + public function setOnOrderStatusChangeSendEmail(?bool $onOrderStatusChangeSendEmail) : self { $this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail; return $this; @@ -607,20 +607,20 @@ public function setOnOrderStatusChangeSendEmail(bool $onOrderStatusChangeSendEma /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @return bool + * @return bool|null */ - public function getOnOrderStatusChangeProcessPayment() : bool + public function getOnOrderStatusChangeProcessPayment() : ?bool { return $this->onOrderStatusChangeProcessPayment; } /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @param bool $onOrderStatusChangeProcessPayment + * @param bool|null $onOrderStatusChangeProcessPayment * * @return self */ - public function setOnOrderStatusChangeProcessPayment(bool $onOrderStatusChangeProcessPayment) : self + public function setOnOrderStatusChangeProcessPayment(?bool $onOrderStatusChangeProcessPayment) : self { $this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment; return $this; @@ -628,20 +628,20 @@ public function setOnOrderStatusChangeProcessPayment(bool $onOrderStatusChangePr /** * The ID of the orders shipping method * - * @return int + * @return int|null */ - public function getShippingMethodId() : int + public function getShippingMethodId() : ?int { return $this->shippingMethodId; } /** * The ID of the orders shipping method * - * @param int $shippingMethodId + * @param int|null $shippingMethodId * * @return self */ - public function setShippingMethodId(int $shippingMethodId) : self + public function setShippingMethodId(?int $shippingMethodId) : self { $this->shippingMethodId = $shippingMethodId; return $this; @@ -649,20 +649,20 @@ public function setShippingMethodId(int $shippingMethodId) : self /** * The ID of the orders payment method * - * @return int + * @return int|null */ - public function getPaymentMethodId() : int + public function getPaymentMethodId() : ?int { return $this->paymentMethodId; } /** * The ID of the orders payment method * - * @param int $paymentMethodId + * @param int|null $paymentMethodId * * @return self */ - public function setPaymentMethodId(int $paymentMethodId) : self + public function setPaymentMethodId(?int $paymentMethodId) : self { $this->paymentMethodId = $paymentMethodId; return $this; @@ -670,20 +670,20 @@ public function setPaymentMethodId(int $paymentMethodId) : self /** * The ID code of the payment method. * - * @return string + * @return string|null */ - public function getPaymentMethodIdCode() : string + public function getPaymentMethodIdCode() : ?string { return $this->paymentMethodIdCode; } /** * The ID code of the payment method. * - * @param string $paymentMethodIdCode + * @param string|null $paymentMethodIdCode * * @return self */ - public function setPaymentMethodIdCode(string $paymentMethodIdCode) : self + public function setPaymentMethodIdCode(?string $paymentMethodIdCode) : self { $this->paymentMethodIdCode = $paymentMethodIdCode; return $this; @@ -691,20 +691,20 @@ public function setPaymentMethodIdCode(string $paymentMethodIdCode) : self /** * Title of the orders payment method * - * @return string + * @return string|null */ - public function getPaymentMethodName() : string + public function getPaymentMethodName() : ?string { return $this->paymentMethodName; } /** * Title of the orders payment method * - * @param string $paymentMethodName + * @param string|null $paymentMethodName * * @return self */ - public function setPaymentMethodName(string $paymentMethodName) : self + public function setPaymentMethodName(?string $paymentMethodName) : self { $this->paymentMethodName = $paymentMethodName; return $this; @@ -712,20 +712,20 @@ public function setPaymentMethodName(string $paymentMethodName) : self /** * Payment fee * - * @return float + * @return float|null */ - public function getPaymentFee() : float + public function getPaymentFee() : ?float { return $this->paymentFee; } /** * Payment fee * - * @param float $paymentFee + * @param float|null $paymentFee * * @return self */ - public function setPaymentFee(float $paymentFee) : self + public function setPaymentFee(?float $paymentFee) : self { $this->paymentFee = $paymentFee; return $this; @@ -733,20 +733,20 @@ public function setPaymentFee(float $paymentFee) : self /** * The VAT rate of the paymentFee in percent * - * @return float + * @return float|null */ - public function getPaymentVatRate() : float + public function getPaymentVatRate() : ?float { return $this->paymentVatRate; } /** * The VAT rate of the paymentFee in percent * - * @param float $paymentVatRate + * @param float|null $paymentVatRate * * @return self */ - public function setPaymentVatRate(float $paymentVatRate) : self + public function setPaymentVatRate(?float $paymentVatRate) : self { $this->paymentVatRate = $paymentVatRate; return $this; @@ -754,20 +754,20 @@ public function setPaymentVatRate(float $paymentVatRate) : self /** * Title of the orders shipping method * - * @return string + * @return string|null */ - public function getShippingMethodName() : string + public function getShippingMethodName() : ?string { return $this->shippingMethodName; } /** * Title of the orders shipping method * - * @param string $shippingMethodName + * @param string|null $shippingMethodName * * @return self */ - public function setShippingMethodName(string $shippingMethodName) : self + public function setShippingMethodName(?string $shippingMethodName) : self { $this->shippingMethodName = $shippingMethodName; return $this; @@ -775,20 +775,20 @@ public function setShippingMethodName(string $shippingMethodName) : self /** * Shipping cost * - * @return float + * @return float|null */ - public function getShippingCost() : float + public function getShippingCost() : ?float { return $this->shippingCost; } /** * Shipping cost * - * @param float $shippingCost + * @param float|null $shippingCost * * @return self */ - public function setShippingCost(float $shippingCost) : self + public function setShippingCost(?float $shippingCost) : self { $this->shippingCost = $shippingCost; return $this; @@ -796,20 +796,20 @@ public function setShippingCost(float $shippingCost) : self /** * The VAT rate of the shippingCost in percent * - * @return float + * @return float|null */ - public function getShippingVatRate() : float + public function getShippingVatRate() : ?float { return $this->shippingVatRate; } /** * The VAT rate of the shippingCost in percent * - * @param float $shippingVatRate + * @param float|null $shippingVatRate * * @return self */ - public function setShippingVatRate(float $shippingVatRate) : self + public function setShippingVatRate(?float $shippingVatRate) : self { $this->shippingVatRate = $shippingVatRate; return $this; @@ -817,20 +817,20 @@ public function setShippingVatRate(float $shippingVatRate) : self /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @return float + * @return float|null */ - public function getTotalWeight() : float + public function getTotalWeight() : ?float { return $this->totalWeight; } /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @param float $totalWeight + * @param float|null $totalWeight * * @return self */ - public function setTotalWeight(float $totalWeight) : self + public function setTotalWeight(?float $totalWeight) : self { $this->totalWeight = $totalWeight; return $this; @@ -838,20 +838,20 @@ public function setTotalWeight(float $totalWeight) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo1() : string + public function getCustomInfo1() : ?string { return $this->customInfo1; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo1 + * @param string|null $customInfo1 * * @return self */ - public function setCustomInfo1(string $customInfo1) : self + public function setCustomInfo1(?string $customInfo1) : self { $this->customInfo1 = $customInfo1; return $this; @@ -859,20 +859,20 @@ public function setCustomInfo1(string $customInfo1) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo2() : string + public function getCustomInfo2() : ?string { return $this->customInfo2; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo2 + * @param string|null $customInfo2 * * @return self */ - public function setCustomInfo2(string $customInfo2) : self + public function setCustomInfo2(?string $customInfo2) : self { $this->customInfo2 = $customInfo2; return $this; @@ -880,20 +880,20 @@ public function setCustomInfo2(string $customInfo2) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo3() : string + public function getCustomInfo3() : ?string { return $this->customInfo3; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo3 + * @param string|null $customInfo3 * * @return self */ - public function setCustomInfo3(string $customInfo3) : self + public function setCustomInfo3(?string $customInfo3) : self { $this->customInfo3 = $customInfo3; return $this; @@ -901,20 +901,20 @@ public function setCustomInfo3(string $customInfo3) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo4() : string + public function getCustomInfo4() : ?string { return $this->customInfo4; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo4 + * @param string|null $customInfo4 * * @return self */ - public function setCustomInfo4(string $customInfo4) : self + public function setCustomInfo4(?string $customInfo4) : self { $this->customInfo4 = $customInfo4; return $this; @@ -922,20 +922,20 @@ public function setCustomInfo4(string $customInfo4) : self /** * The code ID of a discount code that was used for this order * - * @return string + * @return string|null */ - public function getDiscountCode() : string + public function getDiscountCode() : ?string { return $this->discountCode; } /** * The code ID of a discount code that was used for this order * - * @param string $discountCode + * @param string|null $discountCode * * @return self */ - public function setDiscountCode(string $discountCode) : self + public function setDiscountCode(?string $discountCode) : self { $this->discountCode = $discountCode; return $this; @@ -943,20 +943,20 @@ public function setDiscountCode(string $discountCode) : self /** * The amount paid via the payment method for this order * - * @return float + * @return float|null */ - public function getAmountPaid() : float + public function getAmountPaid() : ?float { return $this->amountPaid; } /** * The amount paid via the payment method for this order * - * @param float $amountPaid + * @param float|null $amountPaid * * @return self */ - public function setAmountPaid(float $amountPaid) : self + public function setAmountPaid(?float $amountPaid) : self { $this->amountPaid = $amountPaid; return $this; @@ -964,20 +964,20 @@ public function setAmountPaid(float $amountPaid) : self /** * Same as amountPaid, but in the shops base currency * - * @return float + * @return float|null */ - public function getAmountPaidInBaseCurrency() : float + public function getAmountPaidInBaseCurrency() : ?float { return $this->amountPaidInBaseCurrency; } /** * Same as amountPaid, but in the shops base currency * - * @param float $amountPaidInBaseCurrency + * @param float|null $amountPaidInBaseCurrency * * @return self */ - public function setAmountPaidInBaseCurrency(float $amountPaidInBaseCurrency) : self + public function setAmountPaidInBaseCurrency(?float $amountPaidInBaseCurrency) : self { $this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency; return $this; @@ -985,20 +985,20 @@ public function setAmountPaidInBaseCurrency(float $amountPaidInBaseCurrency) : s /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @return bool + * @return bool|null */ - public function getIsComplete() : bool + public function getIsComplete() : ?bool { return $this->isComplete; } /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @param bool $isComplete + * @param bool|null $isComplete * * @return self */ - public function setIsComplete(bool $isComplete) : self + public function setIsComplete(?bool $isComplete) : self { $this->isComplete = $isComplete; return $this; @@ -1006,20 +1006,20 @@ public function setIsComplete(bool $isComplete) : self /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @return string + * @return string|null */ - public function getCurrencyCode() : string + public function getCurrencyCode() : ?string { return $this->currencyCode; } /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @param string $currencyCode + * @param string|null $currencyCode * * @return self */ - public function setCurrencyCode(string $currencyCode) : self + public function setCurrencyCode(?string $currencyCode) : self { $this->currencyCode = $currencyCode; return $this; @@ -1027,20 +1027,20 @@ public function setCurrencyCode(string $currencyCode) : self /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @return float + * @return float|null */ - public function getCurrencyExchangeRate() : float + public function getCurrencyExchangeRate() : ?float { return $this->currencyExchangeRate; } /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @param float $currencyExchangeRate + * @param float|null $currencyExchangeRate * * @return self */ - public function setCurrencyExchangeRate(float $currencyExchangeRate) : self + public function setCurrencyExchangeRate(?float $currencyExchangeRate) : self { $this->currencyExchangeRate = $currencyExchangeRate; return $this; @@ -1048,20 +1048,20 @@ public function setCurrencyExchangeRate(float $currencyExchangeRate) : self /** * The number of decimals to display * - * @return int + * @return int|null */ - public function getCurrencyPrecision() : int + public function getCurrencyPrecision() : ?int { return $this->currencyPrecision; } /** * The number of decimals to display * - * @param int $currencyPrecision + * @param int|null $currencyPrecision * * @return self */ - public function setCurrencyPrecision(int $currencyPrecision) : self + public function setCurrencyPrecision(?int $currencyPrecision) : self { $this->currencyPrecision = $currencyPrecision; return $this; @@ -1069,20 +1069,20 @@ public function setCurrencyPrecision(int $currencyPrecision) : self /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -1090,20 +1090,20 @@ public function setLangCode(string $langCode) : self /** * Reference to the payment methods payment transaction * - * @return string + * @return string|null */ - public function getPaymentReference() : string + public function getPaymentReference() : ?string { return $this->paymentReference; } /** * Reference to the payment methods payment transaction * - * @param string $paymentReference + * @param string|null $paymentReference * * @return self */ - public function setPaymentReference(string $paymentReference) : self + public function setPaymentReference(?string $paymentReference) : self { $this->paymentReference = $paymentReference; return $this; @@ -1111,20 +1111,20 @@ public function setPaymentReference(string $paymentReference) : self /** * Status of the payment methods payment transaction * - * @return string + * @return string|null */ - public function getPaymentStatus() : string + public function getPaymentStatus() : ?string { return $this->paymentStatus; } /** * Status of the payment methods payment transaction * - * @param string $paymentStatus + * @param string|null $paymentStatus * * @return self */ - public function setPaymentStatus(string $paymentStatus) : self + public function setPaymentStatus(?string $paymentStatus) : self { $this->paymentStatus = $paymentStatus; return $this; @@ -1132,20 +1132,20 @@ public function setPaymentStatus(string $paymentStatus) : self /** * An order is read when an administrator has read it via the admin GUI * - * @return bool + * @return bool|null */ - public function getIsRead() : bool + public function getIsRead() : ?bool { return $this->isRead; } /** * An order is read when an administrator has read it via the admin GUI * - * @param bool $isRead + * @param bool|null $isRead * * @return self */ - public function setIsRead(bool $isRead) : self + public function setIsRead(?bool $isRead) : self { $this->isRead = $isRead; return $this; @@ -1153,20 +1153,20 @@ public function setIsRead(bool $isRead) : self /** * Whether the customer or an admin has added a comment to the order * - * @return bool + * @return bool|null */ - public function getHasComment() : bool + public function getHasComment() : ?bool { return $this->hasComment; } /** * Whether the customer or an admin has added a comment to the order * - * @param bool $hasComment + * @param bool|null $hasComment * * @return self */ - public function setHasComment(bool $hasComment) : self + public function setHasComment(?bool $hasComment) : self { $this->hasComment = $hasComment; return $this; @@ -1174,20 +1174,20 @@ public function setHasComment(bool $hasComment) : self /** * An internal comment placed by an administrator. Not available to the customer * - * @return string + * @return string|null */ - public function getInternalComment() : string + public function getInternalComment() : ?string { return $this->internalComment; } /** * An internal comment placed by an administrator. Not available to the customer * - * @param string $internalComment + * @param string|null $internalComment * * @return self */ - public function setInternalComment(string $internalComment) : self + public function setInternalComment(?string $internalComment) : self { $this->internalComment = $internalComment; return $this; @@ -1195,20 +1195,20 @@ public function setInternalComment(string $internalComment) : self /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @return int + * @return int|null */ - public function getShippingTrackerType() : int + public function getShippingTrackerType() : ?int { return $this->shippingTrackerType; } /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @param int $shippingTrackerType + * @param int|null $shippingTrackerType * * @return self */ - public function setShippingTrackerType(int $shippingTrackerType) : self + public function setShippingTrackerType(?int $shippingTrackerType) : self { $this->shippingTrackerType = $shippingTrackerType; return $this; @@ -1216,20 +1216,20 @@ public function setShippingTrackerType(int $shippingTrackerType) : self /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @return string + * @return string|null */ - public function getShippingTrackingNo() : string + public function getShippingTrackingNo() : ?string { return $this->shippingTrackingNo; } /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @param string $shippingTrackingNo + * @param string|null $shippingTrackingNo * * @return self */ - public function setShippingTrackingNo(string $shippingTrackingNo) : self + public function setShippingTrackingNo(?string $shippingTrackingNo) : self { $this->shippingTrackingNo = $shippingTrackingNo; return $this; @@ -1237,20 +1237,20 @@ public function setShippingTrackingNo(string $shippingTrackingNo) : self /** * The email address of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerEmail() : string + public function getOriginalCustomerEmail() : ?string { return $this->originalCustomerEmail; } /** * The email address of the customer at the point of order creation * - * @param string $originalCustomerEmail + * @param string|null $originalCustomerEmail * * @return self */ - public function setOriginalCustomerEmail(string $originalCustomerEmail) : self + public function setOriginalCustomerEmail(?string $originalCustomerEmail) : self { $this->originalCustomerEmail = $originalCustomerEmail; return $this; @@ -1258,20 +1258,20 @@ public function setOriginalCustomerEmail(string $originalCustomerEmail) : self /** * The national id number of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerNationalIdNo() : string + public function getOriginalCustomerNationalIdNo() : ?string { return $this->originalCustomerNationalIdNo; } /** * The national id number of the customer at the point of order creation * - * @param string $originalCustomerNationalIdNo + * @param string|null $originalCustomerNationalIdNo * * @return self */ - public function setOriginalCustomerNationalIdNo(string $originalCustomerNationalIdNo) : self + public function setOriginalCustomerNationalIdNo(?string $originalCustomerNationalIdNo) : self { $this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo; return $this; @@ -1279,20 +1279,20 @@ public function setOriginalCustomerNationalIdNo(string $originalCustomerNational /** * The VAT number of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerVatNo() : string + public function getOriginalCustomerVatNo() : ?string { return $this->originalCustomerVatNo; } /** * The VAT number of the customer at the point of order creation * - * @param string $originalCustomerVatNo + * @param string|null $originalCustomerVatNo * * @return self */ - public function setOriginalCustomerVatNo(string $originalCustomerVatNo) : self + public function setOriginalCustomerVatNo(?string $originalCustomerVatNo) : self { $this->originalCustomerVatNo = $originalCustomerVatNo; return $this; @@ -1300,20 +1300,20 @@ public function setOriginalCustomerVatNo(string $originalCustomerVatNo) : self /** * Custom customer info at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerCustomInfo1() : string + public function getOriginalCustomerCustomInfo1() : ?string { return $this->originalCustomerCustomInfo1; } /** * Custom customer info at the point of order creation * - * @param string $originalCustomerCustomInfo1 + * @param string|null $originalCustomerCustomInfo1 * * @return self */ - public function setOriginalCustomerCustomInfo1(string $originalCustomerCustomInfo1) : self + public function setOriginalCustomerCustomInfo1(?string $originalCustomerCustomInfo1) : self { $this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1; return $this; @@ -1321,20 +1321,20 @@ public function setOriginalCustomerCustomInfo1(string $originalCustomerCustomInf /** * Custom customer info at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerCustomInfo2() : string + public function getOriginalCustomerCustomInfo2() : ?string { return $this->originalCustomerCustomInfo2; } /** * Custom customer info at the point of order creation * - * @param string $originalCustomerCustomInfo2 + * @param string|null $originalCustomerCustomInfo2 * * @return self */ - public function setOriginalCustomerCustomInfo2(string $originalCustomerCustomInfo2) : self + public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomInfo2) : self { $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; @@ -1342,20 +1342,20 @@ public function setOriginalCustomerCustomInfo2(string $originalCustomerCustomInf /** * A collection of order items * - * @return OrderItemModel[] + * @return OrderItemModel[]|null */ - public function getItems() : array + public function getItems() : ?array { return $this->items; } /** * A collection of order items * - * @param OrderItemModel[] $items + * @param OrderItemModel[]|null $items * * @return self */ - public function setItems(array $items) : self + public function setItems(?array $items) : self { $this->items = $items; return $this; @@ -1363,20 +1363,20 @@ public function setItems(array $items) : self /** * * - * @return OrderAddressModel + * @return OrderAddressModel|null */ - public function getAddresses() : OrderAddressModel + public function getAddresses() : ?OrderAddressModel { return $this->addresses; } /** * * - * @param OrderAddressModel $addresses + * @param OrderAddressModel|null $addresses * * @return self */ - public function setAddresses(OrderAddressModel $addresses) : self + public function setAddresses(?OrderAddressModel $addresses) : self { $this->addresses = $addresses; return $this; diff --git a/src/Api/Generated/Model/OrderStatusLanguageModel.php b/src/Api/Generated/Model/OrderStatusLanguageModel.php index b3442583..e744c29b 100644 --- a/src/Api/Generated/Model/OrderStatusLanguageModel.php +++ b/src/Api/Generated/Model/OrderStatusLanguageModel.php @@ -7,32 +7,32 @@ class OrderStatusLanguageModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @var string + * @var string|null */ protected $langCode; /** * The name of this order status * - * @var string + * @var string|null */ protected $name; /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this order status * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this order status * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php index 0e784b4d..040ee8b8 100644 --- a/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php +++ b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php @@ -7,26 +7,26 @@ class OrderStatusLanguageModelCollection /** * * - * @var OrderStatusLanguageModel[] + * @var OrderStatusLanguageModel[]|null */ protected $data; /** * * - * @return OrderStatusLanguageModel[] + * @return OrderStatusLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * * - * @param OrderStatusLanguageModel[] $data + * @param OrderStatusLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderStatusModel.php b/src/Api/Generated/Model/OrderStatusModel.php index 6ef6721c..06e0689f 100644 --- a/src/Api/Generated/Model/OrderStatusModel.php +++ b/src/Api/Generated/Model/OrderStatusModel.php @@ -7,44 +7,44 @@ class OrderStatusModel /** * The id of the order status * - * @var int + * @var int|null */ protected $statusId; /** * Should an order status update email be sent out when an order gets this status * - * @var bool + * @var bool|null */ protected $shouldSendEmail; /** * Standard order statuses has an idCode as well. These are: created, picking, completed, canceled * - * @var string + * @var string|null */ protected $idCode; /** * * - * @var OrderStatusLanguageModelCollection + * @var OrderStatusLanguageModelCollection|null */ protected $languages; /** * The id of the order status * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The id of the order status * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; @@ -52,20 +52,20 @@ public function setStatusId(int $statusId) : self /** * Should an order status update email be sent out when an order gets this status * - * @return bool + * @return bool|null */ - public function getShouldSendEmail() : bool + public function getShouldSendEmail() : ?bool { return $this->shouldSendEmail; } /** * Should an order status update email be sent out when an order gets this status * - * @param bool $shouldSendEmail + * @param bool|null $shouldSendEmail * * @return self */ - public function setShouldSendEmail(bool $shouldSendEmail) : self + public function setShouldSendEmail(?bool $shouldSendEmail) : self { $this->shouldSendEmail = $shouldSendEmail; return $this; @@ -73,20 +73,20 @@ public function setShouldSendEmail(bool $shouldSendEmail) : self /** * Standard order statuses has an idCode as well. These are: created, picking, completed, canceled * - * @return string + * @return string|null */ - public function getIdCode() : string + public function getIdCode() : ?string { return $this->idCode; } /** * Standard order statuses has an idCode as well. These are: created, picking, completed, canceled * - * @param string $idCode + * @param string|null $idCode * * @return self */ - public function setIdCode(string $idCode) : self + public function setIdCode(?string $idCode) : self { $this->idCode = $idCode; return $this; @@ -94,20 +94,20 @@ public function setIdCode(string $idCode) : self /** * * - * @return OrderStatusLanguageModelCollection + * @return OrderStatusLanguageModelCollection|null */ - public function getLanguages() : OrderStatusLanguageModelCollection + public function getLanguages() : ?OrderStatusLanguageModelCollection { return $this->languages; } /** * * - * @param OrderStatusLanguageModelCollection $languages + * @param OrderStatusLanguageModelCollection|null $languages * * @return self */ - public function setLanguages(OrderStatusLanguageModelCollection $languages) : self + public function setLanguages(?OrderStatusLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/OrderStatusModelCollection.php b/src/Api/Generated/Model/OrderStatusModelCollection.php index 18c0d717..ed82a041 100644 --- a/src/Api/Generated/Model/OrderStatusModelCollection.php +++ b/src/Api/Generated/Model/OrderStatusModelCollection.php @@ -7,26 +7,26 @@ class OrderStatusModelCollection /** * A list of order statuses * - * @var OrderStatusModel[] + * @var OrderStatusModel[]|null */ protected $data; /** * A list of order statuses * - * @return OrderStatusModel[] + * @return OrderStatusModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of order statuses * - * @param OrderStatusModel[] $data + * @param OrderStatusModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderStatusModelItem.php b/src/Api/Generated/Model/OrderStatusModelItem.php index 22687d53..36184697 100644 --- a/src/Api/Generated/Model/OrderStatusModelItem.php +++ b/src/Api/Generated/Model/OrderStatusModelItem.php @@ -7,26 +7,26 @@ class OrderStatusModelItem /** * * - * @var OrderStatusModel + * @var OrderStatusModel|null */ protected $data; /** * * - * @return OrderStatusModel + * @return OrderStatusModel|null */ - public function getData() : OrderStatusModel + public function getData() : ?OrderStatusModel { return $this->data; } /** * * - * @param OrderStatusModel $data + * @param OrderStatusModel|null $data * * @return self */ - public function setData(OrderStatusModel $data) : self + public function setData(?OrderStatusModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/OrderUpdateModel.php b/src/Api/Generated/Model/OrderUpdateModel.php index ac435ca9..28b15f9b 100644 --- a/src/Api/Generated/Model/OrderUpdateModel.php +++ b/src/Api/Generated/Model/OrderUpdateModel.php @@ -7,326 +7,326 @@ class OrderUpdateModel /** * The orders ID * - * @var int + * @var int|null */ protected $orderId; /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** * The shops base currency code at the point of order creation * - * @var string + * @var string|null */ protected $baseCurrencyCode; /** * The shops country code at the point of order creation * - * @var string + * @var string|null */ protected $shopCountryCode; /** * The total order amount * - * @var float + * @var float|null */ protected $totalAmount; /** * The total order VAT amount * - * @var float + * @var float|null */ protected $totalVat; /** * The total order amount to pay * - * @var float + * @var float|null */ protected $amountToPay; /** * The total order amount, in the shops base currency * - * @var float + * @var float|null */ protected $totalAmountInBaseCurrency; /** * The total VAT amount, in the shops base currency * - * @var float + * @var float|null */ protected $totalVatInBaseCurrency; /** * The total amount to pay, in the shops base currency * - * @var float + * @var float|null */ protected $amountToPayInBaseCurrency; /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** * The ID of the orders customer * - * @var int + * @var int|null */ protected $customerId; /** * The ID of the orders status * - * @var int + * @var int|null */ protected $statusId; /** * Set this to false to prevent sending email to customer on changes to statusId and new orders * - * @var bool + * @var bool|null */ protected $onOrderStatusChangeSendEmail = true; /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @var bool + * @var bool|null */ protected $onOrderStatusChangeProcessPayment = true; /** * The ID of the orders shipping method * - * @var int + * @var int|null */ protected $shippingMethodId; /** * The ID of the orders payment method * - * @var int + * @var int|null */ protected $paymentMethodId; /** * The ID code of the payment method. * - * @var string + * @var string|null */ protected $paymentMethodIdCode; /** * Title of the orders payment method * - * @var string + * @var string|null */ protected $paymentMethodName; /** * Payment fee * - * @var float + * @var float|null */ protected $paymentFee; /** * The VAT rate of the paymentFee in percent * - * @var float + * @var float|null */ protected $paymentVatRate; /** * Title of the orders shipping method * - * @var string + * @var string|null */ protected $shippingMethodName; /** * Shipping cost * - * @var float + * @var float|null */ protected $shippingCost; /** * The VAT rate of the shippingCost in percent * - * @var float + * @var float|null */ protected $shippingVatRate; /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @var float + * @var float|null */ protected $totalWeight; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo1; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo2; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo3; /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @var string + * @var string|null */ protected $customInfo4; /** * The code ID of a discount code that was used for this order * - * @var string + * @var string|null */ protected $discountCode; /** * The amount paid via the payment method for this order * - * @var float + * @var float|null */ protected $amountPaid; /** * Same as amountPaid, but in the shops base currency * - * @var float + * @var float|null */ protected $amountPaidInBaseCurrency; /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @var bool + * @var bool|null */ protected $isComplete; /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @var string + * @var string|null */ protected $currencyCode; /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @var float + * @var float|null */ protected $currencyExchangeRate; /** * The number of decimals to display * - * @var int + * @var int|null */ protected $currencyPrecision; /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @var string + * @var string|null */ protected $langCode; /** * Reference to the payment methods payment transaction * - * @var string + * @var string|null */ protected $paymentReference; /** * Status of the payment methods payment transaction * - * @var string + * @var string|null */ protected $paymentStatus; /** * An order is read when an administrator has read it via the admin GUI * - * @var bool + * @var bool|null */ protected $isRead; /** * Whether the customer or an admin has added a comment to the order * - * @var bool + * @var bool|null */ protected $hasComment; /** * An internal comment placed by an administrator. Not available to the customer * - * @var string + * @var string|null */ protected $internalComment; /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @var int + * @var int|null */ protected $shippingTrackerType; /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @var string + * @var string|null */ protected $shippingTrackingNo; /** * The email address of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerEmail; /** * The national id number of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerNationalIdNo; /** * The VAT number of the customer at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerVatNo; /** * Custom customer info at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerCustomInfo1; /** * Custom customer info at the point of order creation * - * @var string + * @var string|null */ protected $originalCustomerCustomInfo2; /** * A collection of order items * - * @var OrderItemModel[] + * @var OrderItemModel[]|null */ protected $items; /** * * - * @var OrderAddressModel + * @var OrderAddressModel|null */ protected $addresses; /** * The orders ID * - * @return int + * @return int|null */ - public function getOrderId() : int + public function getOrderId() : ?int { return $this->orderId; } /** * The orders ID * - * @param int $orderId + * @param int|null $orderId * * @return self */ - public function setOrderId(int $orderId) : self + public function setOrderId(?int $orderId) : self { $this->orderId = $orderId; return $this; @@ -334,20 +334,20 @@ public function setOrderId(int $orderId) : self /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the order was modified. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -355,20 +355,20 @@ public function setModifiedAt(string $modifiedAt) : self /** * The shops base currency code at the point of order creation * - * @return string + * @return string|null */ - public function getBaseCurrencyCode() : string + public function getBaseCurrencyCode() : ?string { return $this->baseCurrencyCode; } /** * The shops base currency code at the point of order creation * - * @param string $baseCurrencyCode + * @param string|null $baseCurrencyCode * * @return self */ - public function setBaseCurrencyCode(string $baseCurrencyCode) : self + public function setBaseCurrencyCode(?string $baseCurrencyCode) : self { $this->baseCurrencyCode = $baseCurrencyCode; return $this; @@ -376,20 +376,20 @@ public function setBaseCurrencyCode(string $baseCurrencyCode) : self /** * The shops country code at the point of order creation * - * @return string + * @return string|null */ - public function getShopCountryCode() : string + public function getShopCountryCode() : ?string { return $this->shopCountryCode; } /** * The shops country code at the point of order creation * - * @param string $shopCountryCode + * @param string|null $shopCountryCode * * @return self */ - public function setShopCountryCode(string $shopCountryCode) : self + public function setShopCountryCode(?string $shopCountryCode) : self { $this->shopCountryCode = $shopCountryCode; return $this; @@ -397,20 +397,20 @@ public function setShopCountryCode(string $shopCountryCode) : self /** * The total order amount * - * @return float + * @return float|null */ - public function getTotalAmount() : float + public function getTotalAmount() : ?float { return $this->totalAmount; } /** * The total order amount * - * @param float $totalAmount + * @param float|null $totalAmount * * @return self */ - public function setTotalAmount(float $totalAmount) : self + public function setTotalAmount(?float $totalAmount) : self { $this->totalAmount = $totalAmount; return $this; @@ -418,20 +418,20 @@ public function setTotalAmount(float $totalAmount) : self /** * The total order VAT amount * - * @return float + * @return float|null */ - public function getTotalVat() : float + public function getTotalVat() : ?float { return $this->totalVat; } /** * The total order VAT amount * - * @param float $totalVat + * @param float|null $totalVat * * @return self */ - public function setTotalVat(float $totalVat) : self + public function setTotalVat(?float $totalVat) : self { $this->totalVat = $totalVat; return $this; @@ -439,20 +439,20 @@ public function setTotalVat(float $totalVat) : self /** * The total order amount to pay * - * @return float + * @return float|null */ - public function getAmountToPay() : float + public function getAmountToPay() : ?float { return $this->amountToPay; } /** * The total order amount to pay * - * @param float $amountToPay + * @param float|null $amountToPay * * @return self */ - public function setAmountToPay(float $amountToPay) : self + public function setAmountToPay(?float $amountToPay) : self { $this->amountToPay = $amountToPay; return $this; @@ -460,20 +460,20 @@ public function setAmountToPay(float $amountToPay) : self /** * The total order amount, in the shops base currency * - * @return float + * @return float|null */ - public function getTotalAmountInBaseCurrency() : float + public function getTotalAmountInBaseCurrency() : ?float { return $this->totalAmountInBaseCurrency; } /** * The total order amount, in the shops base currency * - * @param float $totalAmountInBaseCurrency + * @param float|null $totalAmountInBaseCurrency * * @return self */ - public function setTotalAmountInBaseCurrency(float $totalAmountInBaseCurrency) : self + public function setTotalAmountInBaseCurrency(?float $totalAmountInBaseCurrency) : self { $this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency; return $this; @@ -481,20 +481,20 @@ public function setTotalAmountInBaseCurrency(float $totalAmountInBaseCurrency) : /** * The total VAT amount, in the shops base currency * - * @return float + * @return float|null */ - public function getTotalVatInBaseCurrency() : float + public function getTotalVatInBaseCurrency() : ?float { return $this->totalVatInBaseCurrency; } /** * The total VAT amount, in the shops base currency * - * @param float $totalVatInBaseCurrency + * @param float|null $totalVatInBaseCurrency * * @return self */ - public function setTotalVatInBaseCurrency(float $totalVatInBaseCurrency) : self + public function setTotalVatInBaseCurrency(?float $totalVatInBaseCurrency) : self { $this->totalVatInBaseCurrency = $totalVatInBaseCurrency; return $this; @@ -502,20 +502,20 @@ public function setTotalVatInBaseCurrency(float $totalVatInBaseCurrency) : self /** * The total amount to pay, in the shops base currency * - * @return float + * @return float|null */ - public function getAmountToPayInBaseCurrency() : float + public function getAmountToPayInBaseCurrency() : ?float { return $this->amountToPayInBaseCurrency; } /** * The total amount to pay, in the shops base currency * - * @param float $amountToPayInBaseCurrency + * @param float|null $amountToPayInBaseCurrency * * @return self */ - public function setAmountToPayInBaseCurrency(float $amountToPayInBaseCurrency) : self + public function setAmountToPayInBaseCurrency(?float $amountToPayInBaseCurrency) : self { $this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency; return $this; @@ -523,20 +523,20 @@ public function setAmountToPayInBaseCurrency(float $amountToPayInBaseCurrency) : /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the order was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -544,20 +544,20 @@ public function setCreatedAt(string $createdAt) : self /** * The ID of the orders customer * - * @return int + * @return int|null */ - public function getCustomerId() : int + public function getCustomerId() : ?int { return $this->customerId; } /** * The ID of the orders customer * - * @param int $customerId + * @param int|null $customerId * * @return self */ - public function setCustomerId(int $customerId) : self + public function setCustomerId(?int $customerId) : self { $this->customerId = $customerId; return $this; @@ -565,20 +565,20 @@ public function setCustomerId(int $customerId) : self /** * The ID of the orders status * - * @return int + * @return int|null */ - public function getStatusId() : int + public function getStatusId() : ?int { return $this->statusId; } /** * The ID of the orders status * - * @param int $statusId + * @param int|null $statusId * * @return self */ - public function setStatusId(int $statusId) : self + public function setStatusId(?int $statusId) : self { $this->statusId = $statusId; return $this; @@ -586,20 +586,20 @@ public function setStatusId(int $statusId) : self /** * Set this to false to prevent sending email to customer on changes to statusId and new orders * - * @return bool + * @return bool|null */ - public function getOnOrderStatusChangeSendEmail() : bool + public function getOnOrderStatusChangeSendEmail() : ?bool { return $this->onOrderStatusChangeSendEmail; } /** * Set this to false to prevent sending email to customer on changes to statusId and new orders * - * @param bool $onOrderStatusChangeSendEmail + * @param bool|null $onOrderStatusChangeSendEmail * * @return self */ - public function setOnOrderStatusChangeSendEmail(bool $onOrderStatusChangeSendEmail) : self + public function setOnOrderStatusChangeSendEmail(?bool $onOrderStatusChangeSendEmail) : self { $this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail; return $this; @@ -607,20 +607,20 @@ public function setOnOrderStatusChangeSendEmail(bool $onOrderStatusChangeSendEma /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @return bool + * @return bool|null */ - public function getOnOrderStatusChangeProcessPayment() : bool + public function getOnOrderStatusChangeProcessPayment() : ?bool { return $this->onOrderStatusChangeProcessPayment; } /** * Set this to false to prevent processing payment on changes to statusId. Only applies to payment methods that support processing payments. For example charging a reserved amount or cancel a created invoice * - * @param bool $onOrderStatusChangeProcessPayment + * @param bool|null $onOrderStatusChangeProcessPayment * * @return self */ - public function setOnOrderStatusChangeProcessPayment(bool $onOrderStatusChangeProcessPayment) : self + public function setOnOrderStatusChangeProcessPayment(?bool $onOrderStatusChangeProcessPayment) : self { $this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment; return $this; @@ -628,20 +628,20 @@ public function setOnOrderStatusChangeProcessPayment(bool $onOrderStatusChangePr /** * The ID of the orders shipping method * - * @return int + * @return int|null */ - public function getShippingMethodId() : int + public function getShippingMethodId() : ?int { return $this->shippingMethodId; } /** * The ID of the orders shipping method * - * @param int $shippingMethodId + * @param int|null $shippingMethodId * * @return self */ - public function setShippingMethodId(int $shippingMethodId) : self + public function setShippingMethodId(?int $shippingMethodId) : self { $this->shippingMethodId = $shippingMethodId; return $this; @@ -649,20 +649,20 @@ public function setShippingMethodId(int $shippingMethodId) : self /** * The ID of the orders payment method * - * @return int + * @return int|null */ - public function getPaymentMethodId() : int + public function getPaymentMethodId() : ?int { return $this->paymentMethodId; } /** * The ID of the orders payment method * - * @param int $paymentMethodId + * @param int|null $paymentMethodId * * @return self */ - public function setPaymentMethodId(int $paymentMethodId) : self + public function setPaymentMethodId(?int $paymentMethodId) : self { $this->paymentMethodId = $paymentMethodId; return $this; @@ -670,20 +670,20 @@ public function setPaymentMethodId(int $paymentMethodId) : self /** * The ID code of the payment method. * - * @return string + * @return string|null */ - public function getPaymentMethodIdCode() : string + public function getPaymentMethodIdCode() : ?string { return $this->paymentMethodIdCode; } /** * The ID code of the payment method. * - * @param string $paymentMethodIdCode + * @param string|null $paymentMethodIdCode * * @return self */ - public function setPaymentMethodIdCode(string $paymentMethodIdCode) : self + public function setPaymentMethodIdCode(?string $paymentMethodIdCode) : self { $this->paymentMethodIdCode = $paymentMethodIdCode; return $this; @@ -691,20 +691,20 @@ public function setPaymentMethodIdCode(string $paymentMethodIdCode) : self /** * Title of the orders payment method * - * @return string + * @return string|null */ - public function getPaymentMethodName() : string + public function getPaymentMethodName() : ?string { return $this->paymentMethodName; } /** * Title of the orders payment method * - * @param string $paymentMethodName + * @param string|null $paymentMethodName * * @return self */ - public function setPaymentMethodName(string $paymentMethodName) : self + public function setPaymentMethodName(?string $paymentMethodName) : self { $this->paymentMethodName = $paymentMethodName; return $this; @@ -712,20 +712,20 @@ public function setPaymentMethodName(string $paymentMethodName) : self /** * Payment fee * - * @return float + * @return float|null */ - public function getPaymentFee() : float + public function getPaymentFee() : ?float { return $this->paymentFee; } /** * Payment fee * - * @param float $paymentFee + * @param float|null $paymentFee * * @return self */ - public function setPaymentFee(float $paymentFee) : self + public function setPaymentFee(?float $paymentFee) : self { $this->paymentFee = $paymentFee; return $this; @@ -733,20 +733,20 @@ public function setPaymentFee(float $paymentFee) : self /** * The VAT rate of the paymentFee in percent * - * @return float + * @return float|null */ - public function getPaymentVatRate() : float + public function getPaymentVatRate() : ?float { return $this->paymentVatRate; } /** * The VAT rate of the paymentFee in percent * - * @param float $paymentVatRate + * @param float|null $paymentVatRate * * @return self */ - public function setPaymentVatRate(float $paymentVatRate) : self + public function setPaymentVatRate(?float $paymentVatRate) : self { $this->paymentVatRate = $paymentVatRate; return $this; @@ -754,20 +754,20 @@ public function setPaymentVatRate(float $paymentVatRate) : self /** * Title of the orders shipping method * - * @return string + * @return string|null */ - public function getShippingMethodName() : string + public function getShippingMethodName() : ?string { return $this->shippingMethodName; } /** * Title of the orders shipping method * - * @param string $shippingMethodName + * @param string|null $shippingMethodName * * @return self */ - public function setShippingMethodName(string $shippingMethodName) : self + public function setShippingMethodName(?string $shippingMethodName) : self { $this->shippingMethodName = $shippingMethodName; return $this; @@ -775,20 +775,20 @@ public function setShippingMethodName(string $shippingMethodName) : self /** * Shipping cost * - * @return float + * @return float|null */ - public function getShippingCost() : float + public function getShippingCost() : ?float { return $this->shippingCost; } /** * Shipping cost * - * @param float $shippingCost + * @param float|null $shippingCost * * @return self */ - public function setShippingCost(float $shippingCost) : self + public function setShippingCost(?float $shippingCost) : self { $this->shippingCost = $shippingCost; return $this; @@ -796,20 +796,20 @@ public function setShippingCost(float $shippingCost) : self /** * The VAT rate of the shippingCost in percent * - * @return float + * @return float|null */ - public function getShippingVatRate() : float + public function getShippingVatRate() : ?float { return $this->shippingVatRate; } /** * The VAT rate of the shippingCost in percent * - * @param float $shippingVatRate + * @param float|null $shippingVatRate * * @return self */ - public function setShippingVatRate(float $shippingVatRate) : self + public function setShippingVatRate(?float $shippingVatRate) : self { $this->shippingVatRate = $shippingVatRate; return $this; @@ -817,20 +817,20 @@ public function setShippingVatRate(float $shippingVatRate) : self /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @return float + * @return float|null */ - public function getTotalWeight() : float + public function getTotalWeight() : ?float { return $this->totalWeight; } /** * The total weight of the order in kg. This field is a calculated summary of all order items * - * @param float $totalWeight + * @param float|null $totalWeight * * @return self */ - public function setTotalWeight(float $totalWeight) : self + public function setTotalWeight(?float $totalWeight) : self { $this->totalWeight = $totalWeight; return $this; @@ -838,20 +838,20 @@ public function setTotalWeight(float $totalWeight) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo1() : string + public function getCustomInfo1() : ?string { return $this->customInfo1; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo1 + * @param string|null $customInfo1 * * @return self */ - public function setCustomInfo1(string $customInfo1) : self + public function setCustomInfo1(?string $customInfo1) : self { $this->customInfo1 = $customInfo1; return $this; @@ -859,20 +859,20 @@ public function setCustomInfo1(string $customInfo1) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo2() : string + public function getCustomInfo2() : ?string { return $this->customInfo2; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo2 + * @param string|null $customInfo2 * * @return self */ - public function setCustomInfo2(string $customInfo2) : self + public function setCustomInfo2(?string $customInfo2) : self { $this->customInfo2 = $customInfo2; return $this; @@ -880,20 +880,20 @@ public function setCustomInfo2(string $customInfo2) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo3() : string + public function getCustomInfo3() : ?string { return $this->customInfo3; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo3 + * @param string|null $customInfo3 * * @return self */ - public function setCustomInfo3(string $customInfo3) : self + public function setCustomInfo3(?string $customInfo3) : self { $this->customInfo3 = $customInfo3; return $this; @@ -901,20 +901,20 @@ public function setCustomInfo3(string $customInfo3) : self /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @return string + * @return string|null */ - public function getCustomInfo4() : string + public function getCustomInfo4() : ?string { return $this->customInfo4; } /** * Custom info saved to an order. Can be linked to fields on the checkout page for additional data collection * - * @param string $customInfo4 + * @param string|null $customInfo4 * * @return self */ - public function setCustomInfo4(string $customInfo4) : self + public function setCustomInfo4(?string $customInfo4) : self { $this->customInfo4 = $customInfo4; return $this; @@ -922,20 +922,20 @@ public function setCustomInfo4(string $customInfo4) : self /** * The code ID of a discount code that was used for this order * - * @return string + * @return string|null */ - public function getDiscountCode() : string + public function getDiscountCode() : ?string { return $this->discountCode; } /** * The code ID of a discount code that was used for this order * - * @param string $discountCode + * @param string|null $discountCode * * @return self */ - public function setDiscountCode(string $discountCode) : self + public function setDiscountCode(?string $discountCode) : self { $this->discountCode = $discountCode; return $this; @@ -943,20 +943,20 @@ public function setDiscountCode(string $discountCode) : self /** * The amount paid via the payment method for this order * - * @return float + * @return float|null */ - public function getAmountPaid() : float + public function getAmountPaid() : ?float { return $this->amountPaid; } /** * The amount paid via the payment method for this order * - * @param float $amountPaid + * @param float|null $amountPaid * * @return self */ - public function setAmountPaid(float $amountPaid) : self + public function setAmountPaid(?float $amountPaid) : self { $this->amountPaid = $amountPaid; return $this; @@ -964,20 +964,20 @@ public function setAmountPaid(float $amountPaid) : self /** * Same as amountPaid, but in the shops base currency * - * @return float + * @return float|null */ - public function getAmountPaidInBaseCurrency() : float + public function getAmountPaidInBaseCurrency() : ?float { return $this->amountPaidInBaseCurrency; } /** * Same as amountPaid, but in the shops base currency * - * @param float $amountPaidInBaseCurrency + * @param float|null $amountPaidInBaseCurrency * * @return self */ - public function setAmountPaidInBaseCurrency(float $amountPaidInBaseCurrency) : self + public function setAmountPaidInBaseCurrency(?float $amountPaidInBaseCurrency) : self { $this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency; return $this; @@ -985,20 +985,20 @@ public function setAmountPaidInBaseCurrency(float $amountPaidInBaseCurrency) : s /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @return bool + * @return bool|null */ - public function getIsComplete() : bool + public function getIsComplete() : ?bool { return $this->isComplete; } /** * Is the order completed (that is, is it completely saved and has the payment method processed and confirmed it) * - * @param bool $isComplete + * @param bool|null $isComplete * * @return self */ - public function setIsComplete(bool $isComplete) : self + public function setIsComplete(?bool $isComplete) : self { $this->isComplete = $isComplete; return $this; @@ -1006,20 +1006,20 @@ public function setIsComplete(bool $isComplete) : self /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @return string + * @return string|null */ - public function getCurrencyCode() : string + public function getCurrencyCode() : ?string { return $this->currencyCode; } /** * The currency code of the currency that was used for this order. Has to be a valid ISO 4217 currency code * - * @param string $currencyCode + * @param string|null $currencyCode * * @return self */ - public function setCurrencyCode(string $currencyCode) : self + public function setCurrencyCode(?string $currencyCode) : self { $this->currencyCode = $currencyCode; return $this; @@ -1027,20 +1027,20 @@ public function setCurrencyCode(string $currencyCode) : self /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @return float + * @return float|null */ - public function getCurrencyExchangeRate() : float + public function getCurrencyExchangeRate() : ?float { return $this->currencyExchangeRate; } /** * The exchange rate between this orders currency and the shops base currency. Ff, for example, the shop base currency is SEK and this order was placed in NOK, where 1 SEK = 0.97 NOK - this value would be 0.97 * - * @param float $currencyExchangeRate + * @param float|null $currencyExchangeRate * * @return self */ - public function setCurrencyExchangeRate(float $currencyExchangeRate) : self + public function setCurrencyExchangeRate(?float $currencyExchangeRate) : self { $this->currencyExchangeRate = $currencyExchangeRate; return $this; @@ -1048,20 +1048,20 @@ public function setCurrencyExchangeRate(float $currencyExchangeRate) : self /** * The number of decimals to display * - * @return int + * @return int|null */ - public function getCurrencyPrecision() : int + public function getCurrencyPrecision() : ?int { return $this->currencyPrecision; } /** * The number of decimals to display * - * @param int $currencyPrecision + * @param int|null $currencyPrecision * * @return self */ - public function setCurrencyPrecision(int $currencyPrecision) : self + public function setCurrencyPrecision(?int $currencyPrecision) : self { $this->currencyPrecision = $currencyPrecision; return $this; @@ -1069,20 +1069,20 @@ public function setCurrencyPrecision(int $currencyPrecision) : self /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) used for placing this order. Has to be a valid lang code that the shop has setup. Used for order update emails, etc. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -1090,20 +1090,20 @@ public function setLangCode(string $langCode) : self /** * Reference to the payment methods payment transaction * - * @return string + * @return string|null */ - public function getPaymentReference() : string + public function getPaymentReference() : ?string { return $this->paymentReference; } /** * Reference to the payment methods payment transaction * - * @param string $paymentReference + * @param string|null $paymentReference * * @return self */ - public function setPaymentReference(string $paymentReference) : self + public function setPaymentReference(?string $paymentReference) : self { $this->paymentReference = $paymentReference; return $this; @@ -1111,20 +1111,20 @@ public function setPaymentReference(string $paymentReference) : self /** * Status of the payment methods payment transaction * - * @return string + * @return string|null */ - public function getPaymentStatus() : string + public function getPaymentStatus() : ?string { return $this->paymentStatus; } /** * Status of the payment methods payment transaction * - * @param string $paymentStatus + * @param string|null $paymentStatus * * @return self */ - public function setPaymentStatus(string $paymentStatus) : self + public function setPaymentStatus(?string $paymentStatus) : self { $this->paymentStatus = $paymentStatus; return $this; @@ -1132,20 +1132,20 @@ public function setPaymentStatus(string $paymentStatus) : self /** * An order is read when an administrator has read it via the admin GUI * - * @return bool + * @return bool|null */ - public function getIsRead() : bool + public function getIsRead() : ?bool { return $this->isRead; } /** * An order is read when an administrator has read it via the admin GUI * - * @param bool $isRead + * @param bool|null $isRead * * @return self */ - public function setIsRead(bool $isRead) : self + public function setIsRead(?bool $isRead) : self { $this->isRead = $isRead; return $this; @@ -1153,20 +1153,20 @@ public function setIsRead(bool $isRead) : self /** * Whether the customer or an admin has added a comment to the order * - * @return bool + * @return bool|null */ - public function getHasComment() : bool + public function getHasComment() : ?bool { return $this->hasComment; } /** * Whether the customer or an admin has added a comment to the order * - * @param bool $hasComment + * @param bool|null $hasComment * * @return self */ - public function setHasComment(bool $hasComment) : self + public function setHasComment(?bool $hasComment) : self { $this->hasComment = $hasComment; return $this; @@ -1174,20 +1174,20 @@ public function setHasComment(bool $hasComment) : self /** * An internal comment placed by an administrator. Not available to the customer * - * @return string + * @return string|null */ - public function getInternalComment() : string + public function getInternalComment() : ?string { return $this->internalComment; } /** * An internal comment placed by an administrator. Not available to the customer * - * @param string $internalComment + * @param string|null $internalComment * * @return self */ - public function setInternalComment(string $internalComment) : self + public function setInternalComment(?string $internalComment) : self { $this->internalComment = $internalComment; return $this; @@ -1195,20 +1195,20 @@ public function setInternalComment(string $internalComment) : self /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @return int + * @return int|null */ - public function getShippingTrackerType() : int + public function getShippingTrackerType() : ?int { return $this->shippingTrackerType; } /** * The ID of the tracking number type. Types are available via: GET /shipping-tracker-types * - * @param int $shippingTrackerType + * @param int|null $shippingTrackerType * * @return self */ - public function setShippingTrackerType(int $shippingTrackerType) : self + public function setShippingTrackerType(?int $shippingTrackerType) : self { $this->shippingTrackerType = $shippingTrackerType; return $this; @@ -1216,20 +1216,20 @@ public function setShippingTrackerType(int $shippingTrackerType) : self /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @return string + * @return string|null */ - public function getShippingTrackingNo() : string + public function getShippingTrackingNo() : ?string { return $this->shippingTrackingNo; } /** * The shipping tracking number. Has to be in the format that is used for the chosen tracking type (please contact the freight forwarder regarding this). * - * @param string $shippingTrackingNo + * @param string|null $shippingTrackingNo * * @return self */ - public function setShippingTrackingNo(string $shippingTrackingNo) : self + public function setShippingTrackingNo(?string $shippingTrackingNo) : self { $this->shippingTrackingNo = $shippingTrackingNo; return $this; @@ -1237,20 +1237,20 @@ public function setShippingTrackingNo(string $shippingTrackingNo) : self /** * The email address of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerEmail() : string + public function getOriginalCustomerEmail() : ?string { return $this->originalCustomerEmail; } /** * The email address of the customer at the point of order creation * - * @param string $originalCustomerEmail + * @param string|null $originalCustomerEmail * * @return self */ - public function setOriginalCustomerEmail(string $originalCustomerEmail) : self + public function setOriginalCustomerEmail(?string $originalCustomerEmail) : self { $this->originalCustomerEmail = $originalCustomerEmail; return $this; @@ -1258,20 +1258,20 @@ public function setOriginalCustomerEmail(string $originalCustomerEmail) : self /** * The national id number of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerNationalIdNo() : string + public function getOriginalCustomerNationalIdNo() : ?string { return $this->originalCustomerNationalIdNo; } /** * The national id number of the customer at the point of order creation * - * @param string $originalCustomerNationalIdNo + * @param string|null $originalCustomerNationalIdNo * * @return self */ - public function setOriginalCustomerNationalIdNo(string $originalCustomerNationalIdNo) : self + public function setOriginalCustomerNationalIdNo(?string $originalCustomerNationalIdNo) : self { $this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo; return $this; @@ -1279,20 +1279,20 @@ public function setOriginalCustomerNationalIdNo(string $originalCustomerNational /** * The VAT number of the customer at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerVatNo() : string + public function getOriginalCustomerVatNo() : ?string { return $this->originalCustomerVatNo; } /** * The VAT number of the customer at the point of order creation * - * @param string $originalCustomerVatNo + * @param string|null $originalCustomerVatNo * * @return self */ - public function setOriginalCustomerVatNo(string $originalCustomerVatNo) : self + public function setOriginalCustomerVatNo(?string $originalCustomerVatNo) : self { $this->originalCustomerVatNo = $originalCustomerVatNo; return $this; @@ -1300,20 +1300,20 @@ public function setOriginalCustomerVatNo(string $originalCustomerVatNo) : self /** * Custom customer info at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerCustomInfo1() : string + public function getOriginalCustomerCustomInfo1() : ?string { return $this->originalCustomerCustomInfo1; } /** * Custom customer info at the point of order creation * - * @param string $originalCustomerCustomInfo1 + * @param string|null $originalCustomerCustomInfo1 * * @return self */ - public function setOriginalCustomerCustomInfo1(string $originalCustomerCustomInfo1) : self + public function setOriginalCustomerCustomInfo1(?string $originalCustomerCustomInfo1) : self { $this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1; return $this; @@ -1321,20 +1321,20 @@ public function setOriginalCustomerCustomInfo1(string $originalCustomerCustomInf /** * Custom customer info at the point of order creation * - * @return string + * @return string|null */ - public function getOriginalCustomerCustomInfo2() : string + public function getOriginalCustomerCustomInfo2() : ?string { return $this->originalCustomerCustomInfo2; } /** * Custom customer info at the point of order creation * - * @param string $originalCustomerCustomInfo2 + * @param string|null $originalCustomerCustomInfo2 * * @return self */ - public function setOriginalCustomerCustomInfo2(string $originalCustomerCustomInfo2) : self + public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomInfo2) : self { $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; @@ -1342,20 +1342,20 @@ public function setOriginalCustomerCustomInfo2(string $originalCustomerCustomInf /** * A collection of order items * - * @return OrderItemModel[] + * @return OrderItemModel[]|null */ - public function getItems() : array + public function getItems() : ?array { return $this->items; } /** * A collection of order items * - * @param OrderItemModel[] $items + * @param OrderItemModel[]|null $items * * @return self */ - public function setItems(array $items) : self + public function setItems(?array $items) : self { $this->items = $items; return $this; @@ -1363,20 +1363,20 @@ public function setItems(array $items) : self /** * * - * @return OrderAddressModel + * @return OrderAddressModel|null */ - public function getAddresses() : OrderAddressModel + public function getAddresses() : ?OrderAddressModel { return $this->addresses; } /** * * - * @param OrderAddressModel $addresses + * @param OrderAddressModel|null $addresses * * @return self */ - public function setAddresses(OrderAddressModel $addresses) : self + public function setAddresses(?OrderAddressModel $addresses) : self { $this->addresses = $addresses; return $this; diff --git a/src/Api/Generated/Model/PaginationModel.php b/src/Api/Generated/Model/PaginationModel.php index e05867e2..87b68c2a 100644 --- a/src/Api/Generated/Model/PaginationModel.php +++ b/src/Api/Generated/Model/PaginationModel.php @@ -7,50 +7,50 @@ class PaginationModel /** * The current requested page * - * @var int + * @var int|null */ protected $currentPage; /** * Number of items per page * - * @var int + * @var int|null */ protected $perPage; /** * The total number of items * - * @var int + * @var int|null */ protected $total; /** * Number of items on this page * - * @var int + * @var int|null */ protected $count; /** * Number of items on this page * - * @var int + * @var int|null */ protected $totalPages; /** * The current requested page * - * @return int + * @return int|null */ - public function getCurrentPage() : int + public function getCurrentPage() : ?int { return $this->currentPage; } /** * The current requested page * - * @param int $currentPage + * @param int|null $currentPage * * @return self */ - public function setCurrentPage(int $currentPage) : self + public function setCurrentPage(?int $currentPage) : self { $this->currentPage = $currentPage; return $this; @@ -58,20 +58,20 @@ public function setCurrentPage(int $currentPage) : self /** * Number of items per page * - * @return int + * @return int|null */ - public function getPerPage() : int + public function getPerPage() : ?int { return $this->perPage; } /** * Number of items per page * - * @param int $perPage + * @param int|null $perPage * * @return self */ - public function setPerPage(int $perPage) : self + public function setPerPage(?int $perPage) : self { $this->perPage = $perPage; return $this; @@ -79,20 +79,20 @@ public function setPerPage(int $perPage) : self /** * The total number of items * - * @return int + * @return int|null */ - public function getTotal() : int + public function getTotal() : ?int { return $this->total; } /** * The total number of items * - * @param int $total + * @param int|null $total * * @return self */ - public function setTotal(int $total) : self + public function setTotal(?int $total) : self { $this->total = $total; return $this; @@ -100,20 +100,20 @@ public function setTotal(int $total) : self /** * Number of items on this page * - * @return int + * @return int|null */ - public function getCount() : int + public function getCount() : ?int { return $this->count; } /** * Number of items on this page * - * @param int $count + * @param int|null $count * * @return self */ - public function setCount(int $count) : self + public function setCount(?int $count) : self { $this->count = $count; return $this; @@ -121,20 +121,20 @@ public function setCount(int $count) : self /** * Number of items on this page * - * @return int + * @return int|null */ - public function getTotalPages() : int + public function getTotalPages() : ?int { return $this->totalPages; } /** * Number of items on this page * - * @param int $totalPages + * @param int|null $totalPages * * @return self */ - public function setTotalPages(int $totalPages) : self + public function setTotalPages(?int $totalPages) : self { $this->totalPages = $totalPages; return $this; diff --git a/src/Api/Generated/Model/PaymentMethodLanguageModel.php b/src/Api/Generated/Model/PaymentMethodLanguageModel.php index d1feca69..5351c545 100644 --- a/src/Api/Generated/Model/PaymentMethodLanguageModel.php +++ b/src/Api/Generated/Model/PaymentMethodLanguageModel.php @@ -7,44 +7,44 @@ class PaymentMethodLanguageModel /** * Language code * - * @var string + * @var string|null */ protected $langCode; /** * Name of payment method * - * @var string + * @var string|null */ protected $name; /** * Title of payment method * - * @var string + * @var string|null */ protected $title; /** * A shorter informative description * - * @var string + * @var string|null */ protected $shortDescription; /** * Language code * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language code * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -52,20 +52,20 @@ public function setLangCode(string $langCode) : self /** * Name of payment method * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * Name of payment method * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -73,20 +73,20 @@ public function setName(string $name) : self /** * Title of payment method * - * @return string + * @return string|null */ - public function getTitle() : string + public function getTitle() : ?string { return $this->title; } /** * Title of payment method * - * @param string $title + * @param string|null $title * * @return self */ - public function setTitle(string $title) : self + public function setTitle(?string $title) : self { $this->title = $title; return $this; @@ -94,20 +94,20 @@ public function setTitle(string $title) : self /** * A shorter informative description * - * @return string + * @return string|null */ - public function getShortDescription() : string + public function getShortDescription() : ?string { return $this->shortDescription; } /** * A shorter informative description * - * @param string $shortDescription + * @param string|null $shortDescription * * @return self */ - public function setShortDescription(string $shortDescription) : self + public function setShortDescription(?string $shortDescription) : self { $this->shortDescription = $shortDescription; return $this; diff --git a/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php b/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php index ad9d7cbb..d33bdc89 100644 --- a/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php +++ b/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php @@ -7,26 +7,26 @@ class PaymentMethodLanguageModelCollection /** * A collection of payment method languages * - * @var PaymentMethodLanguageModel[] + * @var PaymentMethodLanguageModel[]|null */ protected $data; /** * A collection of payment method languages * - * @return PaymentMethodLanguageModel[] + * @return PaymentMethodLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of payment method languages * - * @param PaymentMethodLanguageModel[] $data + * @param PaymentMethodLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/PaymentMethodModel.php b/src/Api/Generated/Model/PaymentMethodModel.php index 520ad50a..fa2da686 100644 --- a/src/Api/Generated/Model/PaymentMethodModel.php +++ b/src/Api/Generated/Model/PaymentMethodModel.php @@ -7,37 +7,37 @@ class PaymentMethodModel /** * The payment methods Id * - * @var int + * @var int|null */ protected $paymentMethodId; /** * The payment methods idCode. This can be used to identify a payment method of a standarized type * - * @var string + * @var string|null */ protected $idCode; /** * If the payment method is actively available on checkout or not * - * @var bool + * @var bool|null */ protected $active; /** * Fee associated with this method * - * @var float + * @var float|null */ protected $fee; /** * The restrictions to countries this payment method is valid for. Valid values are: all, EU, non-EU, selected, none * - * @var string + * @var string|null */ protected $validForCountries; /** * The countries this method is valid for (if validForCountries is set to ”selected”) * - * @var string[] + * @var string[]|null */ protected $validCountriesSelected; /** @@ -67,7 +67,7 @@ class PaymentMethodModel /** * The shipping methods this is valid for. Valid values are: all, selected * - * @var string + * @var string|null */ protected $validForShippingMethods; /** @@ -79,32 +79,32 @@ class PaymentMethodModel /** * Tells whether this method is a "click and collect" or not * - * @var bool + * @var bool|null */ protected $isClickAndCollect; /** * * - * @var PaymentMethodLanguageModelCollection + * @var PaymentMethodLanguageModelCollection|null */ protected $languages; /** * The payment methods Id * - * @return int + * @return int|null */ - public function getPaymentMethodId() : int + public function getPaymentMethodId() : ?int { return $this->paymentMethodId; } /** * The payment methods Id * - * @param int $paymentMethodId + * @param int|null $paymentMethodId * * @return self */ - public function setPaymentMethodId(int $paymentMethodId) : self + public function setPaymentMethodId(?int $paymentMethodId) : self { $this->paymentMethodId = $paymentMethodId; return $this; @@ -112,20 +112,20 @@ public function setPaymentMethodId(int $paymentMethodId) : self /** * The payment methods idCode. This can be used to identify a payment method of a standarized type * - * @return string + * @return string|null */ - public function getIdCode() : string + public function getIdCode() : ?string { return $this->idCode; } /** * The payment methods idCode. This can be used to identify a payment method of a standarized type * - * @param string $idCode + * @param string|null $idCode * * @return self */ - public function setIdCode(string $idCode) : self + public function setIdCode(?string $idCode) : self { $this->idCode = $idCode; return $this; @@ -133,20 +133,20 @@ public function setIdCode(string $idCode) : self /** * If the payment method is actively available on checkout or not * - * @return bool + * @return bool|null */ - public function getActive() : bool + public function getActive() : ?bool { return $this->active; } /** * If the payment method is actively available on checkout or not * - * @param bool $active + * @param bool|null $active * * @return self */ - public function setActive(bool $active) : self + public function setActive(?bool $active) : self { $this->active = $active; return $this; @@ -154,20 +154,20 @@ public function setActive(bool $active) : self /** * Fee associated with this method * - * @return float + * @return float|null */ - public function getFee() : float + public function getFee() : ?float { return $this->fee; } /** * Fee associated with this method * - * @param float $fee + * @param float|null $fee * * @return self */ - public function setFee(float $fee) : self + public function setFee(?float $fee) : self { $this->fee = $fee; return $this; @@ -175,20 +175,20 @@ public function setFee(float $fee) : self /** * The restrictions to countries this payment method is valid for. Valid values are: all, EU, non-EU, selected, none * - * @return string + * @return string|null */ - public function getValidForCountries() : string + public function getValidForCountries() : ?string { return $this->validForCountries; } /** * The restrictions to countries this payment method is valid for. Valid values are: all, EU, non-EU, selected, none * - * @param string $validForCountries + * @param string|null $validForCountries * * @return self */ - public function setValidForCountries(string $validForCountries) : self + public function setValidForCountries(?string $validForCountries) : self { $this->validForCountries = $validForCountries; return $this; @@ -196,20 +196,20 @@ public function setValidForCountries(string $validForCountries) : self /** * The countries this method is valid for (if validForCountries is set to ”selected”) * - * @return string[] + * @return string[]|null */ - public function getValidCountriesSelected() : array + public function getValidCountriesSelected() : ?array { return $this->validCountriesSelected; } /** * The countries this method is valid for (if validForCountries is set to ”selected”) * - * @param string[] $validCountriesSelected + * @param string[]|null $validCountriesSelected * * @return self */ - public function setValidCountriesSelected(array $validCountriesSelected) : self + public function setValidCountriesSelected(?array $validCountriesSelected) : self { $this->validCountriesSelected = $validCountriesSelected; return $this; @@ -301,20 +301,20 @@ public function setValidForMaxWeight(?float $validForMaxWeight) : self /** * The shipping methods this is valid for. Valid values are: all, selected * - * @return string + * @return string|null */ - public function getValidForShippingMethods() : string + public function getValidForShippingMethods() : ?string { return $this->validForShippingMethods; } /** * The shipping methods this is valid for. Valid values are: all, selected * - * @param string $validForShippingMethods + * @param string|null $validForShippingMethods * * @return self */ - public function setValidForShippingMethods(string $validForShippingMethods) : self + public function setValidForShippingMethods(?string $validForShippingMethods) : self { $this->validForShippingMethods = $validForShippingMethods; return $this; @@ -343,20 +343,20 @@ public function setValidForCustomerType(?string $validForCustomerType) : self /** * Tells whether this method is a "click and collect" or not * - * @return bool + * @return bool|null */ - public function getIsClickAndCollect() : bool + public function getIsClickAndCollect() : ?bool { return $this->isClickAndCollect; } /** * Tells whether this method is a "click and collect" or not * - * @param bool $isClickAndCollect + * @param bool|null $isClickAndCollect * * @return self */ - public function setIsClickAndCollect(bool $isClickAndCollect) : self + public function setIsClickAndCollect(?bool $isClickAndCollect) : self { $this->isClickAndCollect = $isClickAndCollect; return $this; @@ -364,20 +364,20 @@ public function setIsClickAndCollect(bool $isClickAndCollect) : self /** * * - * @return PaymentMethodLanguageModelCollection + * @return PaymentMethodLanguageModelCollection|null */ - public function getLanguages() : PaymentMethodLanguageModelCollection + public function getLanguages() : ?PaymentMethodLanguageModelCollection { return $this->languages; } /** * * - * @param PaymentMethodLanguageModelCollection $languages + * @param PaymentMethodLanguageModelCollection|null $languages * * @return self */ - public function setLanguages(PaymentMethodLanguageModelCollection $languages) : self + public function setLanguages(?PaymentMethodLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/PaymentMethodModelCollection.php b/src/Api/Generated/Model/PaymentMethodModelCollection.php index 626956b4..f2f3f878 100644 --- a/src/Api/Generated/Model/PaymentMethodModelCollection.php +++ b/src/Api/Generated/Model/PaymentMethodModelCollection.php @@ -7,26 +7,26 @@ class PaymentMethodModelCollection /** * A collection of payment methods * - * @var PaymentMethodModel[] + * @var PaymentMethodModel[]|null */ protected $data; /** * A collection of payment methods * - * @return PaymentMethodModel[] + * @return PaymentMethodModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of payment methods * - * @param PaymentMethodModel[] $data + * @param PaymentMethodModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/PaymentMethodModelItem.php b/src/Api/Generated/Model/PaymentMethodModelItem.php index 7c5d177a..01c284b0 100644 --- a/src/Api/Generated/Model/PaymentMethodModelItem.php +++ b/src/Api/Generated/Model/PaymentMethodModelItem.php @@ -7,26 +7,26 @@ class PaymentMethodModelItem /** * * - * @var PaymentMethodModel + * @var PaymentMethodModel|null */ protected $data; /** * * - * @return PaymentMethodModel + * @return PaymentMethodModel|null */ - public function getData() : PaymentMethodModel + public function getData() : ?PaymentMethodModel { return $this->data; } /** * * - * @param PaymentMethodModel $data + * @param PaymentMethodModel|null $data * * @return self */ - public function setData(PaymentMethodModel $data) : self + public function setData(?PaymentMethodModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/PricelistModel.php b/src/Api/Generated/Model/PricelistModel.php index 234f971f..59d1b66e 100644 --- a/src/Api/Generated/Model/PricelistModel.php +++ b/src/Api/Generated/Model/PricelistModel.php @@ -7,7 +7,7 @@ class PricelistModel /** * The pricelist id * - * @var int + * @var int|null */ protected $pricelistId; /** @@ -25,37 +25,37 @@ class PricelistModel /** * The name of this pricelist * - * @var string + * @var string|null */ protected $name; /** * If this pricelist is the default ”master” pricelist or not. Only one pricelist can be the master pricelist * - * @var bool + * @var bool|null */ protected $isMaster; /** * Shows if the pricelist is activated or not. * - * @var bool + * @var bool|null */ protected $isActive = false; /** * The region this pricelist is valid for * - * @var string + * @var string|null */ protected $region; /** * The countryCodes this pricelist is valid for. These will be set only if the `region` property is set to the value `selected` for specific countries. * - * @var string[] + * @var string[]|null */ protected $countryCodes; /** * The currencyCode this pricelist is valid for * - * @var string + * @var string|null */ protected $currencyCode; /** @@ -67,32 +67,32 @@ class PricelistModel /** * Is this pricelist a ”customer” pricelist (for selected customer groups) * - * @var bool + * @var bool|null */ protected $isCustomerPricelist; /** * Is this pricelist a ”country” pricelist (base pricelist for a certain country) * - * @var bool + * @var bool|null */ protected $isCountryPricelist; /** * The pricelist id * - * @return int + * @return int|null */ - public function getPricelistId() : int + public function getPricelistId() : ?int { return $this->pricelistId; } /** * The pricelist id * - * @param int $pricelistId + * @param int|null $pricelistId * * @return self */ - public function setPricelistId(int $pricelistId) : self + public function setPricelistId(?int $pricelistId) : self { $this->pricelistId = $pricelistId; return $this; @@ -142,20 +142,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The name of this pricelist * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this pricelist * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -163,20 +163,20 @@ public function setName(string $name) : self /** * If this pricelist is the default ”master” pricelist or not. Only one pricelist can be the master pricelist * - * @return bool + * @return bool|null */ - public function getIsMaster() : bool + public function getIsMaster() : ?bool { return $this->isMaster; } /** * If this pricelist is the default ”master” pricelist or not. Only one pricelist can be the master pricelist * - * @param bool $isMaster + * @param bool|null $isMaster * * @return self */ - public function setIsMaster(bool $isMaster) : self + public function setIsMaster(?bool $isMaster) : self { $this->isMaster = $isMaster; return $this; @@ -184,20 +184,20 @@ public function setIsMaster(bool $isMaster) : self /** * Shows if the pricelist is activated or not. * - * @return bool + * @return bool|null */ - public function getIsActive() : bool + public function getIsActive() : ?bool { return $this->isActive; } /** * Shows if the pricelist is activated or not. * - * @param bool $isActive + * @param bool|null $isActive * * @return self */ - public function setIsActive(bool $isActive) : self + public function setIsActive(?bool $isActive) : self { $this->isActive = $isActive; return $this; @@ -205,20 +205,20 @@ public function setIsActive(bool $isActive) : self /** * The region this pricelist is valid for * - * @return string + * @return string|null */ - public function getRegion() : string + public function getRegion() : ?string { return $this->region; } /** * The region this pricelist is valid for * - * @param string $region + * @param string|null $region * * @return self */ - public function setRegion(string $region) : self + public function setRegion(?string $region) : self { $this->region = $region; return $this; @@ -226,20 +226,20 @@ public function setRegion(string $region) : self /** * The countryCodes this pricelist is valid for. These will be set only if the `region` property is set to the value `selected` for specific countries. * - * @return string[] + * @return string[]|null */ - public function getCountryCodes() : array + public function getCountryCodes() : ?array { return $this->countryCodes; } /** * The countryCodes this pricelist is valid for. These will be set only if the `region` property is set to the value `selected` for specific countries. * - * @param string[] $countryCodes + * @param string[]|null $countryCodes * * @return self */ - public function setCountryCodes(array $countryCodes) : self + public function setCountryCodes(?array $countryCodes) : self { $this->countryCodes = $countryCodes; return $this; @@ -247,20 +247,20 @@ public function setCountryCodes(array $countryCodes) : self /** * The currencyCode this pricelist is valid for * - * @return string + * @return string|null */ - public function getCurrencyCode() : string + public function getCurrencyCode() : ?string { return $this->currencyCode; } /** * The currencyCode this pricelist is valid for * - * @param string $currencyCode + * @param string|null $currencyCode * * @return self */ - public function setCurrencyCode(string $currencyCode) : self + public function setCurrencyCode(?string $currencyCode) : self { $this->currencyCode = $currencyCode; return $this; @@ -289,20 +289,20 @@ public function setParentPricelistId(?int $parentPricelistId) : self /** * Is this pricelist a ”customer” pricelist (for selected customer groups) * - * @return bool + * @return bool|null */ - public function getIsCustomerPricelist() : bool + public function getIsCustomerPricelist() : ?bool { return $this->isCustomerPricelist; } /** * Is this pricelist a ”customer” pricelist (for selected customer groups) * - * @param bool $isCustomerPricelist + * @param bool|null $isCustomerPricelist * * @return self */ - public function setIsCustomerPricelist(bool $isCustomerPricelist) : self + public function setIsCustomerPricelist(?bool $isCustomerPricelist) : self { $this->isCustomerPricelist = $isCustomerPricelist; return $this; @@ -310,20 +310,20 @@ public function setIsCustomerPricelist(bool $isCustomerPricelist) : self /** * Is this pricelist a ”country” pricelist (base pricelist for a certain country) * - * @return bool + * @return bool|null */ - public function getIsCountryPricelist() : bool + public function getIsCountryPricelist() : ?bool { return $this->isCountryPricelist; } /** * Is this pricelist a ”country” pricelist (base pricelist for a certain country) * - * @param bool $isCountryPricelist + * @param bool|null $isCountryPricelist * * @return self */ - public function setIsCountryPricelist(bool $isCountryPricelist) : self + public function setIsCountryPricelist(?bool $isCountryPricelist) : self { $this->isCountryPricelist = $isCountryPricelist; return $this; diff --git a/src/Api/Generated/Model/PricelistModelCollection.php b/src/Api/Generated/Model/PricelistModelCollection.php index 9d3f3b4f..0705629b 100644 --- a/src/Api/Generated/Model/PricelistModelCollection.php +++ b/src/Api/Generated/Model/PricelistModelCollection.php @@ -7,26 +7,26 @@ class PricelistModelCollection /** * A collection of pricelists * - * @var PricelistModel[] + * @var PricelistModel[]|null */ protected $data; /** * A collection of pricelists * - * @return PricelistModel[] + * @return PricelistModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of pricelists * - * @param PricelistModel[] $data + * @param PricelistModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/PricelistModelItem.php b/src/Api/Generated/Model/PricelistModelItem.php index f43442d0..23008df2 100644 --- a/src/Api/Generated/Model/PricelistModelItem.php +++ b/src/Api/Generated/Model/PricelistModelItem.php @@ -7,26 +7,26 @@ class PricelistModelItem /** * * - * @var PricelistModel + * @var PricelistModel|null */ protected $data; /** * * - * @return PricelistModel + * @return PricelistModel|null */ - public function getData() : PricelistModel + public function getData() : ?PricelistModel { return $this->data; } /** * * - * @param PricelistModel $data + * @param PricelistModel|null $data * * @return self */ - public function setData(PricelistModel $data) : self + public function setData(?PricelistModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductBundleProductPriceModel.php b/src/Api/Generated/Model/ProductBundleProductPriceModel.php index 702e0f7f..ade874c3 100644 --- a/src/Api/Generated/Model/ProductBundleProductPriceModel.php +++ b/src/Api/Generated/Model/ProductBundleProductPriceModel.php @@ -7,7 +7,7 @@ class ProductBundleProductPriceModel /** * The pricelist this price is for * - * @var int + * @var int|null */ protected $pricelistId; /** @@ -19,20 +19,20 @@ class ProductBundleProductPriceModel /** * The pricelist this price is for * - * @return int + * @return int|null */ - public function getPricelistId() : int + public function getPricelistId() : ?int { return $this->pricelistId; } /** * The pricelist this price is for * - * @param int $pricelistId + * @param int|null $pricelistId * * @return self */ - public function setPricelistId(int $pricelistId) : self + public function setPricelistId(?int $pricelistId) : self { $this->pricelistId = $pricelistId; return $this; diff --git a/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php b/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php index 42b43042..bfc50464 100644 --- a/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php +++ b/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php @@ -7,26 +7,26 @@ class ProductBundleProductPriceModelCollection /** * A collection of bundled product prices * - * @var ProductBundleProductPriceModel[] + * @var ProductBundleProductPriceModel[]|null */ protected $data; /** * A collection of bundled product prices * - * @return ProductBundleProductPriceModel[] + * @return ProductBundleProductPriceModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of bundled product prices * - * @param ProductBundleProductPriceModel[] $data + * @param ProductBundleProductPriceModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php b/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php index b750399d..30a3d450 100644 --- a/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php +++ b/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php @@ -7,26 +7,26 @@ class ProductBundleProductPriceModelItem /** * * - * @var ProductBundleProductPriceModel + * @var ProductBundleProductPriceModel|null */ protected $data; /** * * - * @return ProductBundleProductPriceModel + * @return ProductBundleProductPriceModel|null */ - public function getData() : ProductBundleProductPriceModel + public function getData() : ?ProductBundleProductPriceModel { return $this->data; } /** * * - * @param ProductBundleProductPriceModel $data + * @param ProductBundleProductPriceModel|null $data * * @return self */ - public function setData(ProductBundleProductPriceModel $data) : self + public function setData(?ProductBundleProductPriceModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php index ef7dc230..70301558 100644 --- a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php +++ b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php @@ -7,13 +7,13 @@ class ProductCategoryLanguagesModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * - * @var string + * @var string|null */ protected $langCode; /** * The name of this product category (required) * - * @var string + * @var string|null */ protected $name; /** @@ -49,20 +49,20 @@ class ProductCategoryLanguagesModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -70,20 +70,20 @@ public function setLangCode(string $langCode) : self /** * The name of this product category (required) * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this product category (required) * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php b/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php index 80b90ac8..78177bea 100644 --- a/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php +++ b/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php @@ -7,26 +7,26 @@ class ProductCategoryLanguagesModelCollection /** * A collection of category languages * - * @var ProductCategoryLanguagesModel[] + * @var ProductCategoryLanguagesModel[]|null */ protected $data; /** * A collection of category languages * - * @return ProductCategoryLanguagesModel[] + * @return ProductCategoryLanguagesModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of category languages * - * @param ProductCategoryLanguagesModel[] $data + * @param ProductCategoryLanguagesModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryLinkModel.php b/src/Api/Generated/Model/ProductCategoryLinkModel.php index be305cf8..3402ab58 100644 --- a/src/Api/Generated/Model/ProductCategoryLinkModel.php +++ b/src/Api/Generated/Model/ProductCategoryLinkModel.php @@ -7,32 +7,32 @@ class ProductCategoryLinkModel /** * The category id this product should be listed in * - * @var int + * @var int|null */ protected $categoryId; /** * The sort index this product have in the category * - * @var int + * @var int|null */ protected $sortIndex; /** * The category id this product should be listed in * - * @return int + * @return int|null */ - public function getCategoryId() : int + public function getCategoryId() : ?int { return $this->categoryId; } /** * The category id this product should be listed in * - * @param int $categoryId + * @param int|null $categoryId * * @return self */ - public function setCategoryId(int $categoryId) : self + public function setCategoryId(?int $categoryId) : self { $this->categoryId = $categoryId; return $this; @@ -40,20 +40,20 @@ public function setCategoryId(int $categoryId) : self /** * The sort index this product have in the category * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index this product have in the category * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php b/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php index 39a989a3..b36a6a68 100644 --- a/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php +++ b/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php @@ -7,26 +7,26 @@ class ProductCategoryLinkModelCollection /** * A collection of product category links * - * @var ProductCategoryLinkModel[] + * @var ProductCategoryLinkModel[]|null */ protected $data; /** * A collection of product category links * - * @return ProductCategoryLinkModel[] + * @return ProductCategoryLinkModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product category links * - * @param ProductCategoryLinkModel[] $data + * @param ProductCategoryLinkModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryLinkModelItem.php b/src/Api/Generated/Model/ProductCategoryLinkModelItem.php index 8c501318..f84b48ab 100644 --- a/src/Api/Generated/Model/ProductCategoryLinkModelItem.php +++ b/src/Api/Generated/Model/ProductCategoryLinkModelItem.php @@ -7,26 +7,26 @@ class ProductCategoryLinkModelItem /** * * - * @var ProductCategoryLinkModel + * @var ProductCategoryLinkModel|null */ protected $data; /** * * - * @return ProductCategoryLinkModel + * @return ProductCategoryLinkModel|null */ - public function getData() : ProductCategoryLinkModel + public function getData() : ?ProductCategoryLinkModel { return $this->data; } /** * * - * @param ProductCategoryLinkModel $data + * @param ProductCategoryLinkModel|null $data * * @return self */ - public function setData(ProductCategoryLinkModel $data) : self + public function setData(?ProductCategoryLinkModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModel.php b/src/Api/Generated/Model/ProductCategoryModel.php index 60daa918..598a945e 100644 --- a/src/Api/Generated/Model/ProductCategoryModel.php +++ b/src/Api/Generated/Model/ProductCategoryModel.php @@ -7,7 +7,7 @@ class ProductCategoryModel /** * The product category Id * - * @var int + * @var int|null */ protected $categoryId; /** @@ -19,19 +19,19 @@ class ProductCategoryModel /** * The category`s visibility settings. Possible values are: visible, hidden and pricelists. Pricelists means that the category is only visible for customers with access to specific pricelists * - * @var string + * @var string|null */ protected $visibility; /** * Sort index. A category with a lower value is displayed higher up in lists * - * @var int + * @var int|null */ protected $sortIndex; /** * Whether or not links to the category should open a category page listing its products and sub categories on click. * - * @var bool + * @var bool|null */ protected $openPage; /** @@ -63,32 +63,32 @@ class ProductCategoryModel /** * Whether or not the category has any children categories * - * @var bool + * @var bool|null */ protected $hasChildren; /** * * - * @var ProductCategoryLanguagesModelCollection + * @var ProductCategoryLanguagesModelCollection|null */ protected $languages; /** * The product category Id * - * @return int + * @return int|null */ - public function getCategoryId() : int + public function getCategoryId() : ?int { return $this->categoryId; } /** * The product category Id * - * @param int $categoryId + * @param int|null $categoryId * * @return self */ - public function setCategoryId(int $categoryId) : self + public function setCategoryId(?int $categoryId) : self { $this->categoryId = $categoryId; return $this; @@ -117,20 +117,20 @@ public function setParentId(?int $parentId) : self /** * The category`s visibility settings. Possible values are: visible, hidden and pricelists. Pricelists means that the category is only visible for customers with access to specific pricelists * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The category`s visibility settings. Possible values are: visible, hidden and pricelists. Pricelists means that the category is only visible for customers with access to specific pricelists * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -138,20 +138,20 @@ public function setVisibility(string $visibility) : self /** * Sort index. A category with a lower value is displayed higher up in lists * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index. A category with a lower value is displayed higher up in lists * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -159,20 +159,20 @@ public function setSortIndex(int $sortIndex) : self /** * Whether or not links to the category should open a category page listing its products and sub categories on click. * - * @return bool + * @return bool|null */ - public function getOpenPage() : bool + public function getOpenPage() : ?bool { return $this->openPage; } /** * Whether or not links to the category should open a category page listing its products and sub categories on click. * - * @param bool $openPage + * @param bool|null $openPage * * @return self */ - public function setOpenPage(bool $openPage) : self + public function setOpenPage(?bool $openPage) : self { $this->openPage = $openPage; return $this; @@ -268,20 +268,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * Whether or not the category has any children categories * - * @return bool + * @return bool|null */ - public function getHasChildren() : bool + public function getHasChildren() : ?bool { return $this->hasChildren; } /** * Whether or not the category has any children categories * - * @param bool $hasChildren + * @param bool|null $hasChildren * * @return self */ - public function setHasChildren(bool $hasChildren) : self + public function setHasChildren(?bool $hasChildren) : self { $this->hasChildren = $hasChildren; return $this; @@ -289,20 +289,20 @@ public function setHasChildren(bool $hasChildren) : self /** * * - * @return ProductCategoryLanguagesModelCollection + * @return ProductCategoryLanguagesModelCollection|null */ - public function getLanguages() : ProductCategoryLanguagesModelCollection + public function getLanguages() : ?ProductCategoryLanguagesModelCollection { return $this->languages; } /** * * - * @param ProductCategoryLanguagesModelCollection $languages + * @param ProductCategoryLanguagesModelCollection|null $languages * * @return self */ - public function setLanguages(ProductCategoryLanguagesModelCollection $languages) : self + public function setLanguages(?ProductCategoryLanguagesModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModelCollection.php b/src/Api/Generated/Model/ProductCategoryModelCollection.php index 986abc70..c36c6de9 100644 --- a/src/Api/Generated/Model/ProductCategoryModelCollection.php +++ b/src/Api/Generated/Model/ProductCategoryModelCollection.php @@ -7,32 +7,32 @@ class ProductCategoryModelCollection /** * A list of product categories * - * @var ProductCategoryModel[] + * @var ProductCategoryModel[]|null */ protected $data; /** * * - * @var ProductCategoryModelCollectionMeta + * @var ProductCategoryModelCollectionMeta|null */ protected $meta; /** * A list of product categories * - * @return ProductCategoryModel[] + * @return ProductCategoryModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of product categories * - * @param ProductCategoryModel[] $data + * @param ProductCategoryModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; @@ -40,20 +40,20 @@ public function setData(array $data) : self /** * * - * @return ProductCategoryModelCollectionMeta + * @return ProductCategoryModelCollectionMeta|null */ - public function getMeta() : ProductCategoryModelCollectionMeta + public function getMeta() : ?ProductCategoryModelCollectionMeta { return $this->meta; } /** * * - * @param ProductCategoryModelCollectionMeta $meta + * @param ProductCategoryModelCollectionMeta|null $meta * * @return self */ - public function setMeta(ProductCategoryModelCollectionMeta $meta) : self + public function setMeta(?ProductCategoryModelCollectionMeta $meta) : self { $this->meta = $meta; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php b/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php index e6c5afa7..77f68f4e 100644 --- a/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php +++ b/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php @@ -7,26 +7,26 @@ class ProductCategoryModelCollectionMeta /** * * - * @var PaginationModel + * @var PaginationModel|null */ protected $pagination; /** * * - * @return PaginationModel + * @return PaginationModel|null */ - public function getPagination() : PaginationModel + public function getPagination() : ?PaginationModel { return $this->pagination; } /** * * - * @param PaginationModel $pagination + * @param PaginationModel|null $pagination * * @return self */ - public function setPagination(PaginationModel $pagination) : self + public function setPagination(?PaginationModel $pagination) : self { $this->pagination = $pagination; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModelItem.php b/src/Api/Generated/Model/ProductCategoryModelItem.php index d1b86411..cb32c111 100644 --- a/src/Api/Generated/Model/ProductCategoryModelItem.php +++ b/src/Api/Generated/Model/ProductCategoryModelItem.php @@ -7,26 +7,26 @@ class ProductCategoryModelItem /** * * - * @var ProductCategoryModel + * @var ProductCategoryModel|null */ protected $data; /** * * - * @return ProductCategoryModel + * @return ProductCategoryModel|null */ - public function getData() : ProductCategoryModel + public function getData() : ?ProductCategoryModel { return $this->data; } /** * * - * @param ProductCategoryModel $data + * @param ProductCategoryModel|null $data * * @return self */ - public function setData(ProductCategoryModel $data) : self + public function setData(?ProductCategoryModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php index 5314d9ce..c98b329d 100644 --- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php +++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php @@ -7,7 +7,7 @@ class ProductCategoryModelUpdatable /** * The product category Id * - * @var int + * @var int|null */ protected $categoryId; /** @@ -19,19 +19,19 @@ class ProductCategoryModelUpdatable /** * The category`s visibility settings. Possible values are: visible, hidden and pricelists. Pricelists means that the category is only visible for customers with access to specific pricelists * - * @var string + * @var string|null */ protected $visibility; /** * Sort index. A category with a lower value is displayed higher up in lists * - * @var int + * @var int|null */ protected $sortIndex; /** * Whether or not links to the category should open a category page listing its products and sub categories on click. * - * @var bool + * @var bool|null */ protected $openPage; /** @@ -63,32 +63,32 @@ class ProductCategoryModelUpdatable /** * Whether or not the category has any children categories * - * @var bool + * @var bool|null */ protected $hasChildren; /** * * - * @var ProductCategoryLanguagesModel[] + * @var ProductCategoryLanguagesModel[]|null */ protected $languages; /** * The product category Id * - * @return int + * @return int|null */ - public function getCategoryId() : int + public function getCategoryId() : ?int { return $this->categoryId; } /** * The product category Id * - * @param int $categoryId + * @param int|null $categoryId * * @return self */ - public function setCategoryId(int $categoryId) : self + public function setCategoryId(?int $categoryId) : self { $this->categoryId = $categoryId; return $this; @@ -117,20 +117,20 @@ public function setParentId(?int $parentId) : self /** * The category`s visibility settings. Possible values are: visible, hidden and pricelists. Pricelists means that the category is only visible for customers with access to specific pricelists * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The category`s visibility settings. Possible values are: visible, hidden and pricelists. Pricelists means that the category is only visible for customers with access to specific pricelists * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -138,20 +138,20 @@ public function setVisibility(string $visibility) : self /** * Sort index. A category with a lower value is displayed higher up in lists * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index. A category with a lower value is displayed higher up in lists * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -159,20 +159,20 @@ public function setSortIndex(int $sortIndex) : self /** * Whether or not links to the category should open a category page listing its products and sub categories on click. * - * @return bool + * @return bool|null */ - public function getOpenPage() : bool + public function getOpenPage() : ?bool { return $this->openPage; } /** * Whether or not links to the category should open a category page listing its products and sub categories on click. * - * @param bool $openPage + * @param bool|null $openPage * * @return self */ - public function setOpenPage(bool $openPage) : self + public function setOpenPage(?bool $openPage) : self { $this->openPage = $openPage; return $this; @@ -268,20 +268,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * Whether or not the category has any children categories * - * @return bool + * @return bool|null */ - public function getHasChildren() : bool + public function getHasChildren() : ?bool { return $this->hasChildren; } /** * Whether or not the category has any children categories * - * @param bool $hasChildren + * @param bool|null $hasChildren * * @return self */ - public function setHasChildren(bool $hasChildren) : self + public function setHasChildren(?bool $hasChildren) : self { $this->hasChildren = $hasChildren; return $this; @@ -289,20 +289,20 @@ public function setHasChildren(bool $hasChildren) : self /** * * - * @return ProductCategoryLanguagesModel[] + * @return ProductCategoryLanguagesModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductCategoryLanguagesModel[] $languages + * @param ProductCategoryLanguagesModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductLanguageModel.php b/src/Api/Generated/Model/ProductLanguageModel.php index 6fb15cc2..09caffbb 100644 --- a/src/Api/Generated/Model/ProductLanguageModel.php +++ b/src/Api/Generated/Model/ProductLanguageModel.php @@ -7,62 +7,62 @@ class ProductLanguageModel /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @var string + * @var string|null */ protected $langCode; /** * The products name * - * @var string + * @var string|null */ protected $name; /** * The products short description * - * @var string + * @var string|null */ protected $shortDescription; /** * The products long description * - * @var string + * @var string|null */ protected $longDescription; /** * The permalink for this product and language * - * @var string + * @var string|null */ protected $permalink; /** * The page title for this product * - * @var string + * @var string|null */ protected $pageTitle; /** * The meta description for this product * - * @var string + * @var string|null */ protected $pageMetaDescription; /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -70,20 +70,20 @@ public function setLangCode(string $langCode) : self /** * The products name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The products name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -91,20 +91,20 @@ public function setName(string $name) : self /** * The products short description * - * @return string + * @return string|null */ - public function getShortDescription() : string + public function getShortDescription() : ?string { return $this->shortDescription; } /** * The products short description * - * @param string $shortDescription + * @param string|null $shortDescription * * @return self */ - public function setShortDescription(string $shortDescription) : self + public function setShortDescription(?string $shortDescription) : self { $this->shortDescription = $shortDescription; return $this; @@ -112,20 +112,20 @@ public function setShortDescription(string $shortDescription) : self /** * The products long description * - * @return string + * @return string|null */ - public function getLongDescription() : string + public function getLongDescription() : ?string { return $this->longDescription; } /** * The products long description * - * @param string $longDescription + * @param string|null $longDescription * * @return self */ - public function setLongDescription(string $longDescription) : self + public function setLongDescription(?string $longDescription) : self { $this->longDescription = $longDescription; return $this; @@ -133,20 +133,20 @@ public function setLongDescription(string $longDescription) : self /** * The permalink for this product and language * - * @return string + * @return string|null */ - public function getPermalink() : string + public function getPermalink() : ?string { return $this->permalink; } /** * The permalink for this product and language * - * @param string $permalink + * @param string|null $permalink * * @return self */ - public function setPermalink(string $permalink) : self + public function setPermalink(?string $permalink) : self { $this->permalink = $permalink; return $this; @@ -154,20 +154,20 @@ public function setPermalink(string $permalink) : self /** * The page title for this product * - * @return string + * @return string|null */ - public function getPageTitle() : string + public function getPageTitle() : ?string { return $this->pageTitle; } /** * The page title for this product * - * @param string $pageTitle + * @param string|null $pageTitle * * @return self */ - public function setPageTitle(string $pageTitle) : self + public function setPageTitle(?string $pageTitle) : self { $this->pageTitle = $pageTitle; return $this; @@ -175,20 +175,20 @@ public function setPageTitle(string $pageTitle) : self /** * The meta description for this product * - * @return string + * @return string|null */ - public function getPageMetaDescription() : string + public function getPageMetaDescription() : ?string { return $this->pageMetaDescription; } /** * The meta description for this product * - * @param string $pageMetaDescription + * @param string|null $pageMetaDescription * * @return self */ - public function setPageMetaDescription(string $pageMetaDescription) : self + public function setPageMetaDescription(?string $pageMetaDescription) : self { $this->pageMetaDescription = $pageMetaDescription; return $this; diff --git a/src/Api/Generated/Model/ProductLanguageModelCollection.php b/src/Api/Generated/Model/ProductLanguageModelCollection.php index 01566fe3..54e7d3e1 100644 --- a/src/Api/Generated/Model/ProductLanguageModelCollection.php +++ b/src/Api/Generated/Model/ProductLanguageModelCollection.php @@ -7,26 +7,26 @@ class ProductLanguageModelCollection /** * A collection of product languages * - * @var ProductLanguageModel[] + * @var ProductLanguageModel[]|null */ protected $data; /** * A collection of product languages * - * @return ProductLanguageModel[] + * @return ProductLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product languages * - * @param ProductLanguageModel[] $data + * @param ProductLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductLanguageModelItem.php b/src/Api/Generated/Model/ProductLanguageModelItem.php index cefa9150..01830466 100644 --- a/src/Api/Generated/Model/ProductLanguageModelItem.php +++ b/src/Api/Generated/Model/ProductLanguageModelItem.php @@ -7,26 +7,26 @@ class ProductLanguageModelItem /** * * - * @var ProductLanguageModel + * @var ProductLanguageModel|null */ protected $data; /** * * - * @return ProductLanguageModel + * @return ProductLanguageModel|null */ - public function getData() : ProductLanguageModel + public function getData() : ?ProductLanguageModel { return $this->data; } /** * * - * @param ProductLanguageModel $data + * @param ProductLanguageModel|null $data * * @return self */ - public function setData(ProductLanguageModel $data) : self + public function setData(?ProductLanguageModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductLanguageSlimModel.php b/src/Api/Generated/Model/ProductLanguageSlimModel.php index d16f40d8..b9030e99 100644 --- a/src/Api/Generated/Model/ProductLanguageSlimModel.php +++ b/src/Api/Generated/Model/ProductLanguageSlimModel.php @@ -7,44 +7,44 @@ class ProductLanguageSlimModel /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @var string + * @var string|null */ protected $langCode; /** * The products name * - * @var string + * @var string|null */ protected $name; /** * The products short description * - * @var string + * @var string|null */ protected $shortDescription; /** * The permalink for this product and language * - * @var string + * @var string|null */ protected $permalink; /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -52,20 +52,20 @@ public function setLangCode(string $langCode) : self /** * The products name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The products name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -73,20 +73,20 @@ public function setName(string $name) : self /** * The products short description * - * @return string + * @return string|null */ - public function getShortDescription() : string + public function getShortDescription() : ?string { return $this->shortDescription; } /** * The products short description * - * @param string $shortDescription + * @param string|null $shortDescription * * @return self */ - public function setShortDescription(string $shortDescription) : self + public function setShortDescription(?string $shortDescription) : self { $this->shortDescription = $shortDescription; return $this; @@ -94,20 +94,20 @@ public function setShortDescription(string $shortDescription) : self /** * The permalink for this product and language * - * @return string + * @return string|null */ - public function getPermalink() : string + public function getPermalink() : ?string { return $this->permalink; } /** * The permalink for this product and language * - * @param string $permalink + * @param string|null $permalink * * @return self */ - public function setPermalink(string $permalink) : self + public function setPermalink(?string $permalink) : self { $this->permalink = $permalink; return $this; diff --git a/src/Api/Generated/Model/ProductManufacturerModel.php b/src/Api/Generated/Model/ProductManufacturerModel.php index 89dc4ef3..5f4741d4 100644 --- a/src/Api/Generated/Model/ProductManufacturerModel.php +++ b/src/Api/Generated/Model/ProductManufacturerModel.php @@ -7,7 +7,7 @@ class ProductManufacturerModel /** * The id of this manufacturer * - * @var int + * @var int|null */ protected $manufacturerId; /** @@ -25,7 +25,7 @@ class ProductManufacturerModel /** * The name of this manufacturer * - * @var string + * @var string|null */ protected $name; /** @@ -37,20 +37,20 @@ class ProductManufacturerModel /** * The id of this manufacturer * - * @return int + * @return int|null */ - public function getManufacturerId() : int + public function getManufacturerId() : ?int { return $this->manufacturerId; } /** * The id of this manufacturer * - * @param int $manufacturerId + * @param int|null $manufacturerId * * @return self */ - public function setManufacturerId(int $manufacturerId) : self + public function setManufacturerId(?int $manufacturerId) : self { $this->manufacturerId = $manufacturerId; return $this; @@ -100,20 +100,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The name of this manufacturer * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this manufacturer * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductManufacturerModelCollection.php b/src/Api/Generated/Model/ProductManufacturerModelCollection.php index f2711669..d98a2469 100644 --- a/src/Api/Generated/Model/ProductManufacturerModelCollection.php +++ b/src/Api/Generated/Model/ProductManufacturerModelCollection.php @@ -7,26 +7,26 @@ class ProductManufacturerModelCollection /** * A collection of product manufacturers * - * @var ProductManufacturerModel[] + * @var ProductManufacturerModel[]|null */ protected $data; /** * A collection of product manufacturers * - * @return ProductManufacturerModel[] + * @return ProductManufacturerModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product manufacturers * - * @param ProductManufacturerModel[] $data + * @param ProductManufacturerModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductManufacturerModelItem.php b/src/Api/Generated/Model/ProductManufacturerModelItem.php index d0edbc35..05df0c6a 100644 --- a/src/Api/Generated/Model/ProductManufacturerModelItem.php +++ b/src/Api/Generated/Model/ProductManufacturerModelItem.php @@ -7,26 +7,26 @@ class ProductManufacturerModelItem /** * * - * @var ProductManufacturerModel + * @var ProductManufacturerModel|null */ protected $data; /** * * - * @return ProductManufacturerModel + * @return ProductManufacturerModel|null */ - public function getData() : ProductManufacturerModel + public function getData() : ?ProductManufacturerModel { return $this->data; } /** * * - * @param ProductManufacturerModel $data + * @param ProductManufacturerModel|null $data * * @return self */ - public function setData(ProductManufacturerModel $data) : self + public function setData(?ProductManufacturerModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMediaFileLinkModel.php b/src/Api/Generated/Model/ProductMediaFileLinkModel.php index 0855b94b..d1479791 100644 --- a/src/Api/Generated/Model/ProductMediaFileLinkModel.php +++ b/src/Api/Generated/Model/ProductMediaFileLinkModel.php @@ -7,44 +7,44 @@ class ProductMediaFileLinkModel /** * This links ID * - * @var int + * @var int|null */ protected $productMediaFileId; /** * The media file this link points to. You can fetch available media files from the /media-files endpoint * - * @var int + * @var int|null */ protected $mediaFileId; /** * The sort index of these media file links. Note that after the item is saved the sort index will be rearranged so that the item with the lowest sort index always get sort index 0, the next one 1, and so on. * - * @var int + * @var int|null */ protected $sortIndex; /** * The type of file this link points to. Can be either ”image” or ”document” * - * @var string + * @var string|null */ protected $type; /** * This links ID * - * @return int + * @return int|null */ - public function getProductMediaFileId() : int + public function getProductMediaFileId() : ?int { return $this->productMediaFileId; } /** * This links ID * - * @param int $productMediaFileId + * @param int|null $productMediaFileId * * @return self */ - public function setProductMediaFileId(int $productMediaFileId) : self + public function setProductMediaFileId(?int $productMediaFileId) : self { $this->productMediaFileId = $productMediaFileId; return $this; @@ -52,20 +52,20 @@ public function setProductMediaFileId(int $productMediaFileId) : self /** * The media file this link points to. You can fetch available media files from the /media-files endpoint * - * @return int + * @return int|null */ - public function getMediaFileId() : int + public function getMediaFileId() : ?int { return $this->mediaFileId; } /** * The media file this link points to. You can fetch available media files from the /media-files endpoint * - * @param int $mediaFileId + * @param int|null $mediaFileId * * @return self */ - public function setMediaFileId(int $mediaFileId) : self + public function setMediaFileId(?int $mediaFileId) : self { $this->mediaFileId = $mediaFileId; return $this; @@ -73,20 +73,20 @@ public function setMediaFileId(int $mediaFileId) : self /** * The sort index of these media file links. Note that after the item is saved the sort index will be rearranged so that the item with the lowest sort index always get sort index 0, the next one 1, and so on. * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of these media file links. Note that after the item is saved the sort index will be rearranged so that the item with the lowest sort index always get sort index 0, the next one 1, and so on. * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -94,20 +94,20 @@ public function setSortIndex(int $sortIndex) : self /** * The type of file this link points to. Can be either ”image” or ”document” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of file this link points to. Can be either ”image” or ”document” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; diff --git a/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php b/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php index 40c02f3c..9b6d3394 100644 --- a/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php +++ b/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php @@ -7,26 +7,26 @@ class ProductMediaFileLinkModelCollection /** * A collection of product media file links * - * @var ProductMediaFileLinkModel[] + * @var ProductMediaFileLinkModel[]|null */ protected $data; /** * A collection of product media file links * - * @return ProductMediaFileLinkModel[] + * @return ProductMediaFileLinkModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product media file links * - * @param ProductMediaFileLinkModel[] $data + * @param ProductMediaFileLinkModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php b/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php index 23d3b8ac..f9eb14cc 100644 --- a/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php +++ b/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php @@ -7,26 +7,26 @@ class ProductMediaFileLinkModelItem /** * * - * @var ProductMediaFileLinkModel + * @var ProductMediaFileLinkModel|null */ protected $data; /** * * - * @return ProductMediaFileLinkModel + * @return ProductMediaFileLinkModel|null */ - public function getData() : ProductMediaFileLinkModel + public function getData() : ?ProductMediaFileLinkModel { return $this->data; } /** * * - * @param ProductMediaFileLinkModel $data + * @param ProductMediaFileLinkModel|null $data * * @return self */ - public function setData(ProductMediaFileLinkModel $data) : self + public function setData(?ProductMediaFileLinkModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataModel.php b/src/Api/Generated/Model/ProductMetaDataModel.php index e2f3ee44..2e08d15e 100644 --- a/src/Api/Generated/Model/ProductMetaDataModel.php +++ b/src/Api/Generated/Model/ProductMetaDataModel.php @@ -7,44 +7,44 @@ class ProductMetaDataModel /** * The ID of the meta data. * - * @var int + * @var int|null */ protected $metaDataId; /** * The ID of the meta data type. Available meta data types can be fetched using the /product-meta-data-types endpoint * - * @var int + * @var int|null */ protected $metaDataTypeId; /** * The sort index of this meta data for this product * - * @var int + * @var int|null */ protected $sortIndex; /** * * - * @var ProductMetaLanguageDataModelCollection + * @var ProductMetaLanguageDataModelCollection|null */ protected $languages; /** * The ID of the meta data. * - * @return int + * @return int|null */ - public function getMetaDataId() : int + public function getMetaDataId() : ?int { return $this->metaDataId; } /** * The ID of the meta data. * - * @param int $metaDataId + * @param int|null $metaDataId * * @return self */ - public function setMetaDataId(int $metaDataId) : self + public function setMetaDataId(?int $metaDataId) : self { $this->metaDataId = $metaDataId; return $this; @@ -52,20 +52,20 @@ public function setMetaDataId(int $metaDataId) : self /** * The ID of the meta data type. Available meta data types can be fetched using the /product-meta-data-types endpoint * - * @return int + * @return int|null */ - public function getMetaDataTypeId() : int + public function getMetaDataTypeId() : ?int { return $this->metaDataTypeId; } /** * The ID of the meta data type. Available meta data types can be fetched using the /product-meta-data-types endpoint * - * @param int $metaDataTypeId + * @param int|null $metaDataTypeId * * @return self */ - public function setMetaDataTypeId(int $metaDataTypeId) : self + public function setMetaDataTypeId(?int $metaDataTypeId) : self { $this->metaDataTypeId = $metaDataTypeId; return $this; @@ -73,20 +73,20 @@ public function setMetaDataTypeId(int $metaDataTypeId) : self /** * The sort index of this meta data for this product * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of this meta data for this product * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -94,20 +94,20 @@ public function setSortIndex(int $sortIndex) : self /** * * - * @return ProductMetaLanguageDataModelCollection + * @return ProductMetaLanguageDataModelCollection|null */ - public function getLanguages() : ProductMetaLanguageDataModelCollection + public function getLanguages() : ?ProductMetaLanguageDataModelCollection { return $this->languages; } /** * * - * @param ProductMetaLanguageDataModelCollection $languages + * @param ProductMetaLanguageDataModelCollection|null $languages * * @return self */ - public function setLanguages(ProductMetaLanguageDataModelCollection $languages) : self + public function setLanguages(?ProductMetaLanguageDataModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataModelCollection.php b/src/Api/Generated/Model/ProductMetaDataModelCollection.php index 1c9993a6..73083c54 100644 --- a/src/Api/Generated/Model/ProductMetaDataModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaDataModelCollection.php @@ -7,26 +7,26 @@ class ProductMetaDataModelCollection /** * A collection of product meta data * - * @var ProductMetaDataModel[] + * @var ProductMetaDataModel[]|null */ protected $data; /** * A collection of product meta data * - * @return ProductMetaDataModel[] + * @return ProductMetaDataModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product meta data * - * @param ProductMetaDataModel[] $data + * @param ProductMetaDataModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataModelItem.php b/src/Api/Generated/Model/ProductMetaDataModelItem.php index 0c5445c6..fac100cd 100644 --- a/src/Api/Generated/Model/ProductMetaDataModelItem.php +++ b/src/Api/Generated/Model/ProductMetaDataModelItem.php @@ -7,26 +7,26 @@ class ProductMetaDataModelItem /** * * - * @var ProductMetaDataModel + * @var ProductMetaDataModel|null */ protected $data; /** * * - * @return ProductMetaDataModel + * @return ProductMetaDataModel|null */ - public function getData() : ProductMetaDataModel + public function getData() : ?ProductMetaDataModel { return $this->data; } /** * * - * @param ProductMetaDataModel $data + * @param ProductMetaDataModel|null $data * * @return self */ - public function setData(ProductMetaDataModel $data) : self + public function setData(?ProductMetaDataModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php b/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php index cbdb3302..f3235e7c 100644 --- a/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php +++ b/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php @@ -7,44 +7,44 @@ class ProductMetaDataModelUpdatable /** * The ID of the meta data. * - * @var int + * @var int|null */ protected $metaDataId; /** * The ID of the meta data type. Available meta data types can be fetched using the /product-meta-data-types endpoint * - * @var int + * @var int|null */ protected $metaDataTypeId; /** * The sort index of this meta data for this product * - * @var int + * @var int|null */ protected $sortIndex; /** * A collection of product meta data languages * - * @var ProductMetaLanguageDataModel[] + * @var ProductMetaLanguageDataModel[]|null */ protected $languages; /** * The ID of the meta data. * - * @return int + * @return int|null */ - public function getMetaDataId() : int + public function getMetaDataId() : ?int { return $this->metaDataId; } /** * The ID of the meta data. * - * @param int $metaDataId + * @param int|null $metaDataId * * @return self */ - public function setMetaDataId(int $metaDataId) : self + public function setMetaDataId(?int $metaDataId) : self { $this->metaDataId = $metaDataId; return $this; @@ -52,20 +52,20 @@ public function setMetaDataId(int $metaDataId) : self /** * The ID of the meta data type. Available meta data types can be fetched using the /product-meta-data-types endpoint * - * @return int + * @return int|null */ - public function getMetaDataTypeId() : int + public function getMetaDataTypeId() : ?int { return $this->metaDataTypeId; } /** * The ID of the meta data type. Available meta data types can be fetched using the /product-meta-data-types endpoint * - * @param int $metaDataTypeId + * @param int|null $metaDataTypeId * * @return self */ - public function setMetaDataTypeId(int $metaDataTypeId) : self + public function setMetaDataTypeId(?int $metaDataTypeId) : self { $this->metaDataTypeId = $metaDataTypeId; return $this; @@ -73,20 +73,20 @@ public function setMetaDataTypeId(int $metaDataTypeId) : self /** * The sort index of this meta data for this product * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of this meta data for this product * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -94,20 +94,20 @@ public function setSortIndex(int $sortIndex) : self /** * A collection of product meta data languages * - * @return ProductMetaLanguageDataModel[] + * @return ProductMetaLanguageDataModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * A collection of product meta data languages * - * @param ProductMetaLanguageDataModel[] $languages + * @param ProductMetaLanguageDataModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php index afb187b0..a0cd7e64 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php @@ -7,32 +7,32 @@ class ProductMetaDataTypeLanguageModel /** * The language code for this language * - * @var string + * @var string|null */ protected $langCode; /** * The name of this meta data type * - * @var string + * @var string|null */ protected $name; /** * The language code for this language * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The language code for this language * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this meta data type * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this meta data type * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php index c55e36e5..18716236 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php @@ -7,26 +7,26 @@ class ProductMetaDataTypeLanguageModelCollection /** * A collection of product meta data type languages * - * @var ProductMetaDataTypeLanguageModel[] + * @var ProductMetaDataTypeLanguageModel[]|null */ protected $data; /** * A collection of product meta data type languages * - * @return ProductMetaDataTypeLanguageModel[] + * @return ProductMetaDataTypeLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product meta data type languages * - * @param ProductMetaDataTypeLanguageModel[] $data + * @param ProductMetaDataTypeLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModel.php b/src/Api/Generated/Model/ProductMetaDataTypeModel.php index 63b23111..98255cb3 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModel.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModel.php @@ -7,32 +7,32 @@ class ProductMetaDataTypeModel /** * The meta data type id * - * @var int + * @var int|null */ protected $metaDataTypeId; /** * * - * @var ProductMetaDataTypeLanguageModelCollection + * @var ProductMetaDataTypeLanguageModelCollection|null */ protected $languages; /** * The meta data type id * - * @return int + * @return int|null */ - public function getMetaDataTypeId() : int + public function getMetaDataTypeId() : ?int { return $this->metaDataTypeId; } /** * The meta data type id * - * @param int $metaDataTypeId + * @param int|null $metaDataTypeId * * @return self */ - public function setMetaDataTypeId(int $metaDataTypeId) : self + public function setMetaDataTypeId(?int $metaDataTypeId) : self { $this->metaDataTypeId = $metaDataTypeId; return $this; @@ -40,20 +40,20 @@ public function setMetaDataTypeId(int $metaDataTypeId) : self /** * * - * @return ProductMetaDataTypeLanguageModelCollection + * @return ProductMetaDataTypeLanguageModelCollection|null */ - public function getLanguages() : ProductMetaDataTypeLanguageModelCollection + public function getLanguages() : ?ProductMetaDataTypeLanguageModelCollection { return $this->languages; } /** * * - * @param ProductMetaDataTypeLanguageModelCollection $languages + * @param ProductMetaDataTypeLanguageModelCollection|null $languages * * @return self */ - public function setLanguages(ProductMetaDataTypeLanguageModelCollection $languages) : self + public function setLanguages(?ProductMetaDataTypeLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php b/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php index 8ab588c1..f86f8bc3 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php @@ -7,26 +7,26 @@ class ProductMetaDataTypeModelCollection /** * A collection of product meta data types * - * @var ProductMetaDataTypeModel[] + * @var ProductMetaDataTypeModel[]|null */ protected $data; /** * A collection of product meta data types * - * @return ProductMetaDataTypeModel[] + * @return ProductMetaDataTypeModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product meta data types * - * @param ProductMetaDataTypeModel[] $data + * @param ProductMetaDataTypeModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php b/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php index 51ee7226..7cef498b 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php @@ -7,26 +7,26 @@ class ProductMetaDataTypeModelItem /** * * - * @var ProductMetaDataTypeModel + * @var ProductMetaDataTypeModel|null */ protected $data; /** * * - * @return ProductMetaDataTypeModel + * @return ProductMetaDataTypeModel|null */ - public function getData() : ProductMetaDataTypeModel + public function getData() : ?ProductMetaDataTypeModel { return $this->data; } /** * * - * @param ProductMetaDataTypeModel $data + * @param ProductMetaDataTypeModel|null $data * * @return self */ - public function setData(ProductMetaDataTypeModel $data) : self + public function setData(?ProductMetaDataTypeModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php b/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php index 4559415f..bfdb3c4d 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php @@ -7,26 +7,26 @@ class ProductMetaDataTypeModelUpdatable /** * * - * @var ProductMetaDataTypeLanguageModelCollection + * @var ProductMetaDataTypeLanguageModelCollection|null */ protected $languages; /** * * - * @return ProductMetaDataTypeLanguageModelCollection + * @return ProductMetaDataTypeLanguageModelCollection|null */ - public function getLanguages() : ProductMetaDataTypeLanguageModelCollection + public function getLanguages() : ?ProductMetaDataTypeLanguageModelCollection { return $this->languages; } /** * * - * @param ProductMetaDataTypeLanguageModelCollection $languages + * @param ProductMetaDataTypeLanguageModelCollection|null $languages * * @return self */ - public function setLanguages(ProductMetaDataTypeLanguageModelCollection $languages) : self + public function setLanguages(?ProductMetaDataTypeLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductMetaLanguageDataModel.php b/src/Api/Generated/Model/ProductMetaLanguageDataModel.php index c38d3e02..26672cde 100644 --- a/src/Api/Generated/Model/ProductMetaLanguageDataModel.php +++ b/src/Api/Generated/Model/ProductMetaLanguageDataModel.php @@ -7,32 +7,32 @@ class ProductMetaLanguageDataModel /** * The langCode for this language * - * @var string + * @var string|null */ protected $langCode; /** * The value for this meta data * - * @var string + * @var string|null */ protected $value; /** * The langCode for this language * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The langCode for this language * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The value for this meta data * - * @return string + * @return string|null */ - public function getValue() : string + public function getValue() : ?string { return $this->value; } /** * The value for this meta data * - * @param string $value + * @param string|null $value * * @return self */ - public function setValue(string $value) : self + public function setValue(?string $value) : self { $this->value = $value; return $this; diff --git a/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php b/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php index 38303e5d..3c0bfe18 100644 --- a/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php @@ -7,26 +7,26 @@ class ProductMetaLanguageDataModelCollection /** * A collection of product meta data * - * @var ProductMetaLanguageDataModel[] + * @var ProductMetaLanguageDataModel[]|null */ protected $data; /** * A collection of product meta data * - * @return ProductMetaLanguageDataModel[] + * @return ProductMetaLanguageDataModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product meta data * - * @param ProductMetaLanguageDataModel[] $data + * @param ProductMetaLanguageDataModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php b/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php index dd12c8fa..e08b4739 100644 --- a/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php +++ b/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php @@ -7,26 +7,26 @@ class ProductMetaLanguageDataModelItem /** * * - * @var ProductMetaLanguageDataModel + * @var ProductMetaLanguageDataModel|null */ protected $data; /** * * - * @return ProductMetaLanguageDataModel + * @return ProductMetaLanguageDataModel|null */ - public function getData() : ProductMetaLanguageDataModel + public function getData() : ?ProductMetaLanguageDataModel { return $this->data; } /** * * - * @param ProductMetaLanguageDataModel $data + * @param ProductMetaLanguageDataModel|null $data * * @return self */ - public function setData(ProductMetaLanguageDataModel $data) : self + public function setData(?ProductMetaLanguageDataModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductModel.php b/src/Api/Generated/Model/ProductModel.php index 9f81bb28..0832ad9e 100644 --- a/src/Api/Generated/Model/ProductModel.php +++ b/src/Api/Generated/Model/ProductModel.php @@ -7,7 +7,7 @@ class ProductModel /** * * - * @var int + * @var int|null */ protected $productId; /** @@ -25,7 +25,7 @@ class ProductModel /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** @@ -37,19 +37,19 @@ class ProductModel /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @var string + * @var string|null */ protected $visibility = 'hidden'; /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @var int[] + * @var int[]|null */ protected $visibilityPricelistIds; /** * A valid URL to a web page with more information for this product * - * @var string + * @var string|null */ protected $moreInfoUrl; /** @@ -73,19 +73,19 @@ class ProductModel /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @var string + * @var string|null */ protected $type; /** * Should this product be watchable for customers when it is back in stock? * - * @var bool + * @var bool|null */ protected $isBackInStockWatchable = true; /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @var bool + * @var bool|null */ protected $bundleUseManualPrice; /** @@ -97,80 +97,80 @@ class ProductModel /** * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint * - * @var bool + * @var bool|null */ protected $hasSeveralVariants; /** * A timestamp of when the product was modified. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $modifiedAt; /** * * - * @var ProductVariantModelCollection + * @var ProductVariantModelCollection|null */ protected $variants; /** * * - * @var BundledProductsModelCollection + * @var BundledProductsModelCollection|null */ protected $bundledProducts; /** * * - * @var ProductMediaFileLinkModelCollection + * @var ProductMediaFileLinkModelCollection|null */ protected $mediaFiles; /** * * - * @var ProductModelLanguages + * @var ProductModelLanguages|null */ protected $languages; /** * * - * @var ProductVatRateModelCollection + * @var ProductVatRateModelCollection|null */ protected $vatRates; /** * * - * @var ProductCategoryLinkModelCollection + * @var ProductCategoryLinkModelCollection|null */ protected $categories; /** * * - * @var ProductUnitModelItem + * @var ProductUnitModelItem|null */ protected $unit; /** * * - * @var ProductMetaDataModelCollection + * @var ProductMetaDataModelCollection|null */ protected $metaData; /** * * - * @return int + * @return int|null */ - public function getProductId() : int + public function getProductId() : ?int { return $this->productId; } /** * * - * @param int $productId + * @param int|null $productId * * @return self */ - public function setProductId(int $productId) : self + public function setProductId(?int $productId) : self { $this->productId = $productId; return $this; @@ -220,20 +220,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -262,20 +262,20 @@ public function setDefaultVatRate(?string $defaultVatRate) : self /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -283,20 +283,20 @@ public function setVisibility(string $visibility) : self /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @return int[] + * @return int[]|null */ - public function getVisibilityPricelistIds() : array + public function getVisibilityPricelistIds() : ?array { return $this->visibilityPricelistIds; } /** * The ID´s of the pricelists that the product should be visible for. Is required for when ”visibility” is set to ”pricelists” but should never be populated otherwise * - * @param int[] $visibilityPricelistIds + * @param int[]|null $visibilityPricelistIds * * @return self */ - public function setVisibilityPricelistIds(array $visibilityPricelistIds) : self + public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self { $this->visibilityPricelistIds = $visibilityPricelistIds; return $this; @@ -304,20 +304,20 @@ public function setVisibilityPricelistIds(array $visibilityPricelistIds) : self /** * A valid URL to a web page with more information for this product * - * @return string + * @return string|null */ - public function getMoreInfoUrl() : string + public function getMoreInfoUrl() : ?string { return $this->moreInfoUrl; } /** * A valid URL to a web page with more information for this product * - * @param string $moreInfoUrl + * @param string|null $moreInfoUrl * * @return self */ - public function setMoreInfoUrl(string $moreInfoUrl) : self + public function setMoreInfoUrl(?string $moreInfoUrl) : self { $this->moreInfoUrl = $moreInfoUrl; return $this; @@ -388,20 +388,20 @@ public function setSortIndex(?int $sortIndex) : self /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -409,20 +409,20 @@ public function setType(string $type) : self /** * Should this product be watchable for customers when it is back in stock? * - * @return bool + * @return bool|null */ - public function getIsBackInStockWatchable() : bool + public function getIsBackInStockWatchable() : ?bool { return $this->isBackInStockWatchable; } /** * Should this product be watchable for customers when it is back in stock? * - * @param bool $isBackInStockWatchable + * @param bool|null $isBackInStockWatchable * * @return self */ - public function setIsBackInStockWatchable(bool $isBackInStockWatchable) : self + public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self { $this->isBackInStockWatchable = $isBackInStockWatchable; return $this; @@ -430,20 +430,20 @@ public function setIsBackInStockWatchable(bool $isBackInStockWatchable) : self /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @return bool + * @return bool|null */ - public function getBundleUseManualPrice() : bool + public function getBundleUseManualPrice() : ?bool { return $this->bundleUseManualPrice; } /** * Should all bundled products have a manually entered price? Only applies if type is bundle * - * @param bool $bundleUseManualPrice + * @param bool|null $bundleUseManualPrice * * @return self */ - public function setBundleUseManualPrice(bool $bundleUseManualPrice) : self + public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self { $this->bundleUseManualPrice = $bundleUseManualPrice; return $this; @@ -472,20 +472,20 @@ public function setAccounting(?int $accounting) : self /** * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint * - * @return bool + * @return bool|null */ - public function getHasSeveralVariants() : bool + public function getHasSeveralVariants() : ?bool { return $this->hasSeveralVariants; } /** * Indicates if the products has several variants or not. The remaining variants can be fetched using the /products/{product id}/variants endpoint * - * @param bool $hasSeveralVariants + * @param bool|null $hasSeveralVariants * * @return self */ - public function setHasSeveralVariants(bool $hasSeveralVariants) : self + public function setHasSeveralVariants(?bool $hasSeveralVariants) : self { $this->hasSeveralVariants = $hasSeveralVariants; return $this; @@ -493,20 +493,20 @@ public function setHasSeveralVariants(bool $hasSeveralVariants) : self /** * A timestamp of when the product was modified. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getModifiedAt() : string + public function getModifiedAt() : ?string { return $this->modifiedAt; } /** * A timestamp of when the product was modified. The time should be formatted using ISO-8601 * - * @param string $modifiedAt + * @param string|null $modifiedAt * * @return self */ - public function setModifiedAt(string $modifiedAt) : self + public function setModifiedAt(?string $modifiedAt) : self { $this->modifiedAt = $modifiedAt; return $this; @@ -514,20 +514,20 @@ public function setModifiedAt(string $modifiedAt) : self /** * * - * @return ProductVariantModelCollection + * @return ProductVariantModelCollection|null */ - public function getVariants() : ProductVariantModelCollection + public function getVariants() : ?ProductVariantModelCollection { return $this->variants; } /** * * - * @param ProductVariantModelCollection $variants + * @param ProductVariantModelCollection|null $variants * * @return self */ - public function setVariants(ProductVariantModelCollection $variants) : self + public function setVariants(?ProductVariantModelCollection $variants) : self { $this->variants = $variants; return $this; @@ -535,20 +535,20 @@ public function setVariants(ProductVariantModelCollection $variants) : self /** * * - * @return BundledProductsModelCollection + * @return BundledProductsModelCollection|null */ - public function getBundledProducts() : BundledProductsModelCollection + public function getBundledProducts() : ?BundledProductsModelCollection { return $this->bundledProducts; } /** * * - * @param BundledProductsModelCollection $bundledProducts + * @param BundledProductsModelCollection|null $bundledProducts * * @return self */ - public function setBundledProducts(BundledProductsModelCollection $bundledProducts) : self + public function setBundledProducts(?BundledProductsModelCollection $bundledProducts) : self { $this->bundledProducts = $bundledProducts; return $this; @@ -556,20 +556,20 @@ public function setBundledProducts(BundledProductsModelCollection $bundledProduc /** * * - * @return ProductMediaFileLinkModelCollection + * @return ProductMediaFileLinkModelCollection|null */ - public function getMediaFiles() : ProductMediaFileLinkModelCollection + public function getMediaFiles() : ?ProductMediaFileLinkModelCollection { return $this->mediaFiles; } /** * * - * @param ProductMediaFileLinkModelCollection $mediaFiles + * @param ProductMediaFileLinkModelCollection|null $mediaFiles * * @return self */ - public function setMediaFiles(ProductMediaFileLinkModelCollection $mediaFiles) : self + public function setMediaFiles(?ProductMediaFileLinkModelCollection $mediaFiles) : self { $this->mediaFiles = $mediaFiles; return $this; @@ -577,20 +577,20 @@ public function setMediaFiles(ProductMediaFileLinkModelCollection $mediaFiles) : /** * * - * @return ProductModelLanguages + * @return ProductModelLanguages|null */ - public function getLanguages() : ProductModelLanguages + public function getLanguages() : ?ProductModelLanguages { return $this->languages; } /** * * - * @param ProductModelLanguages $languages + * @param ProductModelLanguages|null $languages * * @return self */ - public function setLanguages(ProductModelLanguages $languages) : self + public function setLanguages(?ProductModelLanguages $languages) : self { $this->languages = $languages; return $this; @@ -598,20 +598,20 @@ public function setLanguages(ProductModelLanguages $languages) : self /** * * - * @return ProductVatRateModelCollection + * @return ProductVatRateModelCollection|null */ - public function getVatRates() : ProductVatRateModelCollection + public function getVatRates() : ?ProductVatRateModelCollection { return $this->vatRates; } /** * * - * @param ProductVatRateModelCollection $vatRates + * @param ProductVatRateModelCollection|null $vatRates * * @return self */ - public function setVatRates(ProductVatRateModelCollection $vatRates) : self + public function setVatRates(?ProductVatRateModelCollection $vatRates) : self { $this->vatRates = $vatRates; return $this; @@ -619,20 +619,20 @@ public function setVatRates(ProductVatRateModelCollection $vatRates) : self /** * * - * @return ProductCategoryLinkModelCollection + * @return ProductCategoryLinkModelCollection|null */ - public function getCategories() : ProductCategoryLinkModelCollection + public function getCategories() : ?ProductCategoryLinkModelCollection { return $this->categories; } /** * * - * @param ProductCategoryLinkModelCollection $categories + * @param ProductCategoryLinkModelCollection|null $categories * * @return self */ - public function setCategories(ProductCategoryLinkModelCollection $categories) : self + public function setCategories(?ProductCategoryLinkModelCollection $categories) : self { $this->categories = $categories; return $this; @@ -640,20 +640,20 @@ public function setCategories(ProductCategoryLinkModelCollection $categories) : /** * * - * @return ProductUnitModelItem + * @return ProductUnitModelItem|null */ - public function getUnit() : ProductUnitModelItem + public function getUnit() : ?ProductUnitModelItem { return $this->unit; } /** * * - * @param ProductUnitModelItem $unit + * @param ProductUnitModelItem|null $unit * * @return self */ - public function setUnit(ProductUnitModelItem $unit) : self + public function setUnit(?ProductUnitModelItem $unit) : self { $this->unit = $unit; return $this; @@ -661,20 +661,20 @@ public function setUnit(ProductUnitModelItem $unit) : self /** * * - * @return ProductMetaDataModelCollection + * @return ProductMetaDataModelCollection|null */ - public function getMetaData() : ProductMetaDataModelCollection + public function getMetaData() : ?ProductMetaDataModelCollection { return $this->metaData; } /** * * - * @param ProductMetaDataModelCollection $metaData + * @param ProductMetaDataModelCollection|null $metaData * * @return self */ - public function setMetaData(ProductMetaDataModelCollection $metaData) : self + public function setMetaData(?ProductMetaDataModelCollection $metaData) : self { $this->metaData = $metaData; return $this; diff --git a/src/Api/Generated/Model/ProductModelCollection.php b/src/Api/Generated/Model/ProductModelCollection.php index 661f2900..8f1506ae 100644 --- a/src/Api/Generated/Model/ProductModelCollection.php +++ b/src/Api/Generated/Model/ProductModelCollection.php @@ -7,32 +7,32 @@ class ProductModelCollection /** * A collection of products * - * @var ProductModel[] + * @var ProductModel[]|null */ protected $data; /** * * - * @var ProductModelCollectionMeta + * @var ProductModelCollectionMeta|null */ protected $meta; /** * A collection of products * - * @return ProductModel[] + * @return ProductModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of products * - * @param ProductModel[] $data + * @param ProductModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; @@ -40,20 +40,20 @@ public function setData(array $data) : self /** * * - * @return ProductModelCollectionMeta + * @return ProductModelCollectionMeta|null */ - public function getMeta() : ProductModelCollectionMeta + public function getMeta() : ?ProductModelCollectionMeta { return $this->meta; } /** * * - * @param ProductModelCollectionMeta $meta + * @param ProductModelCollectionMeta|null $meta * * @return self */ - public function setMeta(ProductModelCollectionMeta $meta) : self + public function setMeta(?ProductModelCollectionMeta $meta) : self { $this->meta = $meta; return $this; diff --git a/src/Api/Generated/Model/ProductModelCollectionMeta.php b/src/Api/Generated/Model/ProductModelCollectionMeta.php index 865c939a..4d6d4e91 100644 --- a/src/Api/Generated/Model/ProductModelCollectionMeta.php +++ b/src/Api/Generated/Model/ProductModelCollectionMeta.php @@ -7,26 +7,26 @@ class ProductModelCollectionMeta /** * * - * @var PaginationModel + * @var PaginationModel|null */ protected $pagination; /** * * - * @return PaginationModel + * @return PaginationModel|null */ - public function getPagination() : PaginationModel + public function getPagination() : ?PaginationModel { return $this->pagination; } /** * * - * @param PaginationModel $pagination + * @param PaginationModel|null $pagination * * @return self */ - public function setPagination(PaginationModel $pagination) : self + public function setPagination(?PaginationModel $pagination) : self { $this->pagination = $pagination; return $this; diff --git a/src/Api/Generated/Model/ProductModelItem.php b/src/Api/Generated/Model/ProductModelItem.php index fbef6854..5dc18cde 100644 --- a/src/Api/Generated/Model/ProductModelItem.php +++ b/src/Api/Generated/Model/ProductModelItem.php @@ -7,26 +7,26 @@ class ProductModelItem /** * * - * @var ProductModel + * @var ProductModel|null */ protected $data; /** * * - * @return ProductModel + * @return ProductModel|null */ - public function getData() : ProductModel + public function getData() : ?ProductModel { return $this->data; } /** * * - * @param ProductModel $data + * @param ProductModel|null $data * * @return self */ - public function setData(ProductModel $data) : self + public function setData(?ProductModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductModelLanguages.php b/src/Api/Generated/Model/ProductModelLanguages.php index 909017a9..33692085 100644 --- a/src/Api/Generated/Model/ProductModelLanguages.php +++ b/src/Api/Generated/Model/ProductModelLanguages.php @@ -7,26 +7,26 @@ class ProductModelLanguages /** * A collection of product languages * - * @var ProductLanguageSlimModel[] + * @var ProductLanguageSlimModel[]|null */ protected $data; /** * A collection of product languages * - * @return ProductLanguageSlimModel[] + * @return ProductLanguageSlimModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product languages * - * @param ProductLanguageSlimModel[] $data + * @param ProductLanguageSlimModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index b582a3f1..a1ef7a20 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -19,7 +19,7 @@ class ProductModelPatchable /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** @@ -31,7 +31,7 @@ class ProductModelPatchable /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @var string + * @var string|null */ protected $visibility = 'hidden'; /** @@ -67,13 +67,13 @@ class ProductModelPatchable /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @var string + * @var string|null */ protected $type; /** * Should this product be watchable for customers when it is back in stock? * - * @var bool + * @var bool|null */ protected $isBackInStockWatchable = true; /** @@ -91,31 +91,31 @@ class ProductModelPatchable /** * A collection of media files * - * @var ProductMediaFileLinkModel[] + * @var ProductMediaFileLinkModel[]|null */ protected $mediaFiles; /** * A collection of product languages * - * @var ProductLanguageModel[] + * @var ProductLanguageModel[]|null */ protected $languages; /** * A collection of country specific vat rates * - * @var ProductVatRateModel[] + * @var ProductVatRateModel[]|null */ protected $vatRates; /** * A collection of categories * - * @var ProductCategoryLinkModel[] + * @var ProductCategoryLinkModel[]|null */ protected $categories; /** * A collection of meta data * - * @var ProductMetaDataModelUpdatable[] + * @var ProductMetaDataModelUpdatable[]|null */ protected $metaData; /** @@ -163,20 +163,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -205,20 +205,20 @@ public function setDefaultVatRate(?string $defaultVatRate) : self /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -331,20 +331,20 @@ public function setSortIndex(?int $sortIndex) : self /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -352,20 +352,20 @@ public function setType(string $type) : self /** * Should this product be watchable for customers when it is back in stock? * - * @return bool + * @return bool|null */ - public function getIsBackInStockWatchable() : bool + public function getIsBackInStockWatchable() : ?bool { return $this->isBackInStockWatchable; } /** * Should this product be watchable for customers when it is back in stock? * - * @param bool $isBackInStockWatchable + * @param bool|null $isBackInStockWatchable * * @return self */ - public function setIsBackInStockWatchable(bool $isBackInStockWatchable) : self + public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self { $this->isBackInStockWatchable = $isBackInStockWatchable; return $this; @@ -415,20 +415,20 @@ public function setAccounting(?int $accounting) : self /** * A collection of media files * - * @return ProductMediaFileLinkModel[] + * @return ProductMediaFileLinkModel[]|null */ - public function getMediaFiles() : array + public function getMediaFiles() : ?array { return $this->mediaFiles; } /** * A collection of media files * - * @param ProductMediaFileLinkModel[] $mediaFiles + * @param ProductMediaFileLinkModel[]|null $mediaFiles * * @return self */ - public function setMediaFiles(array $mediaFiles) : self + public function setMediaFiles(?array $mediaFiles) : self { $this->mediaFiles = $mediaFiles; return $this; @@ -436,20 +436,20 @@ public function setMediaFiles(array $mediaFiles) : self /** * A collection of product languages * - * @return ProductLanguageModel[] + * @return ProductLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * A collection of product languages * - * @param ProductLanguageModel[] $languages + * @param ProductLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; @@ -457,20 +457,20 @@ public function setLanguages(array $languages) : self /** * A collection of country specific vat rates * - * @return ProductVatRateModel[] + * @return ProductVatRateModel[]|null */ - public function getVatRates() : array + public function getVatRates() : ?array { return $this->vatRates; } /** * A collection of country specific vat rates * - * @param ProductVatRateModel[] $vatRates + * @param ProductVatRateModel[]|null $vatRates * * @return self */ - public function setVatRates(array $vatRates) : self + public function setVatRates(?array $vatRates) : self { $this->vatRates = $vatRates; return $this; @@ -478,20 +478,20 @@ public function setVatRates(array $vatRates) : self /** * A collection of categories * - * @return ProductCategoryLinkModel[] + * @return ProductCategoryLinkModel[]|null */ - public function getCategories() : array + public function getCategories() : ?array { return $this->categories; } /** * A collection of categories * - * @param ProductCategoryLinkModel[] $categories + * @param ProductCategoryLinkModel[]|null $categories * * @return self */ - public function setCategories(array $categories) : self + public function setCategories(?array $categories) : self { $this->categories = $categories; return $this; @@ -499,20 +499,20 @@ public function setCategories(array $categories) : self /** * A collection of meta data * - * @return ProductMetaDataModelUpdatable[] + * @return ProductMetaDataModelUpdatable[]|null */ - public function getMetaData() : array + public function getMetaData() : ?array { return $this->metaData; } /** * A collection of meta data * - * @param ProductMetaDataModelUpdatable[] $metaData + * @param ProductMetaDataModelUpdatable[]|null $metaData * * @return self */ - public function setMetaData(array $metaData) : self + public function setMetaData(?array $metaData) : self { $this->metaData = $metaData; return $this; diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index c11b0bf5..66ecdf9c 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -19,7 +19,7 @@ class ProductModelUpdatable /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @var string + * @var string|null */ protected $createdAt; /** @@ -31,7 +31,7 @@ class ProductModelUpdatable /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @var string + * @var string|null */ protected $visibility = 'hidden'; /** @@ -43,7 +43,7 @@ class ProductModelUpdatable /** * A valid URL to a web page with more information for this product * - * @var string + * @var string|null */ protected $moreInfoUrl; /** @@ -67,13 +67,13 @@ class ProductModelUpdatable /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @var string + * @var string|null */ protected $type; /** * Should this product be watchable for customers when it is back in stock? * - * @var bool + * @var bool|null */ protected $isBackInStockWatchable = true; /** @@ -91,7 +91,7 @@ class ProductModelUpdatable /** * A collection of variants * - * @var ProductVariantPutRequestModel[] + * @var ProductVariantPutRequestModel[]|null */ protected $variants; /** @@ -103,31 +103,31 @@ class ProductModelUpdatable /** * A collection of media files * - * @var ProductMediaFileLinkModel[] + * @var ProductMediaFileLinkModel[]|null */ protected $mediaFiles; /** * A collection of product languages * - * @var ProductLanguageModel[] + * @var ProductLanguageModel[]|null */ protected $languages; /** * A collection of country specific vat rates * - * @var ProductVatRateModel[] + * @var ProductVatRateModel[]|null */ protected $vatRates; /** * A collection of categories * - * @var ProductCategoryLinkModel[] + * @var ProductCategoryLinkModel[]|null */ protected $categories; /** * A collection of meta data * - * @var ProductMetaDataModelUpdatable[] + * @var ProductMetaDataModelUpdatable[]|null */ protected $metaData; /** @@ -175,20 +175,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @return string + * @return string|null */ - public function getCreatedAt() : string + public function getCreatedAt() : ?string { return $this->createdAt; } /** * A timestamp of when the product was created. The time should be formatted using ISO-8601 * - * @param string $createdAt + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(string $createdAt) : self + public function setCreatedAt(?string $createdAt) : self { $this->createdAt = $createdAt; return $this; @@ -217,20 +217,20 @@ public function setDefaultVatRate(?string $defaultVatRate) : self /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The visibility of this product. Supported values are: hidden, visible, pricelists * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -259,20 +259,20 @@ public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self /** * A valid URL to a web page with more information for this product * - * @return string + * @return string|null */ - public function getMoreInfoUrl() : string + public function getMoreInfoUrl() : ?string { return $this->moreInfoUrl; } /** * A valid URL to a web page with more information for this product * - * @param string $moreInfoUrl + * @param string|null $moreInfoUrl * * @return self */ - public function setMoreInfoUrl(string $moreInfoUrl) : self + public function setMoreInfoUrl(?string $moreInfoUrl) : self { $this->moreInfoUrl = $moreInfoUrl; return $this; @@ -343,20 +343,20 @@ public function setSortIndex(?int $sortIndex) : self /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The type of product. Either ”basic” or ”bundle”. Default is ”basic” * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -364,20 +364,20 @@ public function setType(string $type) : self /** * Should this product be watchable for customers when it is back in stock? * - * @return bool + * @return bool|null */ - public function getIsBackInStockWatchable() : bool + public function getIsBackInStockWatchable() : ?bool { return $this->isBackInStockWatchable; } /** * Should this product be watchable for customers when it is back in stock? * - * @param bool $isBackInStockWatchable + * @param bool|null $isBackInStockWatchable * * @return self */ - public function setIsBackInStockWatchable(bool $isBackInStockWatchable) : self + public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self { $this->isBackInStockWatchable = $isBackInStockWatchable; return $this; @@ -427,20 +427,20 @@ public function setAccounting(?int $accounting) : self /** * A collection of variants * - * @return ProductVariantPutRequestModel[] + * @return ProductVariantPutRequestModel[]|null */ - public function getVariants() : array + public function getVariants() : ?array { return $this->variants; } /** * A collection of variants * - * @param ProductVariantPutRequestModel[] $variants + * @param ProductVariantPutRequestModel[]|null $variants * * @return self */ - public function setVariants(array $variants) : self + public function setVariants(?array $variants) : self { $this->variants = $variants; return $this; @@ -469,20 +469,20 @@ public function setBundledProducts(?array $bundledProducts) : self /** * A collection of media files * - * @return ProductMediaFileLinkModel[] + * @return ProductMediaFileLinkModel[]|null */ - public function getMediaFiles() : array + public function getMediaFiles() : ?array { return $this->mediaFiles; } /** * A collection of media files * - * @param ProductMediaFileLinkModel[] $mediaFiles + * @param ProductMediaFileLinkModel[]|null $mediaFiles * * @return self */ - public function setMediaFiles(array $mediaFiles) : self + public function setMediaFiles(?array $mediaFiles) : self { $this->mediaFiles = $mediaFiles; return $this; @@ -490,20 +490,20 @@ public function setMediaFiles(array $mediaFiles) : self /** * A collection of product languages * - * @return ProductLanguageModel[] + * @return ProductLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * A collection of product languages * - * @param ProductLanguageModel[] $languages + * @param ProductLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; @@ -511,20 +511,20 @@ public function setLanguages(array $languages) : self /** * A collection of country specific vat rates * - * @return ProductVatRateModel[] + * @return ProductVatRateModel[]|null */ - public function getVatRates() : array + public function getVatRates() : ?array { return $this->vatRates; } /** * A collection of country specific vat rates * - * @param ProductVatRateModel[] $vatRates + * @param ProductVatRateModel[]|null $vatRates * * @return self */ - public function setVatRates(array $vatRates) : self + public function setVatRates(?array $vatRates) : self { $this->vatRates = $vatRates; return $this; @@ -532,20 +532,20 @@ public function setVatRates(array $vatRates) : self /** * A collection of categories * - * @return ProductCategoryLinkModel[] + * @return ProductCategoryLinkModel[]|null */ - public function getCategories() : array + public function getCategories() : ?array { return $this->categories; } /** * A collection of categories * - * @param ProductCategoryLinkModel[] $categories + * @param ProductCategoryLinkModel[]|null $categories * * @return self */ - public function setCategories(array $categories) : self + public function setCategories(?array $categories) : self { $this->categories = $categories; return $this; @@ -553,20 +553,20 @@ public function setCategories(array $categories) : self /** * A collection of meta data * - * @return ProductMetaDataModelUpdatable[] + * @return ProductMetaDataModelUpdatable[]|null */ - public function getMetaData() : array + public function getMetaData() : ?array { return $this->metaData; } /** * A collection of meta data * - * @param ProductMetaDataModelUpdatable[] $metaData + * @param ProductMetaDataModelUpdatable[]|null $metaData * * @return self */ - public function setMetaData(array $metaData) : self + public function setMetaData(?array $metaData) : self { $this->metaData = $metaData; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusLanguageModel.php b/src/Api/Generated/Model/ProductStockStatusLanguageModel.php index 0a012afe..cd8b36c7 100644 --- a/src/Api/Generated/Model/ProductStockStatusLanguageModel.php +++ b/src/Api/Generated/Model/ProductStockStatusLanguageModel.php @@ -7,32 +7,32 @@ class ProductStockStatusLanguageModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. * - * @var string + * @var string|null */ protected $langCode; /** * The name of this stock status * - * @var string + * @var string|null */ protected $name; /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this stock status * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this stock status * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusModelCollection.php b/src/Api/Generated/Model/ProductStockStatusModelCollection.php index 05ae3dc6..12799b7f 100644 --- a/src/Api/Generated/Model/ProductStockStatusModelCollection.php +++ b/src/Api/Generated/Model/ProductStockStatusModelCollection.php @@ -7,26 +7,26 @@ class ProductStockStatusModelCollection /** * A list of product stock statuses * - * @var ProductStockStatusResponseModel[] + * @var ProductStockStatusResponseModel[]|null */ protected $data; /** * A list of product stock statuses * - * @return ProductStockStatusResponseModel[] + * @return ProductStockStatusResponseModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of product stock statuses * - * @param ProductStockStatusResponseModel[] $data + * @param ProductStockStatusResponseModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusModelItem.php b/src/Api/Generated/Model/ProductStockStatusModelItem.php index 432457b3..eb34dacd 100644 --- a/src/Api/Generated/Model/ProductStockStatusModelItem.php +++ b/src/Api/Generated/Model/ProductStockStatusModelItem.php @@ -7,26 +7,26 @@ class ProductStockStatusModelItem /** * * - * @var ProductStockStatusResponseModel + * @var ProductStockStatusResponseModel|null */ protected $data; /** * * - * @return ProductStockStatusResponseModel + * @return ProductStockStatusResponseModel|null */ - public function getData() : ProductStockStatusResponseModel + public function getData() : ?ProductStockStatusResponseModel { return $this->data; } /** * * - * @param ProductStockStatusResponseModel $data + * @param ProductStockStatusResponseModel|null $data * * @return self */ - public function setData(ProductStockStatusResponseModel $data) : self + public function setData(?ProductStockStatusResponseModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusRequestModel.php b/src/Api/Generated/Model/ProductStockStatusRequestModel.php index 86a09392..d22ac5cc 100644 --- a/src/Api/Generated/Model/ProductStockStatusRequestModel.php +++ b/src/Api/Generated/Model/ProductStockStatusRequestModel.php @@ -7,19 +7,19 @@ class ProductStockStatusRequestModel /** * The stock status id * - * @var int + * @var int|null */ protected $stockStatusId; /** * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses * - * @var string + * @var string|null */ protected $idCode; /** * Sort index for this status * - * @var int + * @var int|null */ protected $sortIndex; /** @@ -31,38 +31,38 @@ class ProductStockStatusRequestModel /** * Is the product buyable when this status is set? * - * @var bool + * @var bool|null */ protected $productBuyable = true; /** * Should the product be displayed as "in stock" when this status is set? * - * @var bool + * @var bool|null */ protected $inStock = false; /** * * - * @var ProductStockStatusLanguageModel[] + * @var ProductStockStatusLanguageModel[]|null */ protected $languages; /** * The stock status id * - * @return int + * @return int|null */ - public function getStockStatusId() : int + public function getStockStatusId() : ?int { return $this->stockStatusId; } /** * The stock status id * - * @param int $stockStatusId + * @param int|null $stockStatusId * * @return self */ - public function setStockStatusId(int $stockStatusId) : self + public function setStockStatusId(?int $stockStatusId) : self { $this->stockStatusId = $stockStatusId; return $this; @@ -70,20 +70,20 @@ public function setStockStatusId(int $stockStatusId) : self /** * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses * - * @return string + * @return string|null */ - public function getIdCode() : string + public function getIdCode() : ?string { return $this->idCode; } /** * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses * - * @param string $idCode + * @param string|null $idCode * * @return self */ - public function setIdCode(string $idCode) : self + public function setIdCode(?string $idCode) : self { $this->idCode = $idCode; return $this; @@ -91,20 +91,20 @@ public function setIdCode(string $idCode) : self /** * Sort index for this status * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index for this status * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -133,20 +133,20 @@ public function setStockoutNewStatusId(?int $stockoutNewStatusId) : self /** * Is the product buyable when this status is set? * - * @return bool + * @return bool|null */ - public function getProductBuyable() : bool + public function getProductBuyable() : ?bool { return $this->productBuyable; } /** * Is the product buyable when this status is set? * - * @param bool $productBuyable + * @param bool|null $productBuyable * * @return self */ - public function setProductBuyable(bool $productBuyable) : self + public function setProductBuyable(?bool $productBuyable) : self { $this->productBuyable = $productBuyable; return $this; @@ -154,20 +154,20 @@ public function setProductBuyable(bool $productBuyable) : self /** * Should the product be displayed as "in stock" when this status is set? * - * @return bool + * @return bool|null */ - public function getInStock() : bool + public function getInStock() : ?bool { return $this->inStock; } /** * Should the product be displayed as "in stock" when this status is set? * - * @param bool $inStock + * @param bool|null $inStock * * @return self */ - public function setInStock(bool $inStock) : self + public function setInStock(?bool $inStock) : self { $this->inStock = $inStock; return $this; @@ -175,20 +175,20 @@ public function setInStock(bool $inStock) : self /** * * - * @return ProductStockStatusLanguageModel[] + * @return ProductStockStatusLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductStockStatusLanguageModel[] $languages + * @param ProductStockStatusLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModel.php b/src/Api/Generated/Model/ProductStockStatusResponseModel.php index 22a252de..b609ff4a 100644 --- a/src/Api/Generated/Model/ProductStockStatusResponseModel.php +++ b/src/Api/Generated/Model/ProductStockStatusResponseModel.php @@ -7,19 +7,19 @@ class ProductStockStatusResponseModel /** * The stock status id * - * @var int + * @var int|null */ protected $stockStatusId; /** * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses * - * @var string + * @var string|null */ protected $idCode; /** * Sort index for this status * - * @var int + * @var int|null */ protected $sortIndex; /** @@ -31,38 +31,38 @@ class ProductStockStatusResponseModel /** * Is the product buyable when this status is set? * - * @var bool + * @var bool|null */ protected $productBuyable = true; /** * Should the product be displayed as "in stock" when this status is set? * - * @var bool + * @var bool|null */ protected $inStock = false; /** * * - * @var ProductStockStatusResponseModelLanguages + * @var ProductStockStatusResponseModelLanguages|null */ protected $languages; /** * The stock status id * - * @return int + * @return int|null */ - public function getStockStatusId() : int + public function getStockStatusId() : ?int { return $this->stockStatusId; } /** * The stock status id * - * @param int $stockStatusId + * @param int|null $stockStatusId * * @return self */ - public function setStockStatusId(int $stockStatusId) : self + public function setStockStatusId(?int $stockStatusId) : self { $this->stockStatusId = $stockStatusId; return $this; @@ -70,20 +70,20 @@ public function setStockStatusId(int $stockStatusId) : self /** * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses * - * @return string + * @return string|null */ - public function getIdCode() : string + public function getIdCode() : ?string { return $this->idCode; } /** * The idCode of the status. Only standard statuses has idCodes set. It is also not permitted to change names for standard statuses * - * @param string $idCode + * @param string|null $idCode * * @return self */ - public function setIdCode(string $idCode) : self + public function setIdCode(?string $idCode) : self { $this->idCode = $idCode; return $this; @@ -91,20 +91,20 @@ public function setIdCode(string $idCode) : self /** * Sort index for this status * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index for this status * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -133,20 +133,20 @@ public function setStockoutNewStatusId(?int $stockoutNewStatusId) : self /** * Is the product buyable when this status is set? * - * @return bool + * @return bool|null */ - public function getProductBuyable() : bool + public function getProductBuyable() : ?bool { return $this->productBuyable; } /** * Is the product buyable when this status is set? * - * @param bool $productBuyable + * @param bool|null $productBuyable * * @return self */ - public function setProductBuyable(bool $productBuyable) : self + public function setProductBuyable(?bool $productBuyable) : self { $this->productBuyable = $productBuyable; return $this; @@ -154,20 +154,20 @@ public function setProductBuyable(bool $productBuyable) : self /** * Should the product be displayed as "in stock" when this status is set? * - * @return bool + * @return bool|null */ - public function getInStock() : bool + public function getInStock() : ?bool { return $this->inStock; } /** * Should the product be displayed as "in stock" when this status is set? * - * @param bool $inStock + * @param bool|null $inStock * * @return self */ - public function setInStock(bool $inStock) : self + public function setInStock(?bool $inStock) : self { $this->inStock = $inStock; return $this; @@ -175,20 +175,20 @@ public function setInStock(bool $inStock) : self /** * * - * @return ProductStockStatusResponseModelLanguages + * @return ProductStockStatusResponseModelLanguages|null */ - public function getLanguages() : ProductStockStatusResponseModelLanguages + public function getLanguages() : ?ProductStockStatusResponseModelLanguages { return $this->languages; } /** * * - * @param ProductStockStatusResponseModelLanguages $languages + * @param ProductStockStatusResponseModelLanguages|null $languages * * @return self */ - public function setLanguages(ProductStockStatusResponseModelLanguages $languages) : self + public function setLanguages(?ProductStockStatusResponseModelLanguages $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php index 7babd1a0..7a6ce469 100644 --- a/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php +++ b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php @@ -7,26 +7,26 @@ class ProductStockStatusResponseModelLanguages /** * * - * @var ProductStockStatusLanguageModel[] + * @var ProductStockStatusLanguageModel[]|null */ protected $data; /** * * - * @return ProductStockStatusLanguageModel[] + * @return ProductStockStatusLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * * - * @param ProductStockStatusLanguageModel[] $data + * @param ProductStockStatusLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagLanguageModel.php b/src/Api/Generated/Model/ProductTagLanguageModel.php index 7c7d8368..efe8d9e3 100644 --- a/src/Api/Generated/Model/ProductTagLanguageModel.php +++ b/src/Api/Generated/Model/ProductTagLanguageModel.php @@ -7,32 +7,32 @@ class ProductTagLanguageModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @var string + * @var string|null */ protected $langCode; /** * The name of this product tag * - * @var string + * @var string|null */ protected $name; /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this product tag * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this product tag * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductTagLinkModel.php b/src/Api/Generated/Model/ProductTagLinkModel.php index 7114b380..2a11c637 100644 --- a/src/Api/Generated/Model/ProductTagLinkModel.php +++ b/src/Api/Generated/Model/ProductTagLinkModel.php @@ -7,32 +7,32 @@ class ProductTagLinkModel /** * The tag option id this product should be listed in * - * @var int + * @var int|null */ protected $tagOptionId; /** * The tag id where the tag option belongs to * - * @var int + * @var int|null */ protected $tagId; /** * The tag option id this product should be listed in * - * @return int + * @return int|null */ - public function getTagOptionId() : int + public function getTagOptionId() : ?int { return $this->tagOptionId; } /** * The tag option id this product should be listed in * - * @param int $tagOptionId + * @param int|null $tagOptionId * * @return self */ - public function setTagOptionId(int $tagOptionId) : self + public function setTagOptionId(?int $tagOptionId) : self { $this->tagOptionId = $tagOptionId; return $this; @@ -40,20 +40,20 @@ public function setTagOptionId(int $tagOptionId) : self /** * The tag id where the tag option belongs to * - * @return int + * @return int|null */ - public function getTagId() : int + public function getTagId() : ?int { return $this->tagId; } /** * The tag id where the tag option belongs to * - * @param int $tagId + * @param int|null $tagId * * @return self */ - public function setTagId(int $tagId) : self + public function setTagId(?int $tagId) : self { $this->tagId = $tagId; return $this; diff --git a/src/Api/Generated/Model/ProductTagLinkModelCollection.php b/src/Api/Generated/Model/ProductTagLinkModelCollection.php index 1a9e5c8d..398a4606 100644 --- a/src/Api/Generated/Model/ProductTagLinkModelCollection.php +++ b/src/Api/Generated/Model/ProductTagLinkModelCollection.php @@ -7,26 +7,26 @@ class ProductTagLinkModelCollection /** * A collection of product tag links * - * @var ProductTagLinkModel[] + * @var ProductTagLinkModel[]|null */ protected $data; /** * A collection of product tag links * - * @return ProductTagLinkModel[] + * @return ProductTagLinkModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product tag links * - * @param ProductTagLinkModel[] $data + * @param ProductTagLinkModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagLinkModelItem.php b/src/Api/Generated/Model/ProductTagLinkModelItem.php index c04baf10..b539ffba 100644 --- a/src/Api/Generated/Model/ProductTagLinkModelItem.php +++ b/src/Api/Generated/Model/ProductTagLinkModelItem.php @@ -7,26 +7,26 @@ class ProductTagLinkModelItem /** * * - * @var ProductTagLinkModel + * @var ProductTagLinkModel|null */ protected $data; /** * * - * @return ProductTagLinkModel + * @return ProductTagLinkModel|null */ - public function getData() : ProductTagLinkModel + public function getData() : ?ProductTagLinkModel { return $this->data; } /** * * - * @param ProductTagLinkModel $data + * @param ProductTagLinkModel|null $data * * @return self */ - public function setData(ProductTagLinkModel $data) : self + public function setData(?ProductTagLinkModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php b/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php index 93185cff..7e96a7b0 100644 --- a/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php +++ b/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php @@ -7,26 +7,26 @@ class ProductTagLinkPostRequestModel /** * The tag option id this product should be listed in * - * @var int + * @var int|null */ protected $tagOptionId; /** * The tag option id this product should be listed in * - * @return int + * @return int|null */ - public function getTagOptionId() : int + public function getTagOptionId() : ?int { return $this->tagOptionId; } /** * The tag option id this product should be listed in * - * @param int $tagOptionId + * @param int|null $tagOptionId * * @return self */ - public function setTagOptionId(int $tagOptionId) : self + public function setTagOptionId(?int $tagOptionId) : self { $this->tagOptionId = $tagOptionId; return $this; diff --git a/src/Api/Generated/Model/ProductTagModel.php b/src/Api/Generated/Model/ProductTagModel.php index fc1c72e1..8349c9ab 100644 --- a/src/Api/Generated/Model/ProductTagModel.php +++ b/src/Api/Generated/Model/ProductTagModel.php @@ -7,38 +7,38 @@ class ProductTagModel /** * The tag Id * - * @var int + * @var int|null */ protected $tagId; /** * The tag type * - * @var string + * @var string|null */ protected $type; /** * * - * @var ProductTagLanguageModel[] + * @var ProductTagLanguageModel[]|null */ protected $languages; /** * The tag Id * - * @return int + * @return int|null */ - public function getTagId() : int + public function getTagId() : ?int { return $this->tagId; } /** * The tag Id * - * @param int $tagId + * @param int|null $tagId * * @return self */ - public function setTagId(int $tagId) : self + public function setTagId(?int $tagId) : self { $this->tagId = $tagId; return $this; @@ -46,20 +46,20 @@ public function setTagId(int $tagId) : self /** * The tag type * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The tag type * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -67,20 +67,20 @@ public function setType(string $type) : self /** * * - * @return ProductTagLanguageModel[] + * @return ProductTagLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductTagLanguageModel[] $languages + * @param ProductTagLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagModelCollection.php b/src/Api/Generated/Model/ProductTagModelCollection.php index 18c95ff6..d53bb095 100644 --- a/src/Api/Generated/Model/ProductTagModelCollection.php +++ b/src/Api/Generated/Model/ProductTagModelCollection.php @@ -7,26 +7,26 @@ class ProductTagModelCollection /** * A list of product tags * - * @var ProductTagModel[] + * @var ProductTagModel[]|null */ protected $data; /** * A list of product tags * - * @return ProductTagModel[] + * @return ProductTagModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of product tags * - * @param ProductTagModel[] $data + * @param ProductTagModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagModelItem.php b/src/Api/Generated/Model/ProductTagModelItem.php index 66debe9e..8af69c58 100644 --- a/src/Api/Generated/Model/ProductTagModelItem.php +++ b/src/Api/Generated/Model/ProductTagModelItem.php @@ -7,26 +7,26 @@ class ProductTagModelItem /** * * - * @var ProductTagModel + * @var ProductTagModel|null */ protected $data; /** * * - * @return ProductTagModel + * @return ProductTagModel|null */ - public function getData() : ProductTagModel + public function getData() : ?ProductTagModel { return $this->data; } /** * * - * @param ProductTagModel $data + * @param ProductTagModel|null $data * * @return self */ - public function setData(ProductTagModel $data) : self + public function setData(?ProductTagModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionLanguageModel.php b/src/Api/Generated/Model/ProductTagOptionLanguageModel.php index e911853b..a5de47af 100644 --- a/src/Api/Generated/Model/ProductTagOptionLanguageModel.php +++ b/src/Api/Generated/Model/ProductTagOptionLanguageModel.php @@ -7,32 +7,32 @@ class ProductTagOptionLanguageModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @var string + * @var string|null */ protected $langCode; /** * The value of this product tag option * - * @var string + * @var string|null */ protected $value; /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The value of this product tag option * - * @return string + * @return string|null */ - public function getValue() : string + public function getValue() : ?string { return $this->value; } /** * The value of this product tag option * - * @param string $value + * @param string|null $value * * @return self */ - public function setValue(string $value) : self + public function setValue(?string $value) : self { $this->value = $value; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionModel.php b/src/Api/Generated/Model/ProductTagOptionModel.php index 37f0ae8b..2d2f367c 100644 --- a/src/Api/Generated/Model/ProductTagOptionModel.php +++ b/src/Api/Generated/Model/ProductTagOptionModel.php @@ -7,44 +7,44 @@ class ProductTagOptionModel /** * The option Id * - * @var int + * @var int|null */ protected $tagOptionId; /** * The option value type. This will be only set if the tag type is set to `boolean`. The values for tag of type `option` are stored in the nested language objects. * - * @var bool + * @var bool|null */ protected $value; /** * The sort index of the option * - * @var int + * @var int|null */ protected $sortIndex; /** * * - * @var ProductTagOptionLanguageModel[] + * @var ProductTagOptionLanguageModel[]|null */ protected $languages; /** * The option Id * - * @return int + * @return int|null */ - public function getTagOptionId() : int + public function getTagOptionId() : ?int { return $this->tagOptionId; } /** * The option Id * - * @param int $tagOptionId + * @param int|null $tagOptionId * * @return self */ - public function setTagOptionId(int $tagOptionId) : self + public function setTagOptionId(?int $tagOptionId) : self { $this->tagOptionId = $tagOptionId; return $this; @@ -52,20 +52,20 @@ public function setTagOptionId(int $tagOptionId) : self /** * The option value type. This will be only set if the tag type is set to `boolean`. The values for tag of type `option` are stored in the nested language objects. * - * @return bool + * @return bool|null */ - public function getValue() : bool + public function getValue() : ?bool { return $this->value; } /** * The option value type. This will be only set if the tag type is set to `boolean`. The values for tag of type `option` are stored in the nested language objects. * - * @param bool $value + * @param bool|null $value * * @return self */ - public function setValue(bool $value) : self + public function setValue(?bool $value) : self { $this->value = $value; return $this; @@ -73,20 +73,20 @@ public function setValue(bool $value) : self /** * The sort index of the option * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of the option * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -94,20 +94,20 @@ public function setSortIndex(int $sortIndex) : self /** * * - * @return ProductTagOptionLanguageModel[] + * @return ProductTagOptionLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductTagOptionLanguageModel[] $languages + * @param ProductTagOptionLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionModelCollection.php b/src/Api/Generated/Model/ProductTagOptionModelCollection.php index 79d87884..fdec39ad 100644 --- a/src/Api/Generated/Model/ProductTagOptionModelCollection.php +++ b/src/Api/Generated/Model/ProductTagOptionModelCollection.php @@ -7,26 +7,26 @@ class ProductTagOptionModelCollection /** * A list of product tag options * - * @var ProductTagOptionModel[] + * @var ProductTagOptionModel[]|null */ protected $data; /** * A list of product tag options * - * @return ProductTagOptionModel[] + * @return ProductTagOptionModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of product tag options * - * @param ProductTagOptionModel[] $data + * @param ProductTagOptionModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionModelItem.php b/src/Api/Generated/Model/ProductTagOptionModelItem.php index b17afb82..ca48cb12 100644 --- a/src/Api/Generated/Model/ProductTagOptionModelItem.php +++ b/src/Api/Generated/Model/ProductTagOptionModelItem.php @@ -7,26 +7,26 @@ class ProductTagOptionModelItem /** * * - * @var ProductTagOptionModel + * @var ProductTagOptionModel|null */ protected $data; /** * * - * @return ProductTagOptionModel + * @return ProductTagOptionModel|null */ - public function getData() : ProductTagOptionModel + public function getData() : ?ProductTagOptionModel { return $this->data; } /** * * - * @param ProductTagOptionModel $data + * @param ProductTagOptionModel|null $data * * @return self */ - public function setData(ProductTagOptionModel $data) : self + public function setData(?ProductTagOptionModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php b/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php index a0a0b33a..e0354fe2 100644 --- a/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php @@ -7,32 +7,32 @@ class ProductTagOptionPatchRequestModel /** * The sort index of the option * - * @var int + * @var int|null */ protected $sortIndex; /** * * - * @var ProductTagOptionLanguageModel[] + * @var ProductTagOptionLanguageModel[]|null */ protected $languages; /** * The sort index of the option * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of the option * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -40,20 +40,20 @@ public function setSortIndex(int $sortIndex) : self /** * * - * @return ProductTagOptionLanguageModel[] + * @return ProductTagOptionLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductTagOptionLanguageModel[] $languages + * @param ProductTagOptionLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php b/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php index 3ce8cc32..86d4af48 100644 --- a/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php +++ b/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php @@ -7,32 +7,32 @@ class ProductTagOptionPostRequestModel /** * The sort index of the option * - * @var int + * @var int|null */ protected $sortIndex; /** * * - * @var ProductTagOptionLanguageModel[] + * @var ProductTagOptionLanguageModel[]|null */ protected $languages; /** * The sort index of the option * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of the option * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -40,20 +40,20 @@ public function setSortIndex(int $sortIndex) : self /** * * - * @return ProductTagOptionLanguageModel[] + * @return ProductTagOptionLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductTagOptionLanguageModel[] $languages + * @param ProductTagOptionLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php b/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php index 29d01169..2408ac0f 100644 --- a/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php +++ b/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php @@ -7,32 +7,32 @@ class ProductTagOptionPutRequestModel /** * The sort index of the option * - * @var int + * @var int|null */ protected $sortIndex; /** * * - * @var ProductTagOptionLanguageModel[] + * @var ProductTagOptionLanguageModel[]|null */ protected $languages; /** * The sort index of the option * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort index of the option * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -40,20 +40,20 @@ public function setSortIndex(int $sortIndex) : self /** * * - * @return ProductTagOptionLanguageModel[] + * @return ProductTagOptionLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductTagOptionLanguageModel[] $languages + * @param ProductTagOptionLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagPatchRequestModel.php b/src/Api/Generated/Model/ProductTagPatchRequestModel.php index 017a7881..050911c4 100644 --- a/src/Api/Generated/Model/ProductTagPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductTagPatchRequestModel.php @@ -7,38 +7,38 @@ class ProductTagPatchRequestModel /** * The tag name * - * @var string + * @var string|null */ protected $name; /** * The tag type, valid types are `option`, `boolean` * - * @var string + * @var string|null */ protected $type; /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @var ProductTagLanguageModel[] + * @var ProductTagLanguageModel[]|null */ protected $languages; /** * The tag name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The tag name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -46,20 +46,20 @@ public function setName(string $name) : self /** * The tag type, valid types are `option`, `boolean` * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The tag type, valid types are `option`, `boolean` * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -67,20 +67,20 @@ public function setType(string $type) : self /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @return ProductTagLanguageModel[] + * @return ProductTagLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @param ProductTagLanguageModel[] $languages + * @param ProductTagLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagPostRequestModel.php b/src/Api/Generated/Model/ProductTagPostRequestModel.php index 2a18a435..af409883 100644 --- a/src/Api/Generated/Model/ProductTagPostRequestModel.php +++ b/src/Api/Generated/Model/ProductTagPostRequestModel.php @@ -7,38 +7,38 @@ class ProductTagPostRequestModel /** * The tag name * - * @var string + * @var string|null */ protected $name; /** * The tag type, valid types are `option`, `boolean` * - * @var string + * @var string|null */ protected $type; /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @var ProductTagLanguageModel[] + * @var ProductTagLanguageModel[]|null */ protected $languages; /** * The tag name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The tag name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -46,20 +46,20 @@ public function setName(string $name) : self /** * The tag type, valid types are `option`, `boolean` * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The tag type, valid types are `option`, `boolean` * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -67,20 +67,20 @@ public function setType(string $type) : self /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @return ProductTagLanguageModel[] + * @return ProductTagLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @param ProductTagLanguageModel[] $languages + * @param ProductTagLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductTagPutRequestModel.php b/src/Api/Generated/Model/ProductTagPutRequestModel.php index 286d09c3..e9021f79 100644 --- a/src/Api/Generated/Model/ProductTagPutRequestModel.php +++ b/src/Api/Generated/Model/ProductTagPutRequestModel.php @@ -7,38 +7,38 @@ class ProductTagPutRequestModel /** * The tag name * - * @var string + * @var string|null */ protected $name; /** * The tag type, valid types are `option`, `boolean` * - * @var string + * @var string|null */ protected $type; /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @var ProductTagLanguageModel[] + * @var ProductTagLanguageModel[]|null */ protected $languages; /** * The tag name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The tag name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -46,20 +46,20 @@ public function setName(string $name) : self /** * The tag type, valid types are `option`, `boolean` * - * @return string + * @return string|null */ - public function getType() : string + public function getType() : ?string { return $this->type; } /** * The tag type, valid types are `option`, `boolean` * - * @param string $type + * @param string|null $type * * @return self */ - public function setType(string $type) : self + public function setType(?string $type) : self { $this->type = $type; return $this; @@ -67,20 +67,20 @@ public function setType(string $type) : self /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @return ProductTagLanguageModel[] + * @return ProductTagLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * An array of translations consisting of the language code `langCode` and the tag name. You need to define `1` language object at minimum. * - * @param ProductTagLanguageModel[] $languages + * @param ProductTagLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductUnitLanguageModel.php b/src/Api/Generated/Model/ProductUnitLanguageModel.php index c470aa1b..818bc473 100644 --- a/src/Api/Generated/Model/ProductUnitLanguageModel.php +++ b/src/Api/Generated/Model/ProductUnitLanguageModel.php @@ -7,38 +7,38 @@ class ProductUnitLanguageModel /** * The language code for this language * - * @var string + * @var string|null */ protected $langCode; /** * The name of this unit type * - * @var string + * @var string|null */ protected $name; /** * The symbol to use when counting this unit. For example ”pcs.” * - * @var string + * @var string|null */ protected $symbol; /** * The language code for this language * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The language code for this language * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -46,20 +46,20 @@ public function setLangCode(string $langCode) : self /** * The name of this unit type * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this unit type * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -67,20 +67,20 @@ public function setName(string $name) : self /** * The symbol to use when counting this unit. For example ”pcs.” * - * @return string + * @return string|null */ - public function getSymbol() : string + public function getSymbol() : ?string { return $this->symbol; } /** * The symbol to use when counting this unit. For example ”pcs.” * - * @param string $symbol + * @param string|null $symbol * * @return self */ - public function setSymbol(string $symbol) : self + public function setSymbol(?string $symbol) : self { $this->symbol = $symbol; return $this; diff --git a/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php b/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php index c5037a4d..91ce29e8 100644 --- a/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php +++ b/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php @@ -7,26 +7,26 @@ class ProductUnitLanguageModelCollection /** * A collection of product unit languages * - * @var ProductUnitLanguageModel[] + * @var ProductUnitLanguageModel[]|null */ protected $data; /** * A collection of product unit languages * - * @return ProductUnitLanguageModel[] + * @return ProductUnitLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product unit languages * - * @param ProductUnitLanguageModel[] $data + * @param ProductUnitLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductUnitModel.php b/src/Api/Generated/Model/ProductUnitModel.php index 20430c43..a3446ceb 100644 --- a/src/Api/Generated/Model/ProductUnitModel.php +++ b/src/Api/Generated/Model/ProductUnitModel.php @@ -7,7 +7,7 @@ class ProductUnitModel /** * The units id * - * @var int + * @var int|null */ protected $unitId; /** @@ -25,26 +25,26 @@ class ProductUnitModel /** * * - * @var ProductUnitLanguageModelCollection + * @var ProductUnitLanguageModelCollection|null */ protected $languages; /** * The units id * - * @return int + * @return int|null */ - public function getUnitId() : int + public function getUnitId() : ?int { return $this->unitId; } /** * The units id * - * @param int $unitId + * @param int|null $unitId * * @return self */ - public function setUnitId(int $unitId) : self + public function setUnitId(?int $unitId) : self { $this->unitId = $unitId; return $this; @@ -94,20 +94,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * * - * @return ProductUnitLanguageModelCollection + * @return ProductUnitLanguageModelCollection|null */ - public function getLanguages() : ProductUnitLanguageModelCollection + public function getLanguages() : ?ProductUnitLanguageModelCollection { return $this->languages; } /** * * - * @param ProductUnitLanguageModelCollection $languages + * @param ProductUnitLanguageModelCollection|null $languages * * @return self */ - public function setLanguages(ProductUnitLanguageModelCollection $languages) : self + public function setLanguages(?ProductUnitLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductUnitModelCollection.php b/src/Api/Generated/Model/ProductUnitModelCollection.php index 3d052f6b..e7659f7e 100644 --- a/src/Api/Generated/Model/ProductUnitModelCollection.php +++ b/src/Api/Generated/Model/ProductUnitModelCollection.php @@ -7,26 +7,26 @@ class ProductUnitModelCollection /** * A collection of product units * - * @var ProductUnitModel[] + * @var ProductUnitModel[]|null */ protected $data; /** * A collection of product units * - * @return ProductUnitModel[] + * @return ProductUnitModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product units * - * @param ProductUnitModel[] $data + * @param ProductUnitModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductUnitModelItem.php b/src/Api/Generated/Model/ProductUnitModelItem.php index fe803e0d..afb5eeaf 100644 --- a/src/Api/Generated/Model/ProductUnitModelItem.php +++ b/src/Api/Generated/Model/ProductUnitModelItem.php @@ -7,26 +7,26 @@ class ProductUnitModelItem /** * * - * @var ProductUnitModel + * @var ProductUnitModel|null */ protected $data; /** * * - * @return ProductUnitModel + * @return ProductUnitModel|null */ - public function getData() : ProductUnitModel + public function getData() : ?ProductUnitModel { return $this->data; } /** * * - * @param ProductUnitModel $data + * @param ProductUnitModel|null $data * * @return self */ - public function setData(ProductUnitModel $data) : self + public function setData(?ProductUnitModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductUnitModelUpdatable.php b/src/Api/Generated/Model/ProductUnitModelUpdatable.php index 7ea1ec31..59617e91 100644 --- a/src/Api/Generated/Model/ProductUnitModelUpdatable.php +++ b/src/Api/Generated/Model/ProductUnitModelUpdatable.php @@ -7,7 +7,7 @@ class ProductUnitModelUpdatable /** * The units id * - * @var int + * @var int|null */ protected $unitId; /** @@ -25,26 +25,26 @@ class ProductUnitModelUpdatable /** * * - * @var ProductUnitLanguageModel[] + * @var ProductUnitLanguageModel[]|null */ protected $languages; /** * The units id * - * @return int + * @return int|null */ - public function getUnitId() : int + public function getUnitId() : ?int { return $this->unitId; } /** * The units id * - * @param int $unitId + * @param int|null $unitId * * @return self */ - public function setUnitId(int $unitId) : self + public function setUnitId(?int $unitId) : self { $this->unitId = $unitId; return $this; @@ -94,20 +94,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * * - * @return ProductUnitLanguageModel[] + * @return ProductUnitLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param ProductUnitLanguageModel[] $languages + * @param ProductUnitLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php b/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php index b6ec7c3c..9d8a10fa 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php @@ -7,32 +7,32 @@ class ProductVariantAttributeLanguageModel /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @var string + * @var string|null */ protected $langCode; /** * The name of this attribute * - * @var string + * @var string|null */ protected $name; /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this attribute * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this attribute * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModel.php b/src/Api/Generated/Model/ProductVariantAttributeModel.php index 2eaac519..3d164806 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModel.php @@ -7,7 +7,7 @@ class ProductVariantAttributeModel /** * The id for this attribute * - * @var int + * @var int|null */ protected $attributeId; /** @@ -25,26 +25,26 @@ class ProductVariantAttributeModel /** * A collection of attribute languages * - * @var ProductVariantAttributeModelLanguages + * @var ProductVariantAttributeModelLanguages|null */ protected $languages; /** * The id for this attribute * - * @return int + * @return int|null */ - public function getAttributeId() : int + public function getAttributeId() : ?int { return $this->attributeId; } /** * The id for this attribute * - * @param int $attributeId + * @param int|null $attributeId * * @return self */ - public function setAttributeId(int $attributeId) : self + public function setAttributeId(?int $attributeId) : self { $this->attributeId = $attributeId; return $this; @@ -94,20 +94,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * A collection of attribute languages * - * @return ProductVariantAttributeModelLanguages + * @return ProductVariantAttributeModelLanguages|null */ - public function getLanguages() : ProductVariantAttributeModelLanguages + public function getLanguages() : ?ProductVariantAttributeModelLanguages { return $this->languages; } /** * A collection of attribute languages * - * @param ProductVariantAttributeModelLanguages $languages + * @param ProductVariantAttributeModelLanguages|null $languages * * @return self */ - public function setLanguages(ProductVariantAttributeModelLanguages $languages) : self + public function setLanguages(?ProductVariantAttributeModelLanguages $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php b/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php index 77187c86..80ca70c6 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php @@ -7,26 +7,26 @@ class ProductVariantAttributeModelCollection /** * A collection of attribute values * - * @var ProductVariantAttributeModel[] + * @var ProductVariantAttributeModel[]|null */ protected $data; /** * A collection of attribute values * - * @return ProductVariantAttributeModel[] + * @return ProductVariantAttributeModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of attribute values * - * @param ProductVariantAttributeModel[] $data + * @param ProductVariantAttributeModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelItem.php b/src/Api/Generated/Model/ProductVariantAttributeModelItem.php index 7858bd07..e0b9817c 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelItem.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelItem.php @@ -7,26 +7,26 @@ class ProductVariantAttributeModelItem /** * * - * @var ProductVariantAttributeModel + * @var ProductVariantAttributeModel|null */ protected $data; /** * * - * @return ProductVariantAttributeModel + * @return ProductVariantAttributeModel|null */ - public function getData() : ProductVariantAttributeModel + public function getData() : ?ProductVariantAttributeModel { return $this->data; } /** * * - * @param ProductVariantAttributeModel $data + * @param ProductVariantAttributeModel|null $data * * @return self */ - public function setData(ProductVariantAttributeModel $data) : self + public function setData(?ProductVariantAttributeModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php b/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php index fdac1c02..5d850149 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php @@ -7,26 +7,26 @@ class ProductVariantAttributeModelLanguages /** * * - * @var ProductVariantAttributeLanguageModel[] + * @var ProductVariantAttributeLanguageModel[]|null */ protected $data; /** * * - * @return ProductVariantAttributeLanguageModel[] + * @return ProductVariantAttributeLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * * - * @param ProductVariantAttributeLanguageModel[] $data + * @param ProductVariantAttributeLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php index 91690725..c6d16e6c 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php @@ -7,7 +7,7 @@ class ProductVariantAttributeModelUpdatable /** * * - * @var int + * @var int|null */ protected $attributeId; /** @@ -25,26 +25,26 @@ class ProductVariantAttributeModelUpdatable /** * A collection of attribute languages * - * @var ProductVariantAttributeLanguageModel[] + * @var ProductVariantAttributeLanguageModel[]|null */ protected $languages; /** * * - * @return int + * @return int|null */ - public function getAttributeId() : int + public function getAttributeId() : ?int { return $this->attributeId; } /** * * - * @param int $attributeId + * @param int|null $attributeId * * @return self */ - public function setAttributeId(int $attributeId) : self + public function setAttributeId(?int $attributeId) : self { $this->attributeId = $attributeId; return $this; @@ -94,20 +94,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * A collection of attribute languages * - * @return ProductVariantAttributeLanguageModel[] + * @return ProductVariantAttributeLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * A collection of attribute languages * - * @param ProductVariantAttributeLanguageModel[] $languages + * @param ProductVariantAttributeLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php index 71f5ae1f..bbe558ca 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php @@ -7,32 +7,32 @@ class ProductVariantAttributeValueLanguageModel /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @var string + * @var string|null */ protected $langCode; /** * The name of this attribute value * - * @var string + * @var string|null */ protected $name; /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this attribute value * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this attribute value * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php index cfc7b29b..0bda37c3 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php @@ -7,7 +7,7 @@ class ProductVariantAttributeValueModel /** * The id for this attribute value * - * @var int + * @var int|null */ protected $attributeValueId; /** @@ -25,38 +25,38 @@ class ProductVariantAttributeValueModel /** * The suggested suffix for new Variants using this attribute value * - * @var string + * @var string|null */ protected $skuSuffix; /** * The sort order for this attribute value * - * @var int + * @var int|null */ protected $sortIndex = 0; /** * A collection of attribute value languages * - * @var ProductVariantAttributeValueModelLanguages + * @var ProductVariantAttributeValueModelLanguages|null */ protected $languages; /** * The id for this attribute value * - * @return int + * @return int|null */ - public function getAttributeValueId() : int + public function getAttributeValueId() : ?int { return $this->attributeValueId; } /** * The id for this attribute value * - * @param int $attributeValueId + * @param int|null $attributeValueId * * @return self */ - public function setAttributeValueId(int $attributeValueId) : self + public function setAttributeValueId(?int $attributeValueId) : self { $this->attributeValueId = $attributeValueId; return $this; @@ -106,20 +106,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The suggested suffix for new Variants using this attribute value * - * @return string + * @return string|null */ - public function getSkuSuffix() : string + public function getSkuSuffix() : ?string { return $this->skuSuffix; } /** * The suggested suffix for new Variants using this attribute value * - * @param string $skuSuffix + * @param string|null $skuSuffix * * @return self */ - public function setSkuSuffix(string $skuSuffix) : self + public function setSkuSuffix(?string $skuSuffix) : self { $this->skuSuffix = $skuSuffix; return $this; @@ -127,20 +127,20 @@ public function setSkuSuffix(string $skuSuffix) : self /** * The sort order for this attribute value * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort order for this attribute value * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -148,20 +148,20 @@ public function setSortIndex(int $sortIndex) : self /** * A collection of attribute value languages * - * @return ProductVariantAttributeValueModelLanguages + * @return ProductVariantAttributeValueModelLanguages|null */ - public function getLanguages() : ProductVariantAttributeValueModelLanguages + public function getLanguages() : ?ProductVariantAttributeValueModelLanguages { return $this->languages; } /** * A collection of attribute value languages * - * @param ProductVariantAttributeValueModelLanguages $languages + * @param ProductVariantAttributeValueModelLanguages|null $languages * * @return self */ - public function setLanguages(ProductVariantAttributeValueModelLanguages $languages) : self + public function setLanguages(?ProductVariantAttributeValueModelLanguages $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php index 02f42d76..ce56928e 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php @@ -7,26 +7,26 @@ class ProductVariantAttributeValueModelCollection /** * A collection of attribute values * - * @var ProductVariantAttributeValueModel[] + * @var ProductVariantAttributeValueModel[]|null */ protected $data; /** * A collection of attribute values * - * @return ProductVariantAttributeValueModel[] + * @return ProductVariantAttributeValueModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of attribute values * - * @param ProductVariantAttributeValueModel[] $data + * @param ProductVariantAttributeValueModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php index 09e9e53d..fd2547ae 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php @@ -7,26 +7,26 @@ class ProductVariantAttributeValueModelItem /** * * - * @var ProductVariantAttributeValueModel + * @var ProductVariantAttributeValueModel|null */ protected $data; /** * * - * @return ProductVariantAttributeValueModel + * @return ProductVariantAttributeValueModel|null */ - public function getData() : ProductVariantAttributeValueModel + public function getData() : ?ProductVariantAttributeValueModel { return $this->data; } /** * * - * @param ProductVariantAttributeValueModel $data + * @param ProductVariantAttributeValueModel|null $data * * @return self */ - public function setData(ProductVariantAttributeValueModel $data) : self + public function setData(?ProductVariantAttributeValueModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php index ce246822..a448cf18 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php @@ -7,26 +7,26 @@ class ProductVariantAttributeValueModelLanguages /** * * - * @var ProductVariantAttributeValueLanguageModel[] + * @var ProductVariantAttributeValueLanguageModel[]|null */ protected $data; /** * * - * @return ProductVariantAttributeValueLanguageModel[] + * @return ProductVariantAttributeValueLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * * - * @param ProductVariantAttributeValueLanguageModel[] $data + * @param ProductVariantAttributeValueLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php index 33886dda..0f39e040 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php @@ -19,19 +19,19 @@ class ProductVariantAttributeValueModelUpdatable /** * The suggested suffix for new Variants using this attribute value * - * @var string + * @var string|null */ protected $skuSuffix; /** * The sort order for this attribute value * - * @var int + * @var int|null */ protected $sortIndex = 0; /** * A collection of attribute value languages * - * @var ProductVariantAttributeValueLanguageModel[] + * @var ProductVariantAttributeValueLanguageModel[]|null */ protected $languages; /** @@ -79,20 +79,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The suggested suffix for new Variants using this attribute value * - * @return string + * @return string|null */ - public function getSkuSuffix() : string + public function getSkuSuffix() : ?string { return $this->skuSuffix; } /** * The suggested suffix for new Variants using this attribute value * - * @param string $skuSuffix + * @param string|null $skuSuffix * * @return self */ - public function setSkuSuffix(string $skuSuffix) : self + public function setSkuSuffix(?string $skuSuffix) : self { $this->skuSuffix = $skuSuffix; return $this; @@ -100,20 +100,20 @@ public function setSkuSuffix(string $skuSuffix) : self /** * The sort order for this attribute value * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * The sort order for this attribute value * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -121,20 +121,20 @@ public function setSortIndex(int $sortIndex) : self /** * A collection of attribute value languages * - * @return ProductVariantAttributeValueLanguageModel[] + * @return ProductVariantAttributeValueLanguageModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * A collection of attribute value languages * - * @param ProductVariantAttributeValueLanguageModel[] $languages + * @param ProductVariantAttributeValueLanguageModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ProductVariantModelCollection.php b/src/Api/Generated/Model/ProductVariantModelCollection.php index 59cec00c..16dbae9e 100644 --- a/src/Api/Generated/Model/ProductVariantModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantModelCollection.php @@ -7,26 +7,26 @@ class ProductVariantModelCollection /** * A collection of product variants * - * @var ProductVariantResponseModel[] + * @var ProductVariantResponseModel[]|null */ protected $data; /** * A collection of product variants * - * @return ProductVariantResponseModel[] + * @return ProductVariantResponseModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product variants * - * @param ProductVariantResponseModel[] $data + * @param ProductVariantResponseModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantModelItem.php b/src/Api/Generated/Model/ProductVariantModelItem.php index 80d895be..025fa2b7 100644 --- a/src/Api/Generated/Model/ProductVariantModelItem.php +++ b/src/Api/Generated/Model/ProductVariantModelItem.php @@ -7,26 +7,26 @@ class ProductVariantModelItem /** * * - * @var ProductVariantResponseModel + * @var ProductVariantResponseModel|null */ protected $data; /** * * - * @return ProductVariantResponseModel + * @return ProductVariantResponseModel|null */ - public function getData() : ProductVariantResponseModel + public function getData() : ?ProductVariantResponseModel { return $this->data; } /** * * - * @param ProductVariantResponseModel $data + * @param ProductVariantResponseModel|null $data * * @return self */ - public function setData(ProductVariantResponseModel $data) : self + public function setData(?ProductVariantResponseModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php index 389b1dde..2e73d795 100644 --- a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php @@ -7,7 +7,7 @@ class ProductVariantPatchRequestModel /** * The product variants SKU (stock keeping unit) * - * @var string + * @var string|null */ protected $sku; /** @@ -91,20 +91,20 @@ class ProductVariantPatchRequestModel /** * The product variants SKU (stock keeping unit) * - * @return string + * @return string|null */ - public function getSku() : string + public function getSku() : ?string { return $this->sku; } /** * The product variants SKU (stock keeping unit) * - * @param string $sku + * @param string|null $sku * * @return self */ - public function setSku(string $sku) : self + public function setSku(?string $sku) : self { $this->sku = $sku; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPriceModel.php b/src/Api/Generated/Model/ProductVariantPriceModel.php index 7ffd562c..1f268fb8 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModel.php +++ b/src/Api/Generated/Model/ProductVariantPriceModel.php @@ -7,7 +7,7 @@ class ProductVariantPriceModel /** * The pricelist this price is for * - * @var int + * @var int|null */ protected $pricelistId; /** @@ -25,7 +25,7 @@ class ProductVariantPriceModel /** * The price excluding vat * - * @var float + * @var float|null */ protected $priceExVat = 0; /** @@ -37,26 +37,26 @@ class ProductVariantPriceModel /** * A collection of volume prices * - * @var ProductVariantVolumePriceModel[] + * @var ProductVariantVolumePriceModel[]|null */ protected $volumePrices; /** * The pricelist this price is for * - * @return int + * @return int|null */ - public function getPricelistId() : int + public function getPricelistId() : ?int { return $this->pricelistId; } /** * The pricelist this price is for * - * @param int $pricelistId + * @param int|null $pricelistId * * @return self */ - public function setPricelistId(int $pricelistId) : self + public function setPricelistId(?int $pricelistId) : self { $this->pricelistId = $pricelistId; return $this; @@ -106,20 +106,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The price excluding vat * - * @return float + * @return float|null */ - public function getPriceExVat() : float + public function getPriceExVat() : ?float { return $this->priceExVat; } /** * The price excluding vat * - * @param float $priceExVat + * @param float|null $priceExVat * * @return self */ - public function setPriceExVat(float $priceExVat) : self + public function setPriceExVat(?float $priceExVat) : self { $this->priceExVat = $priceExVat; return $this; @@ -148,20 +148,20 @@ public function setSpecialPriceExVat(?float $specialPriceExVat) : self /** * A collection of volume prices * - * @return ProductVariantVolumePriceModel[] + * @return ProductVariantVolumePriceModel[]|null */ - public function getVolumePrices() : array + public function getVolumePrices() : ?array { return $this->volumePrices; } /** * A collection of volume prices * - * @param ProductVariantVolumePriceModel[] $volumePrices + * @param ProductVariantVolumePriceModel[]|null $volumePrices * * @return self */ - public function setVolumePrices(array $volumePrices) : self + public function setVolumePrices(?array $volumePrices) : self { $this->volumePrices = $volumePrices; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPriceModelCollection.php b/src/Api/Generated/Model/ProductVariantPriceModelCollection.php index 79f0ee81..71bb441b 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantPriceModelCollection.php @@ -7,26 +7,26 @@ class ProductVariantPriceModelCollection /** * A collection of product variants * - * @var ProductVariantPriceModel[] + * @var ProductVariantPriceModel[]|null */ protected $data; /** * A collection of product variants * - * @return ProductVariantPriceModel[] + * @return ProductVariantPriceModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product variants * - * @param ProductVariantPriceModel[] $data + * @param ProductVariantPriceModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPriceModelItem.php b/src/Api/Generated/Model/ProductVariantPriceModelItem.php index ea31d92e..3bd4d436 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModelItem.php +++ b/src/Api/Generated/Model/ProductVariantPriceModelItem.php @@ -7,26 +7,26 @@ class ProductVariantPriceModelItem /** * * - * @var ProductVariantPriceModel + * @var ProductVariantPriceModel|null */ protected $data; /** * * - * @return ProductVariantPriceModel + * @return ProductVariantPriceModel|null */ - public function getData() : ProductVariantPriceModel + public function getData() : ?ProductVariantPriceModel { return $this->data; } /** * * - * @param ProductVariantPriceModel $data + * @param ProductVariantPriceModel|null $data * * @return self */ - public function setData(ProductVariantPriceModel $data) : self + public function setData(?ProductVariantPriceModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantPutRequestModel.php b/src/Api/Generated/Model/ProductVariantPutRequestModel.php index 2bed52fb..86a8deba 100644 --- a/src/Api/Generated/Model/ProductVariantPutRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPutRequestModel.php @@ -7,7 +7,7 @@ class ProductVariantPutRequestModel /** * The product variants SKU (stock keeping unit) * - * @var string + * @var string|null */ protected $sku; /** @@ -91,20 +91,20 @@ class ProductVariantPutRequestModel /** * The product variants SKU (stock keeping unit) * - * @return string + * @return string|null */ - public function getSku() : string + public function getSku() : ?string { return $this->sku; } /** * The product variants SKU (stock keeping unit) * - * @param string $sku + * @param string|null $sku * * @return self */ - public function setSku(string $sku) : self + public function setSku(?string $sku) : self { $this->sku = $sku; return $this; diff --git a/src/Api/Generated/Model/ProductVariantRequestModel.php b/src/Api/Generated/Model/ProductVariantRequestModel.php index c54a61e4..5b4e4654 100644 --- a/src/Api/Generated/Model/ProductVariantRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantRequestModel.php @@ -7,7 +7,7 @@ class ProductVariantRequestModel /** * The product variants SKU (stock keeping unit) * - * @var string + * @var string|null */ protected $sku; /** @@ -79,7 +79,7 @@ class ProductVariantRequestModel /** * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * - * @var int[] + * @var int[]|null */ protected $attributeValueLinks; /** @@ -91,20 +91,20 @@ class ProductVariantRequestModel /** * The product variants SKU (stock keeping unit) * - * @return string + * @return string|null */ - public function getSku() : string + public function getSku() : ?string { return $this->sku; } /** * The product variants SKU (stock keeping unit) * - * @param string $sku + * @param string|null $sku * * @return self */ - public function setSku(string $sku) : self + public function setSku(?string $sku) : self { $this->sku = $sku; return $this; @@ -343,20 +343,20 @@ public function setImageFileId(?int $imageFileId) : self /** * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * - * @return int[] + * @return int[]|null */ - public function getAttributeValueLinks() : array + public function getAttributeValueLinks() : ?array { return $this->attributeValueLinks; } /** * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * - * @param int[] $attributeValueLinks + * @param int[]|null $attributeValueLinks * * @return self */ - public function setAttributeValueLinks(array $attributeValueLinks) : self + public function setAttributeValueLinks(?array $attributeValueLinks) : self { $this->attributeValueLinks = $attributeValueLinks; return $this; diff --git a/src/Api/Generated/Model/ProductVariantResponseModel.php b/src/Api/Generated/Model/ProductVariantResponseModel.php index 25e14680..845c4319 100644 --- a/src/Api/Generated/Model/ProductVariantResponseModel.php +++ b/src/Api/Generated/Model/ProductVariantResponseModel.php @@ -7,7 +7,7 @@ class ProductVariantResponseModel /** * The product variants SKU (stock keeping unit) * - * @var string + * @var string|null */ protected $sku; /** @@ -79,7 +79,7 @@ class ProductVariantResponseModel /** * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * - * @var int[] + * @var int[]|null */ protected $attributeValueLinks; /** @@ -91,38 +91,38 @@ class ProductVariantResponseModel /** * The variant id * - * @var int + * @var int|null */ protected $variantId; /** * A collection of product variant prices * - * @var ProductVariantPriceModel[] + * @var ProductVariantPriceModel[]|null */ protected $prices; /** * A collection of product variant attribute values * - * @var ProductVariantAttributeValueModel[] + * @var ProductVariantAttributeValueModel[]|null */ protected $attributeValues; /** * The product variants SKU (stock keeping unit) * - * @return string + * @return string|null */ - public function getSku() : string + public function getSku() : ?string { return $this->sku; } /** * The product variants SKU (stock keeping unit) * - * @param string $sku + * @param string|null $sku * * @return self */ - public function setSku(string $sku) : self + public function setSku(?string $sku) : self { $this->sku = $sku; return $this; @@ -361,20 +361,20 @@ public function setImageFileId(?int $imageFileId) : self /** * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * - * @return int[] + * @return int[]|null */ - public function getAttributeValueLinks() : array + public function getAttributeValueLinks() : ?array { return $this->attributeValueLinks; } /** * An array of attribute value IDs that this variant belongs to. This field is mandatory for products variants if the product´s hasSeveralVariants field is set to true. * - * @param int[] $attributeValueLinks + * @param int[]|null $attributeValueLinks * * @return self */ - public function setAttributeValueLinks(array $attributeValueLinks) : self + public function setAttributeValueLinks(?array $attributeValueLinks) : self { $this->attributeValueLinks = $attributeValueLinks; return $this; @@ -403,20 +403,20 @@ public function setVolumePricingInheritancePricelistIds(?array $volumePricingInh /** * The variant id * - * @return int + * @return int|null */ - public function getVariantId() : int + public function getVariantId() : ?int { return $this->variantId; } /** * The variant id * - * @param int $variantId + * @param int|null $variantId * * @return self */ - public function setVariantId(int $variantId) : self + public function setVariantId(?int $variantId) : self { $this->variantId = $variantId; return $this; @@ -424,20 +424,20 @@ public function setVariantId(int $variantId) : self /** * A collection of product variant prices * - * @return ProductVariantPriceModel[] + * @return ProductVariantPriceModel[]|null */ - public function getPrices() : array + public function getPrices() : ?array { return $this->prices; } /** * A collection of product variant prices * - * @param ProductVariantPriceModel[] $prices + * @param ProductVariantPriceModel[]|null $prices * * @return self */ - public function setPrices(array $prices) : self + public function setPrices(?array $prices) : self { $this->prices = $prices; return $this; @@ -445,20 +445,20 @@ public function setPrices(array $prices) : self /** * A collection of product variant attribute values * - * @return ProductVariantAttributeValueModel[] + * @return ProductVariantAttributeValueModel[]|null */ - public function getAttributeValues() : array + public function getAttributeValues() : ?array { return $this->attributeValues; } /** * A collection of product variant attribute values * - * @param ProductVariantAttributeValueModel[] $attributeValues + * @param ProductVariantAttributeValueModel[]|null $attributeValues * * @return self */ - public function setAttributeValues(array $attributeValues) : self + public function setAttributeValues(?array $attributeValues) : self { $this->attributeValues = $attributeValues; return $this; diff --git a/src/Api/Generated/Model/ProductVariantStockModelCollection.php b/src/Api/Generated/Model/ProductVariantStockModelCollection.php index 28c0fee2..696437ef 100644 --- a/src/Api/Generated/Model/ProductVariantStockModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantStockModelCollection.php @@ -7,26 +7,26 @@ class ProductVariantStockModelCollection /** * A collection of product variant stocks * - * @var ProductVariantStockResponseModel[] + * @var ProductVariantStockResponseModel[]|null */ protected $data; /** * A collection of product variant stocks * - * @return ProductVariantStockResponseModel[] + * @return ProductVariantStockResponseModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product variant stocks * - * @param ProductVariantStockResponseModel[] $data + * @param ProductVariantStockResponseModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantStockModelItem.php b/src/Api/Generated/Model/ProductVariantStockModelItem.php index b98d4494..f2756f5c 100644 --- a/src/Api/Generated/Model/ProductVariantStockModelItem.php +++ b/src/Api/Generated/Model/ProductVariantStockModelItem.php @@ -7,26 +7,26 @@ class ProductVariantStockModelItem /** * * - * @var ProductVariantStockResponseModel + * @var ProductVariantStockResponseModel|null */ protected $data; /** * * - * @return ProductVariantStockResponseModel + * @return ProductVariantStockResponseModel|null */ - public function getData() : ProductVariantStockResponseModel + public function getData() : ?ProductVariantStockResponseModel { return $this->data; } /** * * - * @param ProductVariantStockResponseModel $data + * @param ProductVariantStockResponseModel|null $data * * @return self */ - public function setData(ProductVariantStockResponseModel $data) : self + public function setData(?ProductVariantStockResponseModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php b/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php index c78fa970..7029bfcb 100644 --- a/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php @@ -7,32 +7,32 @@ class ProductVariantStockPutRequestModel /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * - * @var int + * @var int|null */ protected $stockStatusId; /** * stock quantity * - * @var float + * @var float|null */ protected $stockQuantity; /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * - * @return int + * @return int|null */ - public function getStockStatusId() : int + public function getStockStatusId() : ?int { return $this->stockStatusId; } /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * - * @param int $stockStatusId + * @param int|null $stockStatusId * * @return self */ - public function setStockStatusId(int $stockStatusId) : self + public function setStockStatusId(?int $stockStatusId) : self { $this->stockStatusId = $stockStatusId; return $this; @@ -40,20 +40,20 @@ public function setStockStatusId(int $stockStatusId) : self /** * stock quantity * - * @return float + * @return float|null */ - public function getStockQuantity() : float + public function getStockQuantity() : ?float { return $this->stockQuantity; } /** * stock quantity * - * @param float $stockQuantity + * @param float|null $stockQuantity * * @return self */ - public function setStockQuantity(float $stockQuantity) : self + public function setStockQuantity(?float $stockQuantity) : self { $this->stockQuantity = $stockQuantity; return $this; diff --git a/src/Api/Generated/Model/ProductVariantStockResponseModel.php b/src/Api/Generated/Model/ProductVariantStockResponseModel.php index 4580ad57..e81ce11c 100644 --- a/src/Api/Generated/Model/ProductVariantStockResponseModel.php +++ b/src/Api/Generated/Model/ProductVariantStockResponseModel.php @@ -7,38 +7,38 @@ class ProductVariantStockResponseModel /** * The stock location id status id. See [stock locations](#tag/Stock-Locations) * - * @var int + * @var int|null */ protected $stockLocationId; /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * - * @var int + * @var int|null */ protected $stockStatusId; /** * stock quantity * - * @var float + * @var float|null */ protected $stockQuantity; /** * The stock location id status id. See [stock locations](#tag/Stock-Locations) * - * @return int + * @return int|null */ - public function getStockLocationId() : int + public function getStockLocationId() : ?int { return $this->stockLocationId; } /** * The stock location id status id. See [stock locations](#tag/Stock-Locations) * - * @param int $stockLocationId + * @param int|null $stockLocationId * * @return self */ - public function setStockLocationId(int $stockLocationId) : self + public function setStockLocationId(?int $stockLocationId) : self { $this->stockLocationId = $stockLocationId; return $this; @@ -46,20 +46,20 @@ public function setStockLocationId(int $stockLocationId) : self /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * - * @return int + * @return int|null */ - public function getStockStatusId() : int + public function getStockStatusId() : ?int { return $this->stockStatusId; } /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * - * @param int $stockStatusId + * @param int|null $stockStatusId * * @return self */ - public function setStockStatusId(int $stockStatusId) : self + public function setStockStatusId(?int $stockStatusId) : self { $this->stockStatusId = $stockStatusId; return $this; @@ -67,20 +67,20 @@ public function setStockStatusId(int $stockStatusId) : self /** * stock quantity * - * @return float + * @return float|null */ - public function getStockQuantity() : float + public function getStockQuantity() : ?float { return $this->stockQuantity; } /** * stock quantity * - * @param float $stockQuantity + * @param float|null $stockQuantity * * @return self */ - public function setStockQuantity(float $stockQuantity) : self + public function setStockQuantity(?float $stockQuantity) : self { $this->stockQuantity = $stockQuantity; return $this; diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php index 37d70447..78548b90 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php @@ -7,7 +7,7 @@ class ProductVariantVolumePriceModel /** * The pricelist this price is for * - * @var int + * @var int|null */ protected $pricelistId; /** @@ -25,32 +25,32 @@ class ProductVariantVolumePriceModel /** * The price excluding vat * - * @var float + * @var float|null */ protected $priceExVat = 0; /** * The minimum quantity required for the price to apply * - * @var float + * @var float|null */ protected $quantity; /** * The pricelist this price is for * - * @return int + * @return int|null */ - public function getPricelistId() : int + public function getPricelistId() : ?int { return $this->pricelistId; } /** * The pricelist this price is for * - * @param int $pricelistId + * @param int|null $pricelistId * * @return self */ - public function setPricelistId(int $pricelistId) : self + public function setPricelistId(?int $pricelistId) : self { $this->pricelistId = $pricelistId; return $this; @@ -100,20 +100,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The price excluding vat * - * @return float + * @return float|null */ - public function getPriceExVat() : float + public function getPriceExVat() : ?float { return $this->priceExVat; } /** * The price excluding vat * - * @param float $priceExVat + * @param float|null $priceExVat * * @return self */ - public function setPriceExVat(float $priceExVat) : self + public function setPriceExVat(?float $priceExVat) : self { $this->priceExVat = $priceExVat; return $this; @@ -121,20 +121,20 @@ public function setPriceExVat(float $priceExVat) : self /** * The minimum quantity required for the price to apply * - * @return float + * @return float|null */ - public function getQuantity() : float + public function getQuantity() : ?float { return $this->quantity; } /** * The minimum quantity required for the price to apply * - * @param float $quantity + * @param float|null $quantity * * @return self */ - public function setQuantity(float $quantity) : self + public function setQuantity(?float $quantity) : self { $this->quantity = $quantity; return $this; diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php b/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php index 7d08da2e..9d0379d9 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php @@ -7,26 +7,26 @@ class ProductVariantVolumePriceModelCollection /** * A collection of variant volume prices * - * @var ProductVariantVolumePriceModel[] + * @var ProductVariantVolumePriceModel[]|null */ protected $data; /** * A collection of variant volume prices * - * @return ProductVariantVolumePriceModel[] + * @return ProductVariantVolumePriceModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of variant volume prices * - * @param ProductVariantVolumePriceModel[] $data + * @param ProductVariantVolumePriceModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php b/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php index ceb647c0..85c9f5de 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php @@ -7,26 +7,26 @@ class ProductVariantVolumePriceModelItem /** * * - * @var ProductVariantVolumePriceModel + * @var ProductVariantVolumePriceModel|null */ protected $data; /** * * - * @return ProductVariantVolumePriceModel + * @return ProductVariantVolumePriceModel|null */ - public function getData() : ProductVariantVolumePriceModel + public function getData() : ?ProductVariantVolumePriceModel { return $this->data; } /** * * - * @param ProductVariantVolumePriceModel $data + * @param ProductVariantVolumePriceModel|null $data * * @return self */ - public function setData(ProductVariantVolumePriceModel $data) : self + public function setData(?ProductVariantVolumePriceModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVatRateModel.php b/src/Api/Generated/Model/ProductVatRateModel.php index 7d745e40..37e414b9 100644 --- a/src/Api/Generated/Model/ProductVatRateModel.php +++ b/src/Api/Generated/Model/ProductVatRateModel.php @@ -7,32 +7,32 @@ class ProductVatRateModel /** * The country code this vat rate should be valid for. The country code should be set using ISO 3166-1 alpha-2 * - * @var string + * @var string|null */ protected $countryCode; /** * The vat rate to use for this country and product * - * @var float + * @var float|null */ protected $vatRate = 0; /** * The country code this vat rate should be valid for. The country code should be set using ISO 3166-1 alpha-2 * - * @return string + * @return string|null */ - public function getCountryCode() : string + public function getCountryCode() : ?string { return $this->countryCode; } /** * The country code this vat rate should be valid for. The country code should be set using ISO 3166-1 alpha-2 * - * @param string $countryCode + * @param string|null $countryCode * * @return self */ - public function setCountryCode(string $countryCode) : self + public function setCountryCode(?string $countryCode) : self { $this->countryCode = $countryCode; return $this; @@ -40,20 +40,20 @@ public function setCountryCode(string $countryCode) : self /** * The vat rate to use for this country and product * - * @return float + * @return float|null */ - public function getVatRate() : float + public function getVatRate() : ?float { return $this->vatRate; } /** * The vat rate to use for this country and product * - * @param float $vatRate + * @param float|null $vatRate * * @return self */ - public function setVatRate(float $vatRate) : self + public function setVatRate(?float $vatRate) : self { $this->vatRate = $vatRate; return $this; diff --git a/src/Api/Generated/Model/ProductVatRateModelCollection.php b/src/Api/Generated/Model/ProductVatRateModelCollection.php index a1a0cb59..47904685 100644 --- a/src/Api/Generated/Model/ProductVatRateModelCollection.php +++ b/src/Api/Generated/Model/ProductVatRateModelCollection.php @@ -7,26 +7,26 @@ class ProductVatRateModelCollection /** * A collection of product vat rates * - * @var ProductVatRateModel[] + * @var ProductVatRateModel[]|null */ protected $data; /** * A collection of product vat rates * - * @return ProductVatRateModel[] + * @return ProductVatRateModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of product vat rates * - * @param ProductVatRateModel[] $data + * @param ProductVatRateModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductVatRateModelItem.php b/src/Api/Generated/Model/ProductVatRateModelItem.php index a6901f49..7331fccf 100644 --- a/src/Api/Generated/Model/ProductVatRateModelItem.php +++ b/src/Api/Generated/Model/ProductVatRateModelItem.php @@ -7,26 +7,26 @@ class ProductVatRateModelItem /** * * - * @var ProductVatRateModel + * @var ProductVatRateModel|null */ protected $data; /** * * - * @return ProductVatRateModel + * @return ProductVatRateModel|null */ - public function getData() : ProductVatRateModel + public function getData() : ?ProductVatRateModel { return $this->data; } /** * * - * @param ProductVatRateModel $data + * @param ProductVatRateModel|null $data * * @return self */ - public function setData(ProductVatRateModel $data) : self + public function setData(?ProductVatRateModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ProductsAttributesModelItem.php b/src/Api/Generated/Model/ProductsAttributesModelItem.php index bf526e2b..ad76ef4e 100644 --- a/src/Api/Generated/Model/ProductsAttributesModelItem.php +++ b/src/Api/Generated/Model/ProductsAttributesModelItem.php @@ -7,26 +7,26 @@ class ProductsAttributesModelItem /** * The id for this attribute * - * @var int + * @var int|null */ protected $attributeId; /** * The id for this attribute * - * @return int + * @return int|null */ - public function getAttributeId() : int + public function getAttributeId() : ?int { return $this->attributeId; } /** * The id for this attribute * - * @param int $attributeId + * @param int|null $attributeId * * @return self */ - public function setAttributeId(int $attributeId) : self + public function setAttributeId(?int $attributeId) : self { $this->attributeId = $attributeId; return $this; diff --git a/src/Api/Generated/Model/ShippingMethodLanguageModel.php b/src/Api/Generated/Model/ShippingMethodLanguageModel.php index e4fdd0a8..d27880a6 100644 --- a/src/Api/Generated/Model/ShippingMethodLanguageModel.php +++ b/src/Api/Generated/Model/ShippingMethodLanguageModel.php @@ -7,44 +7,44 @@ class ShippingMethodLanguageModel /** * Language code * - * @var string + * @var string|null */ protected $langCode; /** * Name of shipping method * - * @var string + * @var string|null */ protected $name; /** * Title of shipping method * - * @var string + * @var string|null */ protected $title; /** * A shorter informative description * - * @var string + * @var string|null */ protected $shortDescription; /** * Language code * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language code * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -52,20 +52,20 @@ public function setLangCode(string $langCode) : self /** * Name of shipping method * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * Name of shipping method * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -73,20 +73,20 @@ public function setName(string $name) : self /** * Title of shipping method * - * @return string + * @return string|null */ - public function getTitle() : string + public function getTitle() : ?string { return $this->title; } /** * Title of shipping method * - * @param string $title + * @param string|null $title * * @return self */ - public function setTitle(string $title) : self + public function setTitle(?string $title) : self { $this->title = $title; return $this; @@ -94,20 +94,20 @@ public function setTitle(string $title) : self /** * A shorter informative description * - * @return string + * @return string|null */ - public function getShortDescription() : string + public function getShortDescription() : ?string { return $this->shortDescription; } /** * A shorter informative description * - * @param string $shortDescription + * @param string|null $shortDescription * * @return self */ - public function setShortDescription(string $shortDescription) : self + public function setShortDescription(?string $shortDescription) : self { $this->shortDescription = $shortDescription; return $this; diff --git a/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php b/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php index 7ba1e407..771c6ec5 100644 --- a/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php +++ b/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php @@ -7,26 +7,26 @@ class ShippingMethodLanguageModelCollection /** * A collection of shipping method languages * - * @var ShippingMethodLanguageModel[] + * @var ShippingMethodLanguageModel[]|null */ protected $data; /** * A collection of shipping method languages * - * @return ShippingMethodLanguageModel[] + * @return ShippingMethodLanguageModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of shipping method languages * - * @param ShippingMethodLanguageModel[] $data + * @param ShippingMethodLanguageModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ShippingMethodModel.php b/src/Api/Generated/Model/ShippingMethodModel.php index bc80573e..4c1724e7 100644 --- a/src/Api/Generated/Model/ShippingMethodModel.php +++ b/src/Api/Generated/Model/ShippingMethodModel.php @@ -7,25 +7,25 @@ class ShippingMethodModel /** * The shipping methods Id * - * @var int + * @var int|null */ protected $shippingMethodId; /** * If the shipping method is actively available on checkout or not * - * @var bool + * @var bool|null */ protected $active; /** * The restrictions to countries this shipping method is valid for. Valid values are: all, EU, non-EU, selected, none * - * @var string + * @var string|null */ protected $validForCountries; /** * The countries this method is valid for (if validForCountries is set to ”selected”) * - * @var string[] + * @var string[]|null */ protected $validCountriesSelected; /** @@ -73,32 +73,32 @@ class ShippingMethodModel /** * Tells whether this method is a "click and collect" or not * - * @var bool + * @var bool|null */ protected $isClickAndCollect; /** * * - * @var ShippingMethodLanguageModelCollection + * @var ShippingMethodLanguageModelCollection|null */ protected $languages; /** * The shipping methods Id * - * @return int + * @return int|null */ - public function getShippingMethodId() : int + public function getShippingMethodId() : ?int { return $this->shippingMethodId; } /** * The shipping methods Id * - * @param int $shippingMethodId + * @param int|null $shippingMethodId * * @return self */ - public function setShippingMethodId(int $shippingMethodId) : self + public function setShippingMethodId(?int $shippingMethodId) : self { $this->shippingMethodId = $shippingMethodId; return $this; @@ -106,20 +106,20 @@ public function setShippingMethodId(int $shippingMethodId) : self /** * If the shipping method is actively available on checkout or not * - * @return bool + * @return bool|null */ - public function getActive() : bool + public function getActive() : ?bool { return $this->active; } /** * If the shipping method is actively available on checkout or not * - * @param bool $active + * @param bool|null $active * * @return self */ - public function setActive(bool $active) : self + public function setActive(?bool $active) : self { $this->active = $active; return $this; @@ -127,20 +127,20 @@ public function setActive(bool $active) : self /** * The restrictions to countries this shipping method is valid for. Valid values are: all, EU, non-EU, selected, none * - * @return string + * @return string|null */ - public function getValidForCountries() : string + public function getValidForCountries() : ?string { return $this->validForCountries; } /** * The restrictions to countries this shipping method is valid for. Valid values are: all, EU, non-EU, selected, none * - * @param string $validForCountries + * @param string|null $validForCountries * * @return self */ - public function setValidForCountries(string $validForCountries) : self + public function setValidForCountries(?string $validForCountries) : self { $this->validForCountries = $validForCountries; return $this; @@ -148,20 +148,20 @@ public function setValidForCountries(string $validForCountries) : self /** * The countries this method is valid for (if validForCountries is set to ”selected”) * - * @return string[] + * @return string[]|null */ - public function getValidCountriesSelected() : array + public function getValidCountriesSelected() : ?array { return $this->validCountriesSelected; } /** * The countries this method is valid for (if validForCountries is set to ”selected”) * - * @param string[] $validCountriesSelected + * @param string[]|null $validCountriesSelected * * @return self */ - public function setValidCountriesSelected(array $validCountriesSelected) : self + public function setValidCountriesSelected(?array $validCountriesSelected) : self { $this->validCountriesSelected = $validCountriesSelected; return $this; @@ -316,20 +316,20 @@ public function setFreeShippingMinWeight(?float $freeShippingMinWeight) : self /** * Tells whether this method is a "click and collect" or not * - * @return bool + * @return bool|null */ - public function getIsClickAndCollect() : bool + public function getIsClickAndCollect() : ?bool { return $this->isClickAndCollect; } /** * Tells whether this method is a "click and collect" or not * - * @param bool $isClickAndCollect + * @param bool|null $isClickAndCollect * * @return self */ - public function setIsClickAndCollect(bool $isClickAndCollect) : self + public function setIsClickAndCollect(?bool $isClickAndCollect) : self { $this->isClickAndCollect = $isClickAndCollect; return $this; @@ -337,20 +337,20 @@ public function setIsClickAndCollect(bool $isClickAndCollect) : self /** * * - * @return ShippingMethodLanguageModelCollection + * @return ShippingMethodLanguageModelCollection|null */ - public function getLanguages() : ShippingMethodLanguageModelCollection + public function getLanguages() : ?ShippingMethodLanguageModelCollection { return $this->languages; } /** * * - * @param ShippingMethodLanguageModelCollection $languages + * @param ShippingMethodLanguageModelCollection|null $languages * * @return self */ - public function setLanguages(ShippingMethodLanguageModelCollection $languages) : self + public function setLanguages(?ShippingMethodLanguageModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/ShippingMethodModelCollection.php b/src/Api/Generated/Model/ShippingMethodModelCollection.php index f1a1727e..ffba5ae0 100644 --- a/src/Api/Generated/Model/ShippingMethodModelCollection.php +++ b/src/Api/Generated/Model/ShippingMethodModelCollection.php @@ -7,26 +7,26 @@ class ShippingMethodModelCollection /** * A collection of shipping methods * - * @var ShippingMethodModel[] + * @var ShippingMethodModel[]|null */ protected $data; /** * A collection of shipping methods * - * @return ShippingMethodModel[] + * @return ShippingMethodModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of shipping methods * - * @param ShippingMethodModel[] $data + * @param ShippingMethodModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ShippingMethodModelItem.php b/src/Api/Generated/Model/ShippingMethodModelItem.php index 7bda301c..3be252ce 100644 --- a/src/Api/Generated/Model/ShippingMethodModelItem.php +++ b/src/Api/Generated/Model/ShippingMethodModelItem.php @@ -7,26 +7,26 @@ class ShippingMethodModelItem /** * * - * @var ShippingMethodModel + * @var ShippingMethodModel|null */ protected $data; /** * * - * @return ShippingMethodModel + * @return ShippingMethodModel|null */ - public function getData() : ShippingMethodModel + public function getData() : ?ShippingMethodModel { return $this->data; } /** * * - * @param ShippingMethodModel $data + * @param ShippingMethodModel|null $data * * @return self */ - public function setData(ShippingMethodModel $data) : self + public function setData(?ShippingMethodModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ShippingTrackingTypeModel.php b/src/Api/Generated/Model/ShippingTrackingTypeModel.php index 9c9ac796..64767171 100644 --- a/src/Api/Generated/Model/ShippingTrackingTypeModel.php +++ b/src/Api/Generated/Model/ShippingTrackingTypeModel.php @@ -7,32 +7,32 @@ class ShippingTrackingTypeModel /** * The shipping tracking type ID * - * @var int + * @var int|null */ protected $type; /** * The shipping tracking type name * - * @var string + * @var string|null */ protected $name; /** * The shipping tracking type ID * - * @return int + * @return int|null */ - public function getType() : int + public function getType() : ?int { return $this->type; } /** * The shipping tracking type ID * - * @param int $type + * @param int|null $type * * @return self */ - public function setType(int $type) : self + public function setType(?int $type) : self { $this->type = $type; return $this; @@ -40,20 +40,20 @@ public function setType(int $type) : self /** * The shipping tracking type name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The shipping tracking type name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php b/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php index ed362e8f..a28797ef 100644 --- a/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php +++ b/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php @@ -7,26 +7,26 @@ class ShippingTrackingTypeModelCollection /** * A list of shipping tracking types * - * @var ShippingTrackingTypeModel[] + * @var ShippingTrackingTypeModel[]|null */ protected $data; /** * A list of shipping tracking types * - * @return ShippingTrackingTypeModel[] + * @return ShippingTrackingTypeModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of shipping tracking types * - * @param ShippingTrackingTypeModel[] $data + * @param ShippingTrackingTypeModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ShopItem.php b/src/Api/Generated/Model/ShopItem.php index 79dece6c..c99d222f 100644 --- a/src/Api/Generated/Model/ShopItem.php +++ b/src/Api/Generated/Model/ShopItem.php @@ -7,26 +7,26 @@ class ShopItem /** * * - * @var ShopModel + * @var ShopModel|null */ protected $data; /** * * - * @return ShopModel + * @return ShopModel|null */ - public function getData() : ShopModel + public function getData() : ?ShopModel { return $this->data; } /** * * - * @param ShopModel $data + * @param ShopModel|null $data * * @return self */ - public function setData(ShopModel $data) : self + public function setData(?ShopModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/ShopModel.php b/src/Api/Generated/Model/ShopModel.php index 47634519..78b6ae9c 100644 --- a/src/Api/Generated/Model/ShopModel.php +++ b/src/Api/Generated/Model/ShopModel.php @@ -7,116 +7,116 @@ class ShopModel /** * The shop name * - * @var string + * @var string|null */ protected $name; /** * A unique id code for this shop * - * @var string + * @var string|null */ protected $idCode; /** * The current status of this shop. Possible values are: open, closed, inactive * - * @var string + * @var string|null */ protected $status; /** * Shops default language code * - * @var string + * @var string|null */ protected $defaultLangCode; /** * Active languages in shop * - * @var string[] + * @var string[]|null */ protected $activeLangCodes; /** * The shops base currency. All currencies and related data can be fetched using the /currencies endpoint * - * @var string + * @var string|null */ protected $baseCurrency; /** * The default customer country * - * @var string + * @var string|null */ protected $defaultCustomerCountryCode; /** * The default vat rate for new products * - * @var float + * @var float|null */ protected $generalDefaultVatRate; /** * The company running this web shop * - * @var string + * @var string|null */ protected $shopCompanyName; /** * The address to the web shop * - * @var string + * @var string|null */ protected $shopAddress; /** * The postal code to the web shop * - * @var string + * @var string|null */ protected $shopPostalCode; /** * The city to the web shop * - * @var string + * @var string|null */ protected $shopCity; /** * The business id of the company running the web shop * - * @var string + * @var string|null */ protected $shopOrgNo; /** * The contact phone number to the web shop * - * @var string + * @var string|null */ protected $shopPhoneNo; /** * The EU VAT number of the company running the web shop * - * @var string + * @var string|null */ protected $shopVatNo; /** * The country the company behind the web shop resides in * - * @var string + * @var string|null */ protected $shopCountryCode; /** * The shop name * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The shop name * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -124,20 +124,20 @@ public function setName(string $name) : self /** * A unique id code for this shop * - * @return string + * @return string|null */ - public function getIdCode() : string + public function getIdCode() : ?string { return $this->idCode; } /** * A unique id code for this shop * - * @param string $idCode + * @param string|null $idCode * * @return self */ - public function setIdCode(string $idCode) : self + public function setIdCode(?string $idCode) : self { $this->idCode = $idCode; return $this; @@ -145,20 +145,20 @@ public function setIdCode(string $idCode) : self /** * The current status of this shop. Possible values are: open, closed, inactive * - * @return string + * @return string|null */ - public function getStatus() : string + public function getStatus() : ?string { return $this->status; } /** * The current status of this shop. Possible values are: open, closed, inactive * - * @param string $status + * @param string|null $status * * @return self */ - public function setStatus(string $status) : self + public function setStatus(?string $status) : self { $this->status = $status; return $this; @@ -166,20 +166,20 @@ public function setStatus(string $status) : self /** * Shops default language code * - * @return string + * @return string|null */ - public function getDefaultLangCode() : string + public function getDefaultLangCode() : ?string { return $this->defaultLangCode; } /** * Shops default language code * - * @param string $defaultLangCode + * @param string|null $defaultLangCode * * @return self */ - public function setDefaultLangCode(string $defaultLangCode) : self + public function setDefaultLangCode(?string $defaultLangCode) : self { $this->defaultLangCode = $defaultLangCode; return $this; @@ -187,20 +187,20 @@ public function setDefaultLangCode(string $defaultLangCode) : self /** * Active languages in shop * - * @return string[] + * @return string[]|null */ - public function getActiveLangCodes() : array + public function getActiveLangCodes() : ?array { return $this->activeLangCodes; } /** * Active languages in shop * - * @param string[] $activeLangCodes + * @param string[]|null $activeLangCodes * * @return self */ - public function setActiveLangCodes(array $activeLangCodes) : self + public function setActiveLangCodes(?array $activeLangCodes) : self { $this->activeLangCodes = $activeLangCodes; return $this; @@ -208,20 +208,20 @@ public function setActiveLangCodes(array $activeLangCodes) : self /** * The shops base currency. All currencies and related data can be fetched using the /currencies endpoint * - * @return string + * @return string|null */ - public function getBaseCurrency() : string + public function getBaseCurrency() : ?string { return $this->baseCurrency; } /** * The shops base currency. All currencies and related data can be fetched using the /currencies endpoint * - * @param string $baseCurrency + * @param string|null $baseCurrency * * @return self */ - public function setBaseCurrency(string $baseCurrency) : self + public function setBaseCurrency(?string $baseCurrency) : self { $this->baseCurrency = $baseCurrency; return $this; @@ -229,20 +229,20 @@ public function setBaseCurrency(string $baseCurrency) : self /** * The default customer country * - * @return string + * @return string|null */ - public function getDefaultCustomerCountryCode() : string + public function getDefaultCustomerCountryCode() : ?string { return $this->defaultCustomerCountryCode; } /** * The default customer country * - * @param string $defaultCustomerCountryCode + * @param string|null $defaultCustomerCountryCode * * @return self */ - public function setDefaultCustomerCountryCode(string $defaultCustomerCountryCode) : self + public function setDefaultCustomerCountryCode(?string $defaultCustomerCountryCode) : self { $this->defaultCustomerCountryCode = $defaultCustomerCountryCode; return $this; @@ -250,20 +250,20 @@ public function setDefaultCustomerCountryCode(string $defaultCustomerCountryCode /** * The default vat rate for new products * - * @return float + * @return float|null */ - public function getGeneralDefaultVatRate() : float + public function getGeneralDefaultVatRate() : ?float { return $this->generalDefaultVatRate; } /** * The default vat rate for new products * - * @param float $generalDefaultVatRate + * @param float|null $generalDefaultVatRate * * @return self */ - public function setGeneralDefaultVatRate(float $generalDefaultVatRate) : self + public function setGeneralDefaultVatRate(?float $generalDefaultVatRate) : self { $this->generalDefaultVatRate = $generalDefaultVatRate; return $this; @@ -271,20 +271,20 @@ public function setGeneralDefaultVatRate(float $generalDefaultVatRate) : self /** * The company running this web shop * - * @return string + * @return string|null */ - public function getShopCompanyName() : string + public function getShopCompanyName() : ?string { return $this->shopCompanyName; } /** * The company running this web shop * - * @param string $shopCompanyName + * @param string|null $shopCompanyName * * @return self */ - public function setShopCompanyName(string $shopCompanyName) : self + public function setShopCompanyName(?string $shopCompanyName) : self { $this->shopCompanyName = $shopCompanyName; return $this; @@ -292,20 +292,20 @@ public function setShopCompanyName(string $shopCompanyName) : self /** * The address to the web shop * - * @return string + * @return string|null */ - public function getShopAddress() : string + public function getShopAddress() : ?string { return $this->shopAddress; } /** * The address to the web shop * - * @param string $shopAddress + * @param string|null $shopAddress * * @return self */ - public function setShopAddress(string $shopAddress) : self + public function setShopAddress(?string $shopAddress) : self { $this->shopAddress = $shopAddress; return $this; @@ -313,20 +313,20 @@ public function setShopAddress(string $shopAddress) : self /** * The postal code to the web shop * - * @return string + * @return string|null */ - public function getShopPostalCode() : string + public function getShopPostalCode() : ?string { return $this->shopPostalCode; } /** * The postal code to the web shop * - * @param string $shopPostalCode + * @param string|null $shopPostalCode * * @return self */ - public function setShopPostalCode(string $shopPostalCode) : self + public function setShopPostalCode(?string $shopPostalCode) : self { $this->shopPostalCode = $shopPostalCode; return $this; @@ -334,20 +334,20 @@ public function setShopPostalCode(string $shopPostalCode) : self /** * The city to the web shop * - * @return string + * @return string|null */ - public function getShopCity() : string + public function getShopCity() : ?string { return $this->shopCity; } /** * The city to the web shop * - * @param string $shopCity + * @param string|null $shopCity * * @return self */ - public function setShopCity(string $shopCity) : self + public function setShopCity(?string $shopCity) : self { $this->shopCity = $shopCity; return $this; @@ -355,20 +355,20 @@ public function setShopCity(string $shopCity) : self /** * The business id of the company running the web shop * - * @return string + * @return string|null */ - public function getShopOrgNo() : string + public function getShopOrgNo() : ?string { return $this->shopOrgNo; } /** * The business id of the company running the web shop * - * @param string $shopOrgNo + * @param string|null $shopOrgNo * * @return self */ - public function setShopOrgNo(string $shopOrgNo) : self + public function setShopOrgNo(?string $shopOrgNo) : self { $this->shopOrgNo = $shopOrgNo; return $this; @@ -376,20 +376,20 @@ public function setShopOrgNo(string $shopOrgNo) : self /** * The contact phone number to the web shop * - * @return string + * @return string|null */ - public function getShopPhoneNo() : string + public function getShopPhoneNo() : ?string { return $this->shopPhoneNo; } /** * The contact phone number to the web shop * - * @param string $shopPhoneNo + * @param string|null $shopPhoneNo * * @return self */ - public function setShopPhoneNo(string $shopPhoneNo) : self + public function setShopPhoneNo(?string $shopPhoneNo) : self { $this->shopPhoneNo = $shopPhoneNo; return $this; @@ -397,20 +397,20 @@ public function setShopPhoneNo(string $shopPhoneNo) : self /** * The EU VAT number of the company running the web shop * - * @return string + * @return string|null */ - public function getShopVatNo() : string + public function getShopVatNo() : ?string { return $this->shopVatNo; } /** * The EU VAT number of the company running the web shop * - * @param string $shopVatNo + * @param string|null $shopVatNo * * @return self */ - public function setShopVatNo(string $shopVatNo) : self + public function setShopVatNo(?string $shopVatNo) : self { $this->shopVatNo = $shopVatNo; return $this; @@ -418,20 +418,20 @@ public function setShopVatNo(string $shopVatNo) : self /** * The country the company behind the web shop resides in * - * @return string + * @return string|null */ - public function getShopCountryCode() : string + public function getShopCountryCode() : ?string { return $this->shopCountryCode; } /** * The country the company behind the web shop resides in * - * @param string $shopCountryCode + * @param string|null $shopCountryCode * * @return self */ - public function setShopCountryCode(string $shopCountryCode) : self + public function setShopCountryCode(?string $shopCountryCode) : self { $this->shopCountryCode = $shopCountryCode; return $this; diff --git a/src/Api/Generated/Model/StockLocationLanguagesModel.php b/src/Api/Generated/Model/StockLocationLanguagesModel.php index a4b4d11d..b65c6323 100644 --- a/src/Api/Generated/Model/StockLocationLanguagesModel.php +++ b/src/Api/Generated/Model/StockLocationLanguagesModel.php @@ -7,32 +7,32 @@ class StockLocationLanguagesModel /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * - * @var string + * @var string|null */ protected $langCode; /** * The name of this stock location (required) * - * @var string + * @var string|null */ protected $name; /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * - * @return string + * @return string|null */ - public function getLangCode() : string + public function getLangCode() : ?string { return $this->langCode; } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * - * @param string $langCode + * @param string|null $langCode * * @return self */ - public function setLangCode(string $langCode) : self + public function setLangCode(?string $langCode) : self { $this->langCode = $langCode; return $this; @@ -40,20 +40,20 @@ public function setLangCode(string $langCode) : self /** * The name of this stock location (required) * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of this stock location (required) * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; diff --git a/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php b/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php index da8acc2f..337b3155 100644 --- a/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php +++ b/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php @@ -7,26 +7,26 @@ class StockLocationLanguagesModelCollection /** * A collection of category languages * - * @var StockLocationLanguagesModel[] + * @var StockLocationLanguagesModel[]|null */ protected $data; /** * A collection of category languages * - * @return StockLocationLanguagesModel[] + * @return StockLocationLanguagesModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of category languages * - * @param StockLocationLanguagesModel[] $data + * @param StockLocationLanguagesModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/StockLocationModel.php b/src/Api/Generated/Model/StockLocationModel.php index e4f4d893..499d7bfb 100644 --- a/src/Api/Generated/Model/StockLocationModel.php +++ b/src/Api/Generated/Model/StockLocationModel.php @@ -7,7 +7,7 @@ class StockLocationModel /** * The stock location Id * - * @var int + * @var int|null */ protected $stockLocationId; /** @@ -25,44 +25,44 @@ class StockLocationModel /** * The stock location`s visibility settings. * - * @var string + * @var string|null */ protected $visibility; /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @var int + * @var int|null */ protected $sortIndex; /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @var bool + * @var bool|null */ protected $ecommerceStockLocation = false; /** * * - * @var StockLocationLanguagesModelCollection + * @var StockLocationLanguagesModelCollection|null */ protected $languages; /** * The stock location Id * - * @return int + * @return int|null */ - public function getStockLocationId() : int + public function getStockLocationId() : ?int { return $this->stockLocationId; } /** * The stock location Id * - * @param int $stockLocationId + * @param int|null $stockLocationId * * @return self */ - public function setStockLocationId(int $stockLocationId) : self + public function setStockLocationId(?int $stockLocationId) : self { $this->stockLocationId = $stockLocationId; return $this; @@ -112,20 +112,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The stock location`s visibility settings. * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The stock location`s visibility settings. * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -133,20 +133,20 @@ public function setVisibility(string $visibility) : self /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -154,20 +154,20 @@ public function setSortIndex(int $sortIndex) : self /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @return bool + * @return bool|null */ - public function getEcommerceStockLocation() : bool + public function getEcommerceStockLocation() : ?bool { return $this->ecommerceStockLocation; } /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @param bool $ecommerceStockLocation + * @param bool|null $ecommerceStockLocation * * @return self */ - public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self + public function setEcommerceStockLocation(?bool $ecommerceStockLocation) : self { $this->ecommerceStockLocation = $ecommerceStockLocation; return $this; @@ -175,20 +175,20 @@ public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self /** * * - * @return StockLocationLanguagesModelCollection + * @return StockLocationLanguagesModelCollection|null */ - public function getLanguages() : StockLocationLanguagesModelCollection + public function getLanguages() : ?StockLocationLanguagesModelCollection { return $this->languages; } /** * * - * @param StockLocationLanguagesModelCollection $languages + * @param StockLocationLanguagesModelCollection|null $languages * * @return self */ - public function setLanguages(StockLocationLanguagesModelCollection $languages) : self + public function setLanguages(?StockLocationLanguagesModelCollection $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/StockLocationModelCollection.php b/src/Api/Generated/Model/StockLocationModelCollection.php index ca9e4ffb..410f5dd0 100644 --- a/src/Api/Generated/Model/StockLocationModelCollection.php +++ b/src/Api/Generated/Model/StockLocationModelCollection.php @@ -7,26 +7,26 @@ class StockLocationModelCollection /** * A list of stock locations * - * @var StockLocationModel[] + * @var StockLocationModel[]|null */ protected $data; /** * A list of stock locations * - * @return StockLocationModel[] + * @return StockLocationModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of stock locations * - * @param StockLocationModel[] $data + * @param StockLocationModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/StockLocationModelItem.php b/src/Api/Generated/Model/StockLocationModelItem.php index 7a8abc1f..a1aced4d 100644 --- a/src/Api/Generated/Model/StockLocationModelItem.php +++ b/src/Api/Generated/Model/StockLocationModelItem.php @@ -7,26 +7,26 @@ class StockLocationModelItem /** * * - * @var StockLocationModel + * @var StockLocationModel|null */ protected $data; /** * * - * @return StockLocationModel + * @return StockLocationModel|null */ - public function getData() : StockLocationModel + public function getData() : ?StockLocationModel { return $this->data; } /** * * - * @param StockLocationModel $data + * @param StockLocationModel|null $data * * @return self */ - public function setData(StockLocationModel $data) : self + public function setData(?StockLocationModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/StockLocationPostRequestModel.php b/src/Api/Generated/Model/StockLocationPostRequestModel.php index 5e0b89f5..e308f49e 100644 --- a/src/Api/Generated/Model/StockLocationPostRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php @@ -19,25 +19,25 @@ class StockLocationPostRequestModel /** * The stock location`s visibility settings. * - * @var string + * @var string|null */ protected $visibility; /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @var int + * @var int|null */ protected $sortIndex; /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @var bool + * @var bool|null */ protected $ecommerceStockLocation = false; /** * * - * @var StockLocationLanguagesModel[] + * @var StockLocationLanguagesModel[]|null */ protected $languages; /** @@ -85,20 +85,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The stock location`s visibility settings. * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The stock location`s visibility settings. * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -106,20 +106,20 @@ public function setVisibility(string $visibility) : self /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -127,20 +127,20 @@ public function setSortIndex(int $sortIndex) : self /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @return bool + * @return bool|null */ - public function getEcommerceStockLocation() : bool + public function getEcommerceStockLocation() : ?bool { return $this->ecommerceStockLocation; } /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @param bool $ecommerceStockLocation + * @param bool|null $ecommerceStockLocation * * @return self */ - public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self + public function setEcommerceStockLocation(?bool $ecommerceStockLocation) : self { $this->ecommerceStockLocation = $ecommerceStockLocation; return $this; @@ -148,20 +148,20 @@ public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self /** * * - * @return StockLocationLanguagesModel[] + * @return StockLocationLanguagesModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param StockLocationLanguagesModel[] $languages + * @param StockLocationLanguagesModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/StockLocationPutRequestModel.php b/src/Api/Generated/Model/StockLocationPutRequestModel.php index cadf2885..bfa03cb3 100644 --- a/src/Api/Generated/Model/StockLocationPutRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php @@ -19,25 +19,25 @@ class StockLocationPutRequestModel /** * The stock location`s visibility settings. * - * @var string + * @var string|null */ protected $visibility; /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @var int + * @var int|null */ protected $sortIndex; /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @var bool + * @var bool|null */ protected $ecommerceStockLocation = false; /** * * - * @var StockLocationLanguagesModel[] + * @var StockLocationLanguagesModel[]|null */ protected $languages; /** @@ -85,20 +85,20 @@ public function setExternalIdType(?string $externalIdType) : self /** * The stock location`s visibility settings. * - * @return string + * @return string|null */ - public function getVisibility() : string + public function getVisibility() : ?string { return $this->visibility; } /** * The stock location`s visibility settings. * - * @param string $visibility + * @param string|null $visibility * * @return self */ - public function setVisibility(string $visibility) : self + public function setVisibility(?string $visibility) : self { $this->visibility = $visibility; return $this; @@ -106,20 +106,20 @@ public function setVisibility(string $visibility) : self /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @return int + * @return int|null */ - public function getSortIndex() : int + public function getSortIndex() : ?int { return $this->sortIndex; } /** * Sort index. A stock location with a lower value is displayed higher up in lists * - * @param int $sortIndex + * @param int|null $sortIndex * * @return self */ - public function setSortIndex(int $sortIndex) : self + public function setSortIndex(?int $sortIndex) : self { $this->sortIndex = $sortIndex; return $this; @@ -127,20 +127,20 @@ public function setSortIndex(int $sortIndex) : self /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @return bool + * @return bool|null */ - public function getEcommerceStockLocation() : bool + public function getEcommerceStockLocation() : ?bool { return $this->ecommerceStockLocation; } /** * Whether or not the stock location is the main ecommerce stock location There can only be one ecommerce stock location for the shop, so if you set this flag for any of the stock location it will be removed automatically from any other stock location * - * @param bool $ecommerceStockLocation + * @param bool|null $ecommerceStockLocation * * @return self */ - public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self + public function setEcommerceStockLocation(?bool $ecommerceStockLocation) : self { $this->ecommerceStockLocation = $ecommerceStockLocation; return $this; @@ -148,20 +148,20 @@ public function setEcommerceStockLocation(bool $ecommerceStockLocation) : self /** * * - * @return StockLocationLanguagesModel[] + * @return StockLocationLanguagesModel[]|null */ - public function getLanguages() : array + public function getLanguages() : ?array { return $this->languages; } /** * * - * @param StockLocationLanguagesModel[] $languages + * @param StockLocationLanguagesModel[]|null $languages * * @return self */ - public function setLanguages(array $languages) : self + public function setLanguages(?array $languages) : self { $this->languages = $languages; return $this; diff --git a/src/Api/Generated/Model/TokenModel.php b/src/Api/Generated/Model/TokenModel.php index 4adfc1d3..d39d2901 100644 --- a/src/Api/Generated/Model/TokenModel.php +++ b/src/Api/Generated/Model/TokenModel.php @@ -7,38 +7,38 @@ class TokenModel /** * The Access Token to use in future requests * - * @var string + * @var string|null */ protected $accessToken; /** * The scope this access token is valid for * - * @var string + * @var string|null */ protected $scope; /** * The number of seconds until this access token expires * - * @var int + * @var int|null */ protected $expiresIn; /** * The Access Token to use in future requests * - * @return string + * @return string|null */ - public function getAccessToken() : string + public function getAccessToken() : ?string { return $this->accessToken; } /** * The Access Token to use in future requests * - * @param string $accessToken + * @param string|null $accessToken * * @return self */ - public function setAccessToken(string $accessToken) : self + public function setAccessToken(?string $accessToken) : self { $this->accessToken = $accessToken; return $this; @@ -46,20 +46,20 @@ public function setAccessToken(string $accessToken) : self /** * The scope this access token is valid for * - * @return string + * @return string|null */ - public function getScope() : string + public function getScope() : ?string { return $this->scope; } /** * The scope this access token is valid for * - * @param string $scope + * @param string|null $scope * * @return self */ - public function setScope(string $scope) : self + public function setScope(?string $scope) : self { $this->scope = $scope; return $this; @@ -67,20 +67,20 @@ public function setScope(string $scope) : self /** * The number of seconds until this access token expires * - * @return int + * @return int|null */ - public function getExpiresIn() : int + public function getExpiresIn() : ?int { return $this->expiresIn; } /** * The number of seconds until this access token expires * - * @param int $expiresIn + * @param int|null $expiresIn * * @return self */ - public function setExpiresIn(int $expiresIn) : self + public function setExpiresIn(?int $expiresIn) : self { $this->expiresIn = $expiresIn; return $this; diff --git a/src/Api/Generated/Model/VatRateModel.php b/src/Api/Generated/Model/VatRateModel.php index 8d251f45..dcb3fa50 100644 --- a/src/Api/Generated/Model/VatRateModel.php +++ b/src/Api/Generated/Model/VatRateModel.php @@ -7,50 +7,50 @@ class VatRateModel /** * The country code this vat rates should be valid for. The country code should be set using ISO 3166-1 alpha-2 * - * @var string + * @var string|null */ protected $countryCode; /** * The vat rates to use for this country * - * @var float + * @var float|null */ protected $defaultVatRate = 0; /** * The vat rates to use for this country for payment methods * - * @var float + * @var float|null */ protected $fixedOrderPaymentVatRate = 0; /** * The vat rates to use for this country for shipping methods * - * @var float + * @var float|null */ protected $fixedOrderShippingVatRate = 0; /** * The vat rates to use for this country for discounts * - * @var float + * @var float|null */ protected $fixedOrderDiscountVatRate = 0; /** * The country code this vat rates should be valid for. The country code should be set using ISO 3166-1 alpha-2 * - * @return string + * @return string|null */ - public function getCountryCode() : string + public function getCountryCode() : ?string { return $this->countryCode; } /** * The country code this vat rates should be valid for. The country code should be set using ISO 3166-1 alpha-2 * - * @param string $countryCode + * @param string|null $countryCode * * @return self */ - public function setCountryCode(string $countryCode) : self + public function setCountryCode(?string $countryCode) : self { $this->countryCode = $countryCode; return $this; @@ -58,20 +58,20 @@ public function setCountryCode(string $countryCode) : self /** * The vat rates to use for this country * - * @return float + * @return float|null */ - public function getDefaultVatRate() : float + public function getDefaultVatRate() : ?float { return $this->defaultVatRate; } /** * The vat rates to use for this country * - * @param float $defaultVatRate + * @param float|null $defaultVatRate * * @return self */ - public function setDefaultVatRate(float $defaultVatRate) : self + public function setDefaultVatRate(?float $defaultVatRate) : self { $this->defaultVatRate = $defaultVatRate; return $this; @@ -79,20 +79,20 @@ public function setDefaultVatRate(float $defaultVatRate) : self /** * The vat rates to use for this country for payment methods * - * @return float + * @return float|null */ - public function getFixedOrderPaymentVatRate() : float + public function getFixedOrderPaymentVatRate() : ?float { return $this->fixedOrderPaymentVatRate; } /** * The vat rates to use for this country for payment methods * - * @param float $fixedOrderPaymentVatRate + * @param float|null $fixedOrderPaymentVatRate * * @return self */ - public function setFixedOrderPaymentVatRate(float $fixedOrderPaymentVatRate) : self + public function setFixedOrderPaymentVatRate(?float $fixedOrderPaymentVatRate) : self { $this->fixedOrderPaymentVatRate = $fixedOrderPaymentVatRate; return $this; @@ -100,20 +100,20 @@ public function setFixedOrderPaymentVatRate(float $fixedOrderPaymentVatRate) : s /** * The vat rates to use for this country for shipping methods * - * @return float + * @return float|null */ - public function getFixedOrderShippingVatRate() : float + public function getFixedOrderShippingVatRate() : ?float { return $this->fixedOrderShippingVatRate; } /** * The vat rates to use for this country for shipping methods * - * @param float $fixedOrderShippingVatRate + * @param float|null $fixedOrderShippingVatRate * * @return self */ - public function setFixedOrderShippingVatRate(float $fixedOrderShippingVatRate) : self + public function setFixedOrderShippingVatRate(?float $fixedOrderShippingVatRate) : self { $this->fixedOrderShippingVatRate = $fixedOrderShippingVatRate; return $this; @@ -121,20 +121,20 @@ public function setFixedOrderShippingVatRate(float $fixedOrderShippingVatRate) : /** * The vat rates to use for this country for discounts * - * @return float + * @return float|null */ - public function getFixedOrderDiscountVatRate() : float + public function getFixedOrderDiscountVatRate() : ?float { return $this->fixedOrderDiscountVatRate; } /** * The vat rates to use for this country for discounts * - * @param float $fixedOrderDiscountVatRate + * @param float|null $fixedOrderDiscountVatRate * * @return self */ - public function setFixedOrderDiscountVatRate(float $fixedOrderDiscountVatRate) : self + public function setFixedOrderDiscountVatRate(?float $fixedOrderDiscountVatRate) : self { $this->fixedOrderDiscountVatRate = $fixedOrderDiscountVatRate; return $this; diff --git a/src/Api/Generated/Model/VatRateModelCollection.php b/src/Api/Generated/Model/VatRateModelCollection.php index a03960be..18ac35bb 100644 --- a/src/Api/Generated/Model/VatRateModelCollection.php +++ b/src/Api/Generated/Model/VatRateModelCollection.php @@ -7,26 +7,26 @@ class VatRateModelCollection /** * A collection of country vat rates * - * @var VatRateModel[] + * @var VatRateModel[]|null */ protected $data; /** * A collection of country vat rates * - * @return VatRateModel[] + * @return VatRateModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A collection of country vat rates * - * @param VatRateModel[] $data + * @param VatRateModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/VatRateModelItem.php b/src/Api/Generated/Model/VatRateModelItem.php index 017a9b6c..39f1fa86 100644 --- a/src/Api/Generated/Model/VatRateModelItem.php +++ b/src/Api/Generated/Model/VatRateModelItem.php @@ -7,26 +7,26 @@ class VatRateModelItem /** * * - * @var VatRateModel + * @var VatRateModel|null */ protected $data; /** * * - * @return VatRateModel + * @return VatRateModel|null */ - public function getData() : VatRateModel + public function getData() : ?VatRateModel { return $this->data; } /** * * - * @param VatRateModel $data + * @param VatRateModel|null $data * * @return self */ - public function setData(VatRateModel $data) : self + public function setData(?VatRateModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/WebHookModel.php b/src/Api/Generated/Model/WebHookModel.php index b6d129e0..3d5ffd84 100644 --- a/src/Api/Generated/Model/WebHookModel.php +++ b/src/Api/Generated/Model/WebHookModel.php @@ -7,19 +7,19 @@ class WebHookModel /** * The id of the web hook * - * @var int + * @var int|null */ protected $webHookId; /** * The name of the web hook * - * @var string + * @var string|null */ protected $name; /** * The triggering event. Valid values are product-created, product-updated, product-removed, order-created, order-completed, order-updated, order-deleted, order-status-changed, customer-created, customer-updated, customer-deleted, shop-opened, shop-closed, shop-removed * - * @var string + * @var string|null */ protected $event; /** @@ -31,26 +31,26 @@ class WebHookModel /** * The URL to call when the event triggers * - * @var string + * @var string|null */ protected $url; /** * The id of the web hook * - * @return int + * @return int|null */ - public function getWebHookId() : int + public function getWebHookId() : ?int { return $this->webHookId; } /** * The id of the web hook * - * @param int $webHookId + * @param int|null $webHookId * * @return self */ - public function setWebHookId(int $webHookId) : self + public function setWebHookId(?int $webHookId) : self { $this->webHookId = $webHookId; return $this; @@ -58,20 +58,20 @@ public function setWebHookId(int $webHookId) : self /** * The name of the web hook * - * @return string + * @return string|null */ - public function getName() : string + public function getName() : ?string { return $this->name; } /** * The name of the web hook * - * @param string $name + * @param string|null $name * * @return self */ - public function setName(string $name) : self + public function setName(?string $name) : self { $this->name = $name; return $this; @@ -79,20 +79,20 @@ public function setName(string $name) : self /** * The triggering event. Valid values are product-created, product-updated, product-removed, order-created, order-completed, order-updated, order-deleted, order-status-changed, customer-created, customer-updated, customer-deleted, shop-opened, shop-closed, shop-removed * - * @return string + * @return string|null */ - public function getEvent() : string + public function getEvent() : ?string { return $this->event; } /** * The triggering event. Valid values are product-created, product-updated, product-removed, order-created, order-completed, order-updated, order-deleted, order-status-changed, customer-created, customer-updated, customer-deleted, shop-opened, shop-closed, shop-removed * - * @param string $event + * @param string|null $event * * @return self */ - public function setEvent(string $event) : self + public function setEvent(?string $event) : self { $this->event = $event; return $this; @@ -121,20 +121,20 @@ public function setStatusId(?int $statusId) : self /** * The URL to call when the event triggers * - * @return string + * @return string|null */ - public function getUrl() : string + public function getUrl() : ?string { return $this->url; } /** * The URL to call when the event triggers * - * @param string $url + * @param string|null $url * * @return self */ - public function setUrl(string $url) : self + public function setUrl(?string $url) : self { $this->url = $url; return $this; diff --git a/src/Api/Generated/Model/WebHookModelCollection.php b/src/Api/Generated/Model/WebHookModelCollection.php index 2142f196..4a72052d 100644 --- a/src/Api/Generated/Model/WebHookModelCollection.php +++ b/src/Api/Generated/Model/WebHookModelCollection.php @@ -7,26 +7,26 @@ class WebHookModelCollection /** * A list of web hooks * - * @var WebHookModel[] + * @var WebHookModel[]|null */ protected $data; /** * A list of web hooks * - * @return WebHookModel[] + * @return WebHookModel[]|null */ - public function getData() : array + public function getData() : ?array { return $this->data; } /** * A list of web hooks * - * @param WebHookModel[] $data + * @param WebHookModel[]|null $data * * @return self */ - public function setData(array $data) : self + public function setData(?array $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Model/WebHookModelItem.php b/src/Api/Generated/Model/WebHookModelItem.php index 815173c3..8de43ba2 100644 --- a/src/Api/Generated/Model/WebHookModelItem.php +++ b/src/Api/Generated/Model/WebHookModelItem.php @@ -7,26 +7,26 @@ class WebHookModelItem /** * * - * @var WebHookModel + * @var WebHookModel|null */ protected $data; /** * * - * @return WebHookModel + * @return WebHookModel|null */ - public function getData() : WebHookModel + public function getData() : ?WebHookModel { return $this->data; } /** * * - * @param WebHookModel $data + * @param WebHookModel|null $data * * @return self */ - public function setData(WebHookModel $data) : self + public function setData(?WebHookModel $data) : self { $this->data = $data; return $this; diff --git a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php index c915c4fe..f912f299 100644 --- a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\AddressModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/AddressModelNormalizer.php b/src/Api/Generated/Normalizer/AddressModelNormalizer.php index d4090bda..dd964c3d 100644 --- a/src/Api/Generated/Normalizer/AddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelNormalizer.php @@ -25,48 +25,87 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\AddressModel(); - if (property_exists($data, 'companyName')) { + if (property_exists($data, 'companyName') && $data->{'companyName'} !== null) { $object->setCompanyName($data->{'companyName'}); } - if (property_exists($data, 'firstName')) { + elseif (property_exists($data, 'companyName') && $data->{'companyName'} === null) { + $object->setCompanyName(null); + } + if (property_exists($data, 'firstName') && $data->{'firstName'} !== null) { $object->setFirstName($data->{'firstName'}); } - if (property_exists($data, 'lastName')) { + elseif (property_exists($data, 'firstName') && $data->{'firstName'} === null) { + $object->setFirstName(null); + } + if (property_exists($data, 'lastName') && $data->{'lastName'} !== null) { $object->setLastName($data->{'lastName'}); } - if (property_exists($data, 'careOf')) { + elseif (property_exists($data, 'lastName') && $data->{'lastName'} === null) { + $object->setLastName(null); + } + if (property_exists($data, 'careOf') && $data->{'careOf'} !== null) { $object->setCareOf($data->{'careOf'}); } - if (property_exists($data, 'attention')) { + elseif (property_exists($data, 'careOf') && $data->{'careOf'} === null) { + $object->setCareOf(null); + } + if (property_exists($data, 'attention') && $data->{'attention'} !== null) { $object->setAttention($data->{'attention'}); } - if (property_exists($data, 'reference')) { + elseif (property_exists($data, 'attention') && $data->{'attention'} === null) { + $object->setAttention(null); + } + if (property_exists($data, 'reference') && $data->{'reference'} !== null) { $object->setReference($data->{'reference'}); } - if (property_exists($data, 'address')) { + elseif (property_exists($data, 'reference') && $data->{'reference'} === null) { + $object->setReference(null); + } + if (property_exists($data, 'address') && $data->{'address'} !== null) { $object->setAddress($data->{'address'}); } - if (property_exists($data, 'postalCode')) { + elseif (property_exists($data, 'address') && $data->{'address'} === null) { + $object->setAddress(null); + } + if (property_exists($data, 'postalCode') && $data->{'postalCode'} !== null) { $object->setPostalCode($data->{'postalCode'}); } - if (property_exists($data, 'city')) { + elseif (property_exists($data, 'postalCode') && $data->{'postalCode'} === null) { + $object->setPostalCode(null); + } + if (property_exists($data, 'city') && $data->{'city'} !== null) { $object->setCity($data->{'city'}); } - if (property_exists($data, 'state')) { + elseif (property_exists($data, 'city') && $data->{'city'} === null) { + $object->setCity(null); + } + if (property_exists($data, 'state') && $data->{'state'} !== null) { $object->setState($data->{'state'}); } - if (property_exists($data, 'countryCode')) { + elseif (property_exists($data, 'state') && $data->{'state'} === null) { + $object->setState(null); + } + if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { $object->setCountryCode($data->{'countryCode'}); } - if (property_exists($data, 'phoneNo')) { + elseif (property_exists($data, 'countryCode') && $data->{'countryCode'} === null) { + $object->setCountryCode(null); + } + if (property_exists($data, 'phoneNo') && $data->{'phoneNo'} !== null) { $object->setPhoneNo($data->{'phoneNo'}); } - if (property_exists($data, 'mobilePhoneNo')) { + elseif (property_exists($data, 'phoneNo') && $data->{'phoneNo'} === null) { + $object->setPhoneNo(null); + } + if (property_exists($data, 'mobilePhoneNo') && $data->{'mobilePhoneNo'} !== null) { $object->setMobilePhoneNo($data->{'mobilePhoneNo'}); } + elseif (property_exists($data, 'mobilePhoneNo') && $data->{'mobilePhoneNo'} === null) { + $object->setMobilePhoneNo(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -75,42 +114,81 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCompanyName()) { $data->{'companyName'} = $object->getCompanyName(); } + else { + $data->{'companyName'} = null; + } if (null !== $object->getFirstName()) { $data->{'firstName'} = $object->getFirstName(); } + else { + $data->{'firstName'} = null; + } if (null !== $object->getLastName()) { $data->{'lastName'} = $object->getLastName(); } + else { + $data->{'lastName'} = null; + } if (null !== $object->getCareOf()) { $data->{'careOf'} = $object->getCareOf(); } + else { + $data->{'careOf'} = null; + } if (null !== $object->getAttention()) { $data->{'attention'} = $object->getAttention(); } + else { + $data->{'attention'} = null; + } if (null !== $object->getReference()) { $data->{'reference'} = $object->getReference(); } + else { + $data->{'reference'} = null; + } if (null !== $object->getAddress()) { $data->{'address'} = $object->getAddress(); } + else { + $data->{'address'} = null; + } if (null !== $object->getPostalCode()) { $data->{'postalCode'} = $object->getPostalCode(); } + else { + $data->{'postalCode'} = null; + } if (null !== $object->getCity()) { $data->{'city'} = $object->getCity(); } + else { + $data->{'city'} = null; + } if (null !== $object->getState()) { $data->{'state'} = $object->getState(); } + else { + $data->{'state'} = null; + } if (null !== $object->getCountryCode()) { $data->{'countryCode'} = $object->getCountryCode(); } + else { + $data->{'countryCode'} = null; + } if (null !== $object->getPhoneNo()) { $data->{'phoneNo'} = $object->getPhoneNo(); } + else { + $data->{'phoneNo'} = null; + } if (null !== $object->getMobilePhoneNo()) { $data->{'mobilePhoneNo'} = $object->getMobilePhoneNo(); } + else { + $data->{'mobilePhoneNo'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php index e5fd33d8..b3153b7f 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\BundledProductsModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php index 0ddf9931..fd31cb3d 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\BundledProductsModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php index 61a7bc44..06ab6099 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php @@ -25,34 +25,49 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\BundledProductsModel(); - if (property_exists($data, 'singleVariant')) { + if (property_exists($data, 'singleVariant') && $data->{'singleVariant'} !== null) { $object->setSingleVariant($data->{'singleVariant'}); } - if (property_exists($data, 'bundledProductId')) { + elseif (property_exists($data, 'singleVariant') && $data->{'singleVariant'} === null) { + $object->setSingleVariant(null); + } + if (property_exists($data, 'bundledProductId') && $data->{'bundledProductId'} !== null) { $object->setBundledProductId($data->{'bundledProductId'}); } - if (property_exists($data, 'variantSku')) { + elseif (property_exists($data, 'bundledProductId') && $data->{'bundledProductId'} === null) { + $object->setBundledProductId(null); + } + if (property_exists($data, 'variantSku') && $data->{'variantSku'} !== null) { $object->setVariantSku($data->{'variantSku'}); } + elseif (property_exists($data, 'variantSku') && $data->{'variantSku'} === null) { + $object->setVariantSku(null); + } if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { $object->setQuantity(null); } - if (property_exists($data, 'sortIndex')) { + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'prices')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'prices') && $data->{'prices'} !== null) { $values = array(); foreach ($data->{'prices'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context); } $object->setPrices($values); } + elseif (property_exists($data, 'prices') && $data->{'prices'} === null) { + $object->setPrices(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -61,16 +76,33 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSingleVariant()) { $data->{'singleVariant'} = $object->getSingleVariant(); } + else { + $data->{'singleVariant'} = null; + } if (null !== $object->getBundledProductId()) { $data->{'bundledProductId'} = $object->getBundledProductId(); } + else { + $data->{'bundledProductId'} = null; + } if (null !== $object->getVariantSku()) { $data->{'variantSku'} = $object->getVariantSku(); } - $data->{'quantity'} = $object->getQuantity(); + else { + $data->{'variantSku'} = null; + } + if (null !== $object->getQuantity()) { + $data->{'quantity'} = $object->getQuantity(); + } + else { + $data->{'quantity'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getPrices()) { $values = array(); foreach ($object->getPrices() as $value) { @@ -78,6 +110,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'prices'} = $values; } + else { + $data->{'prices'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php index 57372819..b4997cd7 100644 --- a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php @@ -25,18 +25,27 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ClientCredentialModel(); - if (property_exists($data, 'grant_type')) { + if (property_exists($data, 'grant_type') && $data->{'grant_type'} !== null) { $object->setGrantType($data->{'grant_type'}); } - if (property_exists($data, 'client_id')) { + elseif (property_exists($data, 'grant_type') && $data->{'grant_type'} === null) { + $object->setGrantType(null); + } + if (property_exists($data, 'client_id') && $data->{'client_id'} !== null) { $object->setClientId($data->{'client_id'}); } - if (property_exists($data, 'client_secret')) { + elseif (property_exists($data, 'client_id') && $data->{'client_id'} === null) { + $object->setClientId(null); + } + if (property_exists($data, 'client_secret') && $data->{'client_secret'} !== null) { $object->setClientSecret($data->{'client_secret'}); } + elseif (property_exists($data, 'client_secret') && $data->{'client_secret'} === null) { + $object->setClientSecret(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -45,12 +54,21 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getGrantType()) { $data->{'grant_type'} = $object->getGrantType(); } + else { + $data->{'grant_type'} = null; + } if (null !== $object->getClientId()) { $data->{'client_id'} = $object->getClientId(); } + else { + $data->{'client_id'} = null; + } if (null !== $object->getClientSecret()) { $data->{'client_secret'} = $object->getClientSecret(); } + else { + $data->{'client_secret'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php index 37bd632c..68daa9b7 100644 --- a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CurrencyCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CurrencyModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php index bc15b630..e9f0e181 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CurrencyModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CurrencyModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index 67fcb464..e344a0f4 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -25,18 +25,27 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CurrencyModel(); - if (property_exists($data, 'code')) { + if (property_exists($data, 'code') && $data->{'code'} !== null) { $object->setCode($data->{'code'}); } - if (property_exists($data, 'exchangeRate')) { + elseif (property_exists($data, 'code') && $data->{'code'} === null) { + $object->setCode(null); + } + if (property_exists($data, 'exchangeRate') && $data->{'exchangeRate'} !== null) { $object->setExchangeRate($data->{'exchangeRate'}); } - if (property_exists($data, 'precision')) { + elseif (property_exists($data, 'exchangeRate') && $data->{'exchangeRate'} === null) { + $object->setExchangeRate(null); + } + if (property_exists($data, 'precision') && $data->{'precision'} !== null) { $object->setPrecision($data->{'precision'}); } + elseif (property_exists($data, 'precision') && $data->{'precision'} === null) { + $object->setPrecision(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -45,9 +54,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExchangeRate()) { $data->{'exchangeRate'} = $object->getExchangeRate(); } + else { + $data->{'exchangeRate'} = null; + } if (null !== $object->getPrecision()) { $data->{'precision'} = $object->getPrecision(); } + else { + $data->{'precision'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php index e5efc015..c62efad7 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php index 46795e54..a600ac64 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index 6aa498c5..9c011673 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModel(); - if (property_exists($data, 'tagId')) { + if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { + $object->setTagId(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,6 +48,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } + else { + $data->{'tagId'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php index 85eaace2..250c1395 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelCollectionData(); - if (property_exists($data, 'invoice')) { + if (property_exists($data, 'invoice') && $data->{'invoice'} !== null) { $object->setInvoice($this->denormalizer->denormalize($data->{'invoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'delivery')) { + elseif (property_exists($data, 'invoice') && $data->{'invoice'} === null) { + $object->setInvoice(null); + } + if (property_exists($data, 'delivery') && $data->{'delivery'} !== null) { $object->setDelivery($this->denormalizer->denormalize($data->{'delivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } + elseif (property_exists($data, 'delivery') && $data->{'delivery'} === null) { + $object->setDelivery(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getInvoice()) { $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); } + else { + $data->{'invoice'} = null; + } if (null !== $object->getDelivery()) { $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); } + else { + $data->{'delivery'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php index f3bc61af..808048c2 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php index 5ee88e73..4f75b6db 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php index bf0c2ab7..b9e233b6 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerCreatedModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 1aa14deb..04b64b59 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -25,45 +25,75 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerCreatedModel(); - if (property_exists($data, 'customerId')) { + if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { + $object->setCustomerId(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'email')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'email') && $data->{'email'} !== null) { $object->setEmail($data->{'email'}); } - if (property_exists($data, 'nationalIdNo')) { + elseif (property_exists($data, 'email') && $data->{'email'} === null) { + $object->setEmail(null); + } + if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { $object->setNationalIdNo($data->{'nationalIdNo'}); } - if (property_exists($data, 'vatNo')) { + elseif (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} === null) { + $object->setNationalIdNo(null); + } + if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { $object->setVatNo($data->{'vatNo'}); } - if (property_exists($data, 'customInfo1')) { + elseif (property_exists($data, 'vatNo') && $data->{'vatNo'} === null) { + $object->setVatNo(null); + } + if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - if (property_exists($data, 'customInfo2')) { + elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { + $object->setCustomInfo1(null); + } + if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { + $object->setCustomInfo2(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } if (property_exists($data, 'approved') && $data->{'approved'} !== null) { $object->setApproved($data->{'approved'}); } elseif (property_exists($data, 'approved') && $data->{'approved'} === null) { $object->setApproved(null); } - if (property_exists($data, 'approvedAt')) { + if (property_exists($data, 'approvedAt') && $data->{'approvedAt'} !== null) { $object->setApprovedAt($data->{'approvedAt'}); } + elseif (property_exists($data, 'approvedAt') && $data->{'approvedAt'} === null) { + $object->setApprovedAt(null); + } if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } @@ -78,24 +108,45 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getEmail()) { $data->{'email'} = $object->getEmail(); } + else { + $data->{'email'} = null; + } if (null !== $object->getNationalIdNo()) { $data->{'nationalIdNo'} = $object->getNationalIdNo(); } + else { + $data->{'nationalIdNo'} = null; + } if (null !== $object->getVatNo()) { $data->{'vatNo'} = $object->getVatNo(); } + else { + $data->{'vatNo'} = null; + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } + else { + $data->{'customInfo1'} = null; + } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + else { + $data->{'customInfo2'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php index aa491a59..61ca9c8c 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php index a832ca9a..9bb6cc85 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php index 99cef397..ce25dfb6 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModel(); - if (property_exists($data, 'serviceName')) { + if (property_exists($data, 'serviceName') && $data->{'serviceName'} !== null) { $object->setServiceName($data->{'serviceName'}); } - if (property_exists($data, 'externalIdValue')) { + elseif (property_exists($data, 'serviceName') && $data->{'serviceName'} === null) { + $object->setServiceName(null); + } + if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { $object->setExternalIdValue($data->{'externalIdValue'}); } + elseif (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} === null) { + $object->setExternalIdValue(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getServiceName()) { $data->{'serviceName'} = $object->getServiceName(); } + else { + $data->{'serviceName'} = null; + } if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } + else { + $data->{'externalIdValue'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php index f7aa51bf..7249384f 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerModelCollectionMeta(); - if (property_exists($data, 'pagination')) { + if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } + elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { + $object->setPagination(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } + else { + $data->{'pagination'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php index 5958e705..f837ece0 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerModel', 'json', $context); } $object->setData($values); } - if (property_exists($data, 'meta')) { + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } + if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta', 'json', $context)); } + elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { + $object->setMeta(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +56,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } + else { + $data->{'meta'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php index f265dd6c..eb20ce97 100644 --- a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index fd76a2ab..6f2b819a 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -25,45 +25,75 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerModel(); - if (property_exists($data, 'customerId')) { + if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { + $object->setCustomerId(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'email')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'email') && $data->{'email'} !== null) { $object->setEmail($data->{'email'}); } - if (property_exists($data, 'nationalIdNo')) { + elseif (property_exists($data, 'email') && $data->{'email'} === null) { + $object->setEmail(null); + } + if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { $object->setNationalIdNo($data->{'nationalIdNo'}); } - if (property_exists($data, 'vatNo')) { + elseif (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} === null) { + $object->setNationalIdNo(null); + } + if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { $object->setVatNo($data->{'vatNo'}); } - if (property_exists($data, 'customInfo1')) { + elseif (property_exists($data, 'vatNo') && $data->{'vatNo'} === null) { + $object->setVatNo(null); + } + if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - if (property_exists($data, 'customInfo2')) { + elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { + $object->setCustomInfo1(null); + } + if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { + $object->setCustomInfo2(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } if (property_exists($data, 'approved') && $data->{'approved'} !== null) { $object->setApproved($data->{'approved'}); } elseif (property_exists($data, 'approved') && $data->{'approved'} === null) { $object->setApproved(null); } - if (property_exists($data, 'approvedAt')) { + if (property_exists($data, 'approvedAt') && $data->{'approvedAt'} !== null) { $object->setApprovedAt($data->{'approvedAt'}); } + elseif (property_exists($data, 'approvedAt') && $data->{'approvedAt'} === null) { + $object->setApprovedAt(null); + } if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } @@ -78,24 +108,45 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getEmail()) { $data->{'email'} = $object->getEmail(); } + else { + $data->{'email'} = null; + } if (null !== $object->getNationalIdNo()) { $data->{'nationalIdNo'} = $object->getNationalIdNo(); } + else { + $data->{'nationalIdNo'} = null; + } if (null !== $object->getVatNo()) { $data->{'vatNo'} = $object->getVatNo(); } + else { + $data->{'vatNo'} = null; + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } + else { + $data->{'customInfo1'} = null; + } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + else { + $data->{'customInfo2'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php index ad1dc604..4cc8cf1f 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerTagModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerTagModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php index 7fd8dc32..ffa8e2e6 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerTagModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerTagModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index 385d1cb7..b7ad01c1 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerTagModel(); - if (property_exists($data, 'tagId')) { + if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { + $object->setTagId(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php index b1d621c9..7f8d1792 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerUpdateModelAddresses(); - if (property_exists($data, 'invoice')) { + if (property_exists($data, 'invoice') && $data->{'invoice'} !== null) { $object->setInvoice($this->denormalizer->denormalize($data->{'invoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'delivery')) { + elseif (property_exists($data, 'invoice') && $data->{'invoice'} === null) { + $object->setInvoice(null); + } + if (property_exists($data, 'delivery') && $data->{'delivery'} !== null) { $object->setDelivery($this->denormalizer->denormalize($data->{'delivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } + elseif (property_exists($data, 'delivery') && $data->{'delivery'} === null) { + $object->setDelivery(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getInvoice()) { $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); } + else { + $data->{'invoice'} = null; + } if (null !== $object->getDelivery()) { $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); } + else { + $data->{'delivery'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index b9023f85..c8d630a4 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -25,45 +25,75 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\CustomerUpdateModel(); - if (property_exists($data, 'customerId')) { + if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { + $object->setCustomerId(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'email')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'email') && $data->{'email'} !== null) { $object->setEmail($data->{'email'}); } - if (property_exists($data, 'nationalIdNo')) { + elseif (property_exists($data, 'email') && $data->{'email'} === null) { + $object->setEmail(null); + } + if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { $object->setNationalIdNo($data->{'nationalIdNo'}); } - if (property_exists($data, 'vatNo')) { + elseif (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} === null) { + $object->setNationalIdNo(null); + } + if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { $object->setVatNo($data->{'vatNo'}); } - if (property_exists($data, 'customInfo1')) { + elseif (property_exists($data, 'vatNo') && $data->{'vatNo'} === null) { + $object->setVatNo(null); + } + if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - if (property_exists($data, 'customInfo2')) { + elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { + $object->setCustomInfo1(null); + } + if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } + elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { + $object->setCustomInfo2(null); + } if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { $object->setPricelistId(null); } - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'addresses')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses', 'json', $context)); } + elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { + $object->setAddresses(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -72,28 +102,57 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getEmail()) { $data->{'email'} = $object->getEmail(); } + else { + $data->{'email'} = null; + } if (null !== $object->getNationalIdNo()) { $data->{'nationalIdNo'} = $object->getNationalIdNo(); } + else { + $data->{'nationalIdNo'} = null; + } if (null !== $object->getVatNo()) { $data->{'vatNo'} = $object->getVatNo(); } + else { + $data->{'vatNo'} = null; + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } + else { + $data->{'customInfo1'} = null; + } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - $data->{'pricelistId'} = $object->getPricelistId(); + else { + $data->{'customInfo2'} = null; + } + if (null !== $object->getPricelistId()) { + $data->{'pricelistId'} = $object->getPricelistId(); + } + else { + $data->{'pricelistId'} = null; + } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } + else { + $data->{'addresses'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index e63edec6..f44b1442 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ErrorModel(); - if (property_exists($data, 'error')) { + if (property_exists($data, 'error') && $data->{'error'} !== null) { $object->setError($data->{'error'}); } - if (property_exists($data, 'error_description')) { + elseif (property_exists($data, 'error') && $data->{'error'} === null) { + $object->setError(null); + } + if (property_exists($data, 'error_description') && $data->{'error_description'} !== null) { $object->setErrorDescription($data->{'error_description'}); } + elseif (property_exists($data, 'error_description') && $data->{'error_description'} === null) { + $object->setErrorDescription(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php index e6fbf9d3..bc763b68 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\MediaFileModelCollectionMeta(); - if (property_exists($data, 'pagination')) { + if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } + elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { + $object->setPagination(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } + else { + $data->{'pagination'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php index c057985b..08a60cd6 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\MediaFileModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\MediaFileModel', 'json', $context); } $object->setData($values); } - if (property_exists($data, 'meta')) { + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } + if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta', 'json', $context)); } + elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { + $object->setMeta(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +56,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } + else { + $data->{'meta'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php index 909b38c2..0e4cb62a 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\MediaFileModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\MediaFileModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index 1e3f5f08..48e4bc98 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -25,36 +25,63 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\MediaFileModel(); - if (property_exists($data, 'mediaFileId')) { + if (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} !== null) { $object->setMediaFileId($data->{'mediaFileId'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} === null) { + $object->setMediaFileId(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'size')) { + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } + if (property_exists($data, 'size') && $data->{'size'} !== null) { $object->setSize($data->{'size'}); } - if (property_exists($data, 'mime')) { + elseif (property_exists($data, 'size') && $data->{'size'} === null) { + $object->setSize(null); + } + if (property_exists($data, 'mime') && $data->{'mime'} !== null) { $object->setMime($data->{'mime'}); } - if (property_exists($data, 'height')) { + elseif (property_exists($data, 'mime') && $data->{'mime'} === null) { + $object->setMime(null); + } + if (property_exists($data, 'height') && $data->{'height'} !== null) { $object->setHeight($data->{'height'}); } - if (property_exists($data, 'width')) { + elseif (property_exists($data, 'height') && $data->{'height'} === null) { + $object->setHeight(null); + } + if (property_exists($data, 'width') && $data->{'width'} !== null) { $object->setWidth($data->{'width'}); } - if (property_exists($data, 'url')) { + elseif (property_exists($data, 'width') && $data->{'width'} === null) { + $object->setWidth(null); + } + if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } + elseif (property_exists($data, 'url') && $data->{'url'} === null) { + $object->setUrl(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php index ba409084..a3c93485 100644 --- a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\MediaFileUploadModel(); - if (property_exists($data, 'file')) { + if (property_exists($data, 'file') && $data->{'file'} !== null) { $object->setFile($data->{'file'}); } + elseif (property_exists($data, 'file') && $data->{'file'} === null) { + $object->setFile(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getFile()) { $data->{'file'} = $object->getFile(); } + else { + $data->{'file'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php index 7c726a52..177dd531 100644 --- a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderAddressCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index 1bd42189..abf935b3 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -25,27 +25,45 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderAddressModel(); - if (property_exists($data, 'originalInvoice')) { + if (property_exists($data, 'originalInvoice') && $data->{'originalInvoice'} !== null) { $object->setOriginalInvoice($this->denormalizer->denormalize($data->{'originalInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'originalDelivery')) { + elseif (property_exists($data, 'originalInvoice') && $data->{'originalInvoice'} === null) { + $object->setOriginalInvoice(null); + } + if (property_exists($data, 'originalDelivery') && $data->{'originalDelivery'} !== null) { $object->setOriginalDelivery($this->denormalizer->denormalize($data->{'originalDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'customerInvoice')) { + elseif (property_exists($data, 'originalDelivery') && $data->{'originalDelivery'} === null) { + $object->setOriginalDelivery(null); + } + if (property_exists($data, 'customerInvoice') && $data->{'customerInvoice'} !== null) { $object->setCustomerInvoice($this->denormalizer->denormalize($data->{'customerInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'customerDelivery')) { + elseif (property_exists($data, 'customerInvoice') && $data->{'customerInvoice'} === null) { + $object->setCustomerInvoice(null); + } + if (property_exists($data, 'customerDelivery') && $data->{'customerDelivery'} !== null) { $object->setCustomerDelivery($this->denormalizer->denormalize($data->{'customerDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'paymentMethodInvoice')) { + elseif (property_exists($data, 'customerDelivery') && $data->{'customerDelivery'} === null) { + $object->setCustomerDelivery(null); + } + if (property_exists($data, 'paymentMethodInvoice') && $data->{'paymentMethodInvoice'} !== null) { $object->setPaymentMethodInvoice($this->denormalizer->denormalize($data->{'paymentMethodInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - if (property_exists($data, 'paymentMethodDelivery')) { + elseif (property_exists($data, 'paymentMethodInvoice') && $data->{'paymentMethodInvoice'} === null) { + $object->setPaymentMethodInvoice(null); + } + if (property_exists($data, 'paymentMethodDelivery') && $data->{'paymentMethodDelivery'} !== null) { $object->setPaymentMethodDelivery($this->denormalizer->denormalize($data->{'paymentMethodDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } + elseif (property_exists($data, 'paymentMethodDelivery') && $data->{'paymentMethodDelivery'} === null) { + $object->setPaymentMethodDelivery(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,21 +72,39 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOriginalInvoice()) { $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); } + else { + $data->{'originalInvoice'} = null; + } if (null !== $object->getOriginalDelivery()) { $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); } + else { + $data->{'originalDelivery'} = null; + } if (null !== $object->getCustomerInvoice()) { $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); } + else { + $data->{'customerInvoice'} = null; + } if (null !== $object->getCustomerDelivery()) { $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); } + else { + $data->{'customerDelivery'} = null; + } if (null !== $object->getPaymentMethodInvoice()) { $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); } + else { + $data->{'paymentMethodInvoice'} = null; + } if (null !== $object->getPaymentMethodDelivery()) { $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); } + else { + $data->{'paymentMethodDelivery'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php index 273be382..75efcd81 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderCommentModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderCommentModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php index ebf036f9..25fff37a 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderCommentModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderCommentModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index b71650d0..44f6e3b5 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderCommentModel(); - if (property_exists($data, 'commentId')) { + if (property_exists($data, 'commentId') && $data->{'commentId'} !== null) { $object->setCommentId($data->{'commentId'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'commentId') && $data->{'commentId'} === null) { + $object->setCommentId(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'text')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'text') && $data->{'text'} !== null) { $object->setText($data->{'text'}); } - if (property_exists($data, 'from')) { + elseif (property_exists($data, 'text') && $data->{'text'} === null) { + $object->setText(null); + } + if (property_exists($data, 'from') && $data->{'from'} !== null) { $object->setFrom($data->{'from'}); } + elseif (property_exists($data, 'from') && $data->{'from'} === null) { + $object->setFrom(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,12 +60,21 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getText()) { $data->{'text'} = $object->getText(); } + else { + $data->{'text'} = null; + } if (null !== $object->getFrom()) { $data->{'from'} = $object->getFrom(); } + else { + $data->{'from'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php index 688086df..a0f9d857 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderExternalServiceModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index c6b3f8c6..6e0d1e98 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -25,18 +25,27 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderExternalServiceModel(); - if (property_exists($data, 'serviceName')) { + if (property_exists($data, 'serviceName') && $data->{'serviceName'} !== null) { $object->setServiceName($data->{'serviceName'}); } - if (property_exists($data, 'externalIdValue')) { + elseif (property_exists($data, 'serviceName') && $data->{'serviceName'} === null) { + $object->setServiceName(null); + } + if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { $object->setExternalIdValue($data->{'externalIdValue'}); } - if (property_exists($data, 'readOnly')) { + elseif (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} === null) { + $object->setExternalIdValue(null); + } + if (property_exists($data, 'readOnly') && $data->{'readOnly'} !== null) { $object->setReadOnly($data->{'readOnly'}); } + elseif (property_exists($data, 'readOnly') && $data->{'readOnly'} === null) { + $object->setReadOnly(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -45,9 +54,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getServiceName()) { $data->{'serviceName'} = $object->getServiceName(); } + else { + $data->{'serviceName'} = null; + } if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } + else { + $data->{'externalIdValue'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php index f2dbc70c..745003a4 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderExternalServicesModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php index 7de08190..b3a9c6e5 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderItemBundledModelItemBundledItems(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php index 352d2028..94cb27ef 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderItemBundledModelItem(); - if (property_exists($data, 'bundledItems')) { + if (property_exists($data, 'bundledItems') && $data->{'bundledItems'} !== null) { $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); } + elseif (property_exists($data, 'bundledItems') && $data->{'bundledItems'} === null) { + $object->setBundledItems(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getBundledItems()) { $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); } + else { + $data->{'bundledItems'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php index e48d98d4..5e110ba3 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -25,42 +25,75 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderItemModelCollectionDataItem(); - if (property_exists($data, 'itemId')) { + if (property_exists($data, 'itemId') && $data->{'itemId'} !== null) { $object->setItemId($data->{'itemId'}); } - if (property_exists($data, 'sku')) { + elseif (property_exists($data, 'itemId') && $data->{'itemId'} === null) { + $object->setItemId(null); + } + if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'description')) { + elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { + $object->setSku(null); + } + if (property_exists($data, 'description') && $data->{'description'} !== null) { $object->setDescription($data->{'description'}); } - if (property_exists($data, 'quantity')) { + elseif (property_exists($data, 'description') && $data->{'description'} === null) { + $object->setDescription(null); + } + if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } - if (property_exists($data, 'unitSymbol')) { + elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { + $object->setQuantity(null); + } + if (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} !== null) { $object->setUnitSymbol($data->{'unitSymbol'}); } - if (property_exists($data, 'unitPrice')) { + elseif (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} === null) { + $object->setUnitSymbol(null); + } + if (property_exists($data, 'unitPrice') && $data->{'unitPrice'} !== null) { $object->setUnitPrice($data->{'unitPrice'}); } - if (property_exists($data, 'vatRate')) { + elseif (property_exists($data, 'unitPrice') && $data->{'unitPrice'} === null) { + $object->setUnitPrice(null); + } + if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { $object->setVatRate($data->{'vatRate'}); } - if (property_exists($data, 'discount')) { + elseif (property_exists($data, 'vatRate') && $data->{'vatRate'} === null) { + $object->setVatRate(null); + } + if (property_exists($data, 'discount') && $data->{'discount'} !== null) { $object->setDiscount($data->{'discount'}); } - if (property_exists($data, 'discountType')) { + elseif (property_exists($data, 'discount') && $data->{'discount'} === null) { + $object->setDiscount(null); + } + if (property_exists($data, 'discountType') && $data->{'discountType'} !== null) { $object->setDiscountType($data->{'discountType'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'discountType') && $data->{'discountType'} === null) { + $object->setDiscountType(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'bundledItems')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'bundledItems') && $data->{'bundledItems'} !== null) { $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); } + elseif (property_exists($data, 'bundledItems') && $data->{'bundledItems'} === null) { + $object->setBundledItems(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -69,33 +102,63 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + else { + $data->{'sku'} = null; + } if (null !== $object->getDescription()) { $data->{'description'} = $object->getDescription(); } + else { + $data->{'description'} = null; + } if (null !== $object->getQuantity()) { $data->{'quantity'} = $object->getQuantity(); } + else { + $data->{'quantity'} = null; + } if (null !== $object->getUnitSymbol()) { $data->{'unitSymbol'} = $object->getUnitSymbol(); } + else { + $data->{'unitSymbol'} = null; + } if (null !== $object->getUnitPrice()) { $data->{'unitPrice'} = $object->getUnitPrice(); } + else { + $data->{'unitPrice'} = null; + } if (null !== $object->getVatRate()) { $data->{'vatRate'} = $object->getVatRate(); } + else { + $data->{'vatRate'} = null; + } if (null !== $object->getDiscount()) { $data->{'discount'} = $object->getDiscount(); } + else { + $data->{'discount'} = null; + } if (null !== $object->getDiscountType()) { $data->{'discountType'} = $object->getDiscountType(); } + else { + $data->{'discountType'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getBundledItems()) { $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); } + else { + $data->{'bundledItems'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php index d59c585b..838eaf23 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderItemModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php index 2e1b7657..3f947497 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderItemModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index bbcf9334..8f1c4b4f 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -25,39 +25,69 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderItemModel(); - if (property_exists($data, 'itemId')) { + if (property_exists($data, 'itemId') && $data->{'itemId'} !== null) { $object->setItemId($data->{'itemId'}); } - if (property_exists($data, 'sku')) { + elseif (property_exists($data, 'itemId') && $data->{'itemId'} === null) { + $object->setItemId(null); + } + if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - if (property_exists($data, 'description')) { + elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { + $object->setSku(null); + } + if (property_exists($data, 'description') && $data->{'description'} !== null) { $object->setDescription($data->{'description'}); } - if (property_exists($data, 'quantity')) { + elseif (property_exists($data, 'description') && $data->{'description'} === null) { + $object->setDescription(null); + } + if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } - if (property_exists($data, 'unitSymbol')) { + elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { + $object->setQuantity(null); + } + if (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} !== null) { $object->setUnitSymbol($data->{'unitSymbol'}); } - if (property_exists($data, 'unitPrice')) { + elseif (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} === null) { + $object->setUnitSymbol(null); + } + if (property_exists($data, 'unitPrice') && $data->{'unitPrice'} !== null) { $object->setUnitPrice($data->{'unitPrice'}); } - if (property_exists($data, 'vatRate')) { + elseif (property_exists($data, 'unitPrice') && $data->{'unitPrice'} === null) { + $object->setUnitPrice(null); + } + if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { $object->setVatRate($data->{'vatRate'}); } - if (property_exists($data, 'discount')) { + elseif (property_exists($data, 'vatRate') && $data->{'vatRate'} === null) { + $object->setVatRate(null); + } + if (property_exists($data, 'discount') && $data->{'discount'} !== null) { $object->setDiscount($data->{'discount'}); } - if (property_exists($data, 'discountType')) { + elseif (property_exists($data, 'discount') && $data->{'discount'} === null) { + $object->setDiscount(null); + } + if (property_exists($data, 'discountType') && $data->{'discountType'} !== null) { $object->setDiscountType($data->{'discountType'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'discountType') && $data->{'discountType'} === null) { + $object->setDiscountType(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -66,30 +96,57 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } + else { + $data->{'sku'} = null; + } if (null !== $object->getDescription()) { $data->{'description'} = $object->getDescription(); } + else { + $data->{'description'} = null; + } if (null !== $object->getQuantity()) { $data->{'quantity'} = $object->getQuantity(); } + else { + $data->{'quantity'} = null; + } if (null !== $object->getUnitSymbol()) { $data->{'unitSymbol'} = $object->getUnitSymbol(); } + else { + $data->{'unitSymbol'} = null; + } if (null !== $object->getUnitPrice()) { $data->{'unitPrice'} = $object->getUnitPrice(); } + else { + $data->{'unitPrice'} = null; + } if (null !== $object->getVatRate()) { $data->{'vatRate'} = $object->getVatRate(); } + else { + $data->{'vatRate'} = null; + } if (null !== $object->getDiscount()) { $data->{'discount'} = $object->getDiscount(); } + else { + $data->{'discount'} = null; + } if (null !== $object->getDiscountType()) { $data->{'discountType'} = $object->getDiscountType(); } + else { + $data->{'discountType'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php index 4bb552a4..6aa1ede3 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderModelCollectionMeta(); - if (property_exists($data, 'pagination')) { + if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } + elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { + $object->setPagination(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } + else { + $data->{'pagination'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php index 5ef2e91d..94e2f169 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderModel', 'json', $context); } $object->setData($values); } - if (property_exists($data, 'meta')) { + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } + if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta', 'json', $context)); } + elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { + $object->setMeta(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +56,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } + else { + $data->{'meta'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php index ef562b43..ac74d766 100644 --- a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 9224a639..a07afe67 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -25,174 +25,339 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderModel(); - if (property_exists($data, 'orderId')) { + if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { $object->setOrderId($data->{'orderId'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'orderId') && $data->{'orderId'} === null) { + $object->setOrderId(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'baseCurrencyCode')) { + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } + if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } - if (property_exists($data, 'shopCountryCode')) { + elseif (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} === null) { + $object->setBaseCurrencyCode(null); + } + if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - if (property_exists($data, 'totalAmount')) { + elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { + $object->setShopCountryCode(null); + } + if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { $object->setTotalAmount($data->{'totalAmount'}); } - if (property_exists($data, 'totalVat')) { + elseif (property_exists($data, 'totalAmount') && $data->{'totalAmount'} === null) { + $object->setTotalAmount(null); + } + if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { $object->setTotalVat($data->{'totalVat'}); } - if (property_exists($data, 'amountToPay')) { + elseif (property_exists($data, 'totalVat') && $data->{'totalVat'} === null) { + $object->setTotalVat(null); + } + if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { $object->setAmountToPay($data->{'amountToPay'}); } - if (property_exists($data, 'totalAmountInBaseCurrency')) { + elseif (property_exists($data, 'amountToPay') && $data->{'amountToPay'} === null) { + $object->setAmountToPay(null); + } + if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); } - if (property_exists($data, 'totalVatInBaseCurrency')) { + elseif (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} === null) { + $object->setTotalAmountInBaseCurrency(null); + } + if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); } - if (property_exists($data, 'amountToPayInBaseCurrency')) { + elseif (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} === null) { + $object->setTotalVatInBaseCurrency(null); + } + if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} === null) { + $object->setAmountToPayInBaseCurrency(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'customerId')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - if (property_exists($data, 'statusId')) { + elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { + $object->setCustomerId(null); + } + if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - if (property_exists($data, 'onOrderStatusChangeSendEmail')) { + elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { + $object->setStatusId(null); + } + if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); } - if (property_exists($data, 'onOrderStatusChangeProcessPayment')) { + elseif (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} === null) { + $object->setOnOrderStatusChangeSendEmail(null); + } + if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); } - if (property_exists($data, 'sendEmailsOnStatusChange')) { + elseif (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} === null) { + $object->setOnOrderStatusChangeProcessPayment(null); + } + if (property_exists($data, 'sendEmailsOnStatusChange') && $data->{'sendEmailsOnStatusChange'} !== null) { $object->setSendEmailsOnStatusChange($data->{'sendEmailsOnStatusChange'}); } - if (property_exists($data, 'shippingMethodId')) { + elseif (property_exists($data, 'sendEmailsOnStatusChange') && $data->{'sendEmailsOnStatusChange'} === null) { + $object->setSendEmailsOnStatusChange(null); + } + if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - if (property_exists($data, 'paymentMethodId')) { + elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { + $object->setShippingMethodId(null); + } + if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - if (property_exists($data, 'paymentMethodIdCode')) { + elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { + $object->setPaymentMethodId(null); + } + if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); } - if (property_exists($data, 'paymentMethodName')) { + elseif (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} === null) { + $object->setPaymentMethodIdCode(null); + } + if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { $object->setPaymentMethodName($data->{'paymentMethodName'}); } - if (property_exists($data, 'paymentFee')) { + elseif (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} === null) { + $object->setPaymentMethodName(null); + } + if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { $object->setPaymentFee($data->{'paymentFee'}); } - if (property_exists($data, 'paymentVatRate')) { + elseif (property_exists($data, 'paymentFee') && $data->{'paymentFee'} === null) { + $object->setPaymentFee(null); + } + if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { $object->setPaymentVatRate($data->{'paymentVatRate'}); } - if (property_exists($data, 'shippingMethodName')) { + elseif (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} === null) { + $object->setPaymentVatRate(null); + } + if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { $object->setShippingMethodName($data->{'shippingMethodName'}); } - if (property_exists($data, 'shippingCost')) { + elseif (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} === null) { + $object->setShippingMethodName(null); + } + if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { $object->setShippingCost($data->{'shippingCost'}); } - if (property_exists($data, 'shippingVatRate')) { + elseif (property_exists($data, 'shippingCost') && $data->{'shippingCost'} === null) { + $object->setShippingCost(null); + } + if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { $object->setShippingVatRate($data->{'shippingVatRate'}); } - if (property_exists($data, 'totalWeight')) { + elseif (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} === null) { + $object->setShippingVatRate(null); + } + if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { $object->setTotalWeight($data->{'totalWeight'}); } - if (property_exists($data, 'customInfo1')) { + elseif (property_exists($data, 'totalWeight') && $data->{'totalWeight'} === null) { + $object->setTotalWeight(null); + } + if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - if (property_exists($data, 'customInfo2')) { + elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { + $object->setCustomInfo1(null); + } + if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - if (property_exists($data, 'customInfo3')) { + elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { + $object->setCustomInfo2(null); + } + if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { $object->setCustomInfo3($data->{'customInfo3'}); } - if (property_exists($data, 'customInfo4')) { + elseif (property_exists($data, 'customInfo3') && $data->{'customInfo3'} === null) { + $object->setCustomInfo3(null); + } + if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { $object->setCustomInfo4($data->{'customInfo4'}); } - if (property_exists($data, 'discountCode')) { + elseif (property_exists($data, 'customInfo4') && $data->{'customInfo4'} === null) { + $object->setCustomInfo4(null); + } + if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { $object->setDiscountCode($data->{'discountCode'}); } - if (property_exists($data, 'amountPaid')) { + elseif (property_exists($data, 'discountCode') && $data->{'discountCode'} === null) { + $object->setDiscountCode(null); + } + if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { $object->setAmountPaid($data->{'amountPaid'}); } - if (property_exists($data, 'amountPaidInBaseCurrency')) { + elseif (property_exists($data, 'amountPaid') && $data->{'amountPaid'} === null) { + $object->setAmountPaid(null); + } + if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); } - if (property_exists($data, 'isComplete')) { + elseif (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} === null) { + $object->setAmountPaidInBaseCurrency(null); + } + if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { $object->setIsComplete($data->{'isComplete'}); } - if (property_exists($data, 'currencyCode')) { + elseif (property_exists($data, 'isComplete') && $data->{'isComplete'} === null) { + $object->setIsComplete(null); + } + if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - if (property_exists($data, 'currencyExchangeRate')) { + elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { + $object->setCurrencyCode(null); + } + if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); } - if (property_exists($data, 'currencyPrecision')) { + elseif (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} === null) { + $object->setCurrencyExchangeRate(null); + } + if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { $object->setCurrencyPrecision($data->{'currencyPrecision'}); } - if (property_exists($data, 'langCode')) { + elseif (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} === null) { + $object->setCurrencyPrecision(null); + } + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'paymentReference')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { $object->setPaymentReference($data->{'paymentReference'}); } - if (property_exists($data, 'paymentStatus')) { + elseif (property_exists($data, 'paymentReference') && $data->{'paymentReference'} === null) { + $object->setPaymentReference(null); + } + if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { $object->setPaymentStatus($data->{'paymentStatus'}); } - if (property_exists($data, 'isRead')) { + elseif (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} === null) { + $object->setPaymentStatus(null); + } + if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { $object->setIsRead($data->{'isRead'}); } - if (property_exists($data, 'hasComments')) { + elseif (property_exists($data, 'isRead') && $data->{'isRead'} === null) { + $object->setIsRead(null); + } + if (property_exists($data, 'hasComments') && $data->{'hasComments'} !== null) { $object->setHasComments($data->{'hasComments'}); } - if (property_exists($data, 'internalComment')) { + elseif (property_exists($data, 'hasComments') && $data->{'hasComments'} === null) { + $object->setHasComments(null); + } + if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { $object->setInternalComment($data->{'internalComment'}); } - if (property_exists($data, 'shippingTrackerType')) { + elseif (property_exists($data, 'internalComment') && $data->{'internalComment'} === null) { + $object->setInternalComment(null); + } + if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { $object->setShippingTrackerType($data->{'shippingTrackerType'}); } - if (property_exists($data, 'shippingTrackingNo')) { + elseif (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} === null) { + $object->setShippingTrackerType(null); + } + if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); } - if (property_exists($data, 'originalCustomerEmail')) { + elseif (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} === null) { + $object->setShippingTrackingNo(null); + } + if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); } - if (property_exists($data, 'originalCustomerNationalIdNo')) { + elseif (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} === null) { + $object->setOriginalCustomerEmail(null); + } + if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); } - if (property_exists($data, 'originalCustomerVatNo')) { + elseif (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} === null) { + $object->setOriginalCustomerNationalIdNo(null); + } + if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); } - if (property_exists($data, 'originalCustomerCustomInfo1')) { + elseif (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} === null) { + $object->setOriginalCustomerVatNo(null); + } + if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); } - if (property_exists($data, 'originalCustomerCustomInfo2')) { + elseif (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} === null) { + $object->setOriginalCustomerCustomInfo1(null); + } + if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } - if (property_exists($data, 'items')) { + elseif (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} === null) { + $object->setOriginalCustomerCustomInfo2(null); + } + if (property_exists($data, 'items') && $data->{'items'} !== null) { $object->setItems($this->denormalizer->denormalize($data->{'items'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json', $context)); } - if (property_exists($data, 'addresses')) { + elseif (property_exists($data, 'items') && $data->{'items'} === null) { + $object->setItems(null); + } + if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection', 'json', $context)); } - if (property_exists($data, 'externalServices')) { + elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { + $object->setAddresses(null); + } + if (property_exists($data, 'externalServices') && $data->{'externalServices'} !== null) { $object->setExternalServices($this->denormalizer->denormalize($data->{'externalServices'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection', 'json', $context)); } - if (property_exists($data, 'customer')) { + elseif (property_exists($data, 'externalServices') && $data->{'externalServices'} === null) { + $object->setExternalServices(null); + } + if (property_exists($data, 'customer') && $data->{'customer'} !== null) { $object->setCustomer($this->denormalizer->denormalize($data->{'customer'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json', $context)); } - if (property_exists($data, 'status')) { + elseif (property_exists($data, 'customer') && $data->{'customer'} === null) { + $object->setCustomer(null); + } + if (property_exists($data, 'status') && $data->{'status'} !== null) { $object->setStatus($this->denormalizer->denormalize($data->{'status'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json', $context)); } + elseif (property_exists($data, 'status') && $data->{'status'} === null) { + $object->setStatus(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -201,126 +366,249 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getCustomerId()) { $data->{'customerId'} = $object->getCustomerId(); } + else { + $data->{'customerId'} = null; + } if (null !== $object->getStatusId()) { $data->{'statusId'} = $object->getStatusId(); } + else { + $data->{'statusId'} = null; + } if (null !== $object->getOnOrderStatusChangeSendEmail()) { $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); } + else { + $data->{'onOrderStatusChangeSendEmail'} = null; + } if (null !== $object->getOnOrderStatusChangeProcessPayment()) { $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); } + else { + $data->{'onOrderStatusChangeProcessPayment'} = null; + } if (null !== $object->getSendEmailsOnStatusChange()) { $data->{'sendEmailsOnStatusChange'} = $object->getSendEmailsOnStatusChange(); } + else { + $data->{'sendEmailsOnStatusChange'} = null; + } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } + else { + $data->{'shippingMethodId'} = null; + } if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } + else { + $data->{'paymentMethodId'} = null; + } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } + else { + $data->{'paymentMethodName'} = null; + } if (null !== $object->getPaymentFee()) { $data->{'paymentFee'} = $object->getPaymentFee(); } + else { + $data->{'paymentFee'} = null; + } if (null !== $object->getPaymentVatRate()) { $data->{'paymentVatRate'} = $object->getPaymentVatRate(); } + else { + $data->{'paymentVatRate'} = null; + } if (null !== $object->getShippingMethodName()) { $data->{'shippingMethodName'} = $object->getShippingMethodName(); } + else { + $data->{'shippingMethodName'} = null; + } if (null !== $object->getShippingCost()) { $data->{'shippingCost'} = $object->getShippingCost(); } + else { + $data->{'shippingCost'} = null; + } if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } + else { + $data->{'shippingVatRate'} = null; + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } + else { + $data->{'customInfo1'} = null; + } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + else { + $data->{'customInfo2'} = null; + } if (null !== $object->getCustomInfo3()) { $data->{'customInfo3'} = $object->getCustomInfo3(); } + else { + $data->{'customInfo3'} = null; + } if (null !== $object->getCustomInfo4()) { $data->{'customInfo4'} = $object->getCustomInfo4(); } + else { + $data->{'customInfo4'} = null; + } if (null !== $object->getDiscountCode()) { $data->{'discountCode'} = $object->getDiscountCode(); } + else { + $data->{'discountCode'} = null; + } if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } + else { + $data->{'amountPaid'} = null; + } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } + else { + $data->{'isComplete'} = null; + } if (null !== $object->getCurrencyCode()) { $data->{'currencyCode'} = $object->getCurrencyCode(); } + else { + $data->{'currencyCode'} = null; + } if (null !== $object->getCurrencyExchangeRate()) { $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); } + else { + $data->{'currencyExchangeRate'} = null; + } if (null !== $object->getCurrencyPrecision()) { $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); } + else { + $data->{'currencyPrecision'} = null; + } if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getPaymentReference()) { $data->{'paymentReference'} = $object->getPaymentReference(); } + else { + $data->{'paymentReference'} = null; + } if (null !== $object->getPaymentStatus()) { $data->{'paymentStatus'} = $object->getPaymentStatus(); } + else { + $data->{'paymentStatus'} = null; + } if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } + else { + $data->{'isRead'} = null; + } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } + else { + $data->{'internalComment'} = null; + } if (null !== $object->getShippingTrackerType()) { $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); } + else { + $data->{'shippingTrackerType'} = null; + } if (null !== $object->getShippingTrackingNo()) { $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); } + else { + $data->{'shippingTrackingNo'} = null; + } if (null !== $object->getOriginalCustomerEmail()) { $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); } + else { + $data->{'originalCustomerEmail'} = null; + } if (null !== $object->getOriginalCustomerNationalIdNo()) { $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); } + else { + $data->{'originalCustomerNationalIdNo'} = null; + } if (null !== $object->getOriginalCustomerVatNo()) { $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); } + else { + $data->{'originalCustomerVatNo'} = null; + } if (null !== $object->getOriginalCustomerCustomInfo1()) { $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); } + else { + $data->{'originalCustomerCustomInfo1'} = null; + } if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } + else { + $data->{'originalCustomerCustomInfo2'} = null; + } if (null !== $object->getItems()) { $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context); } + else { + $data->{'items'} = null; + } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } + else { + $data->{'addresses'} = null; + } if (null !== $object->getExternalServices()) { $data->{'externalServices'} = $this->normalizer->normalize($object->getExternalServices(), 'json', $context); } + else { + $data->{'externalServices'} = null; + } if (null !== $object->getCustomer()) { $data->{'customer'} = $this->normalizer->normalize($object->getCustomer(), 'json', $context); } + else { + $data->{'customer'} = null; + } if (null !== $object->getStatus()) { $data->{'status'} = $this->normalizer->normalize($object->getStatus(), 'json', $context); } + else { + $data->{'status'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index 3485a41c..e06c4b92 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -25,166 +25,319 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderPutModel(); - if (property_exists($data, 'orderId')) { + if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { $object->setOrderId($data->{'orderId'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'orderId') && $data->{'orderId'} === null) { + $object->setOrderId(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'baseCurrencyCode')) { + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } + if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } - if (property_exists($data, 'shopCountryCode')) { + elseif (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} === null) { + $object->setBaseCurrencyCode(null); + } + if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - if (property_exists($data, 'totalAmount')) { + elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { + $object->setShopCountryCode(null); + } + if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { $object->setTotalAmount($data->{'totalAmount'}); } - if (property_exists($data, 'totalVat')) { + elseif (property_exists($data, 'totalAmount') && $data->{'totalAmount'} === null) { + $object->setTotalAmount(null); + } + if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { $object->setTotalVat($data->{'totalVat'}); } - if (property_exists($data, 'amountToPay')) { + elseif (property_exists($data, 'totalVat') && $data->{'totalVat'} === null) { + $object->setTotalVat(null); + } + if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { $object->setAmountToPay($data->{'amountToPay'}); } - if (property_exists($data, 'totalAmountInBaseCurrency')) { + elseif (property_exists($data, 'amountToPay') && $data->{'amountToPay'} === null) { + $object->setAmountToPay(null); + } + if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); } - if (property_exists($data, 'totalVatInBaseCurrency')) { + elseif (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} === null) { + $object->setTotalAmountInBaseCurrency(null); + } + if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); } - if (property_exists($data, 'amountToPayInBaseCurrency')) { + elseif (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} === null) { + $object->setTotalVatInBaseCurrency(null); + } + if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} === null) { + $object->setAmountToPayInBaseCurrency(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'customerId')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - if (property_exists($data, 'statusId')) { + elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { + $object->setCustomerId(null); + } + if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - if (property_exists($data, 'onOrderStatusChangeSendEmail')) { + elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { + $object->setStatusId(null); + } + if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); } - if (property_exists($data, 'onOrderStatusChangeProcessPayment')) { + elseif (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} === null) { + $object->setOnOrderStatusChangeSendEmail(null); + } + if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); } - if (property_exists($data, 'shippingMethodId')) { + elseif (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} === null) { + $object->setOnOrderStatusChangeProcessPayment(null); + } + if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - if (property_exists($data, 'paymentMethodId')) { + elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { + $object->setShippingMethodId(null); + } + if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - if (property_exists($data, 'paymentMethodIdCode')) { + elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { + $object->setPaymentMethodId(null); + } + if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); } - if (property_exists($data, 'paymentMethodName')) { + elseif (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} === null) { + $object->setPaymentMethodIdCode(null); + } + if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { $object->setPaymentMethodName($data->{'paymentMethodName'}); } - if (property_exists($data, 'paymentFee')) { + elseif (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} === null) { + $object->setPaymentMethodName(null); + } + if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { $object->setPaymentFee($data->{'paymentFee'}); } - if (property_exists($data, 'paymentVatRate')) { + elseif (property_exists($data, 'paymentFee') && $data->{'paymentFee'} === null) { + $object->setPaymentFee(null); + } + if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { $object->setPaymentVatRate($data->{'paymentVatRate'}); } - if (property_exists($data, 'shippingMethodName')) { + elseif (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} === null) { + $object->setPaymentVatRate(null); + } + if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { $object->setShippingMethodName($data->{'shippingMethodName'}); } - if (property_exists($data, 'shippingCost')) { + elseif (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} === null) { + $object->setShippingMethodName(null); + } + if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { $object->setShippingCost($data->{'shippingCost'}); } - if (property_exists($data, 'shippingVatRate')) { + elseif (property_exists($data, 'shippingCost') && $data->{'shippingCost'} === null) { + $object->setShippingCost(null); + } + if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { $object->setShippingVatRate($data->{'shippingVatRate'}); } - if (property_exists($data, 'totalWeight')) { + elseif (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} === null) { + $object->setShippingVatRate(null); + } + if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { $object->setTotalWeight($data->{'totalWeight'}); } - if (property_exists($data, 'customInfo1')) { + elseif (property_exists($data, 'totalWeight') && $data->{'totalWeight'} === null) { + $object->setTotalWeight(null); + } + if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - if (property_exists($data, 'customInfo2')) { + elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { + $object->setCustomInfo1(null); + } + if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - if (property_exists($data, 'customInfo3')) { + elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { + $object->setCustomInfo2(null); + } + if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { $object->setCustomInfo3($data->{'customInfo3'}); } - if (property_exists($data, 'customInfo4')) { + elseif (property_exists($data, 'customInfo3') && $data->{'customInfo3'} === null) { + $object->setCustomInfo3(null); + } + if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { $object->setCustomInfo4($data->{'customInfo4'}); } - if (property_exists($data, 'discountCode')) { + elseif (property_exists($data, 'customInfo4') && $data->{'customInfo4'} === null) { + $object->setCustomInfo4(null); + } + if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { $object->setDiscountCode($data->{'discountCode'}); } - if (property_exists($data, 'amountPaid')) { + elseif (property_exists($data, 'discountCode') && $data->{'discountCode'} === null) { + $object->setDiscountCode(null); + } + if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { $object->setAmountPaid($data->{'amountPaid'}); } - if (property_exists($data, 'amountPaidInBaseCurrency')) { + elseif (property_exists($data, 'amountPaid') && $data->{'amountPaid'} === null) { + $object->setAmountPaid(null); + } + if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); } - if (property_exists($data, 'isComplete')) { + elseif (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} === null) { + $object->setAmountPaidInBaseCurrency(null); + } + if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { $object->setIsComplete($data->{'isComplete'}); } - if (property_exists($data, 'currencyCode')) { + elseif (property_exists($data, 'isComplete') && $data->{'isComplete'} === null) { + $object->setIsComplete(null); + } + if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - if (property_exists($data, 'currencyExchangeRate')) { + elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { + $object->setCurrencyCode(null); + } + if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); } - if (property_exists($data, 'currencyPrecision')) { + elseif (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} === null) { + $object->setCurrencyExchangeRate(null); + } + if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { $object->setCurrencyPrecision($data->{'currencyPrecision'}); } - if (property_exists($data, 'langCode')) { + elseif (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} === null) { + $object->setCurrencyPrecision(null); + } + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'paymentReference')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { $object->setPaymentReference($data->{'paymentReference'}); } - if (property_exists($data, 'paymentStatus')) { + elseif (property_exists($data, 'paymentReference') && $data->{'paymentReference'} === null) { + $object->setPaymentReference(null); + } + if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { $object->setPaymentStatus($data->{'paymentStatus'}); } - if (property_exists($data, 'isRead')) { + elseif (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} === null) { + $object->setPaymentStatus(null); + } + if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { $object->setIsRead($data->{'isRead'}); } - if (property_exists($data, 'hasComment')) { + elseif (property_exists($data, 'isRead') && $data->{'isRead'} === null) { + $object->setIsRead(null); + } + if (property_exists($data, 'hasComment') && $data->{'hasComment'} !== null) { $object->setHasComment($data->{'hasComment'}); } - if (property_exists($data, 'internalComment')) { + elseif (property_exists($data, 'hasComment') && $data->{'hasComment'} === null) { + $object->setHasComment(null); + } + if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { $object->setInternalComment($data->{'internalComment'}); } - if (property_exists($data, 'shippingTrackerType')) { + elseif (property_exists($data, 'internalComment') && $data->{'internalComment'} === null) { + $object->setInternalComment(null); + } + if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { $object->setShippingTrackerType($data->{'shippingTrackerType'}); } - if (property_exists($data, 'shippingTrackingNo')) { + elseif (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} === null) { + $object->setShippingTrackerType(null); + } + if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); } - if (property_exists($data, 'originalCustomerEmail')) { + elseif (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} === null) { + $object->setShippingTrackingNo(null); + } + if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); } - if (property_exists($data, 'originalCustomerNationalIdNo')) { + elseif (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} === null) { + $object->setOriginalCustomerEmail(null); + } + if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); } - if (property_exists($data, 'originalCustomerVatNo')) { + elseif (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} === null) { + $object->setOriginalCustomerNationalIdNo(null); + } + if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); } - if (property_exists($data, 'originalCustomerCustomInfo1')) { + elseif (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} === null) { + $object->setOriginalCustomerVatNo(null); + } + if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); } - if (property_exists($data, 'originalCustomerCustomInfo2')) { + elseif (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} === null) { + $object->setOriginalCustomerCustomInfo1(null); + } + if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } - if (property_exists($data, 'items')) { + elseif (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} === null) { + $object->setOriginalCustomerCustomInfo2(null); + } + if (property_exists($data, 'items') && $data->{'items'} !== null) { $values = array(); foreach ($data->{'items'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); } $object->setItems($values); } - if (property_exists($data, 'addresses')) { + elseif (property_exists($data, 'items') && $data->{'items'} === null) { + $object->setItems(null); + } + if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); } + elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { + $object->setAddresses(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -193,108 +346,213 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getCustomerId()) { $data->{'customerId'} = $object->getCustomerId(); } + else { + $data->{'customerId'} = null; + } if (null !== $object->getStatusId()) { $data->{'statusId'} = $object->getStatusId(); } + else { + $data->{'statusId'} = null; + } if (null !== $object->getOnOrderStatusChangeSendEmail()) { $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); } + else { + $data->{'onOrderStatusChangeSendEmail'} = null; + } if (null !== $object->getOnOrderStatusChangeProcessPayment()) { $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); } + else { + $data->{'onOrderStatusChangeProcessPayment'} = null; + } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } + else { + $data->{'shippingMethodId'} = null; + } if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } + else { + $data->{'paymentMethodId'} = null; + } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } + else { + $data->{'paymentMethodName'} = null; + } if (null !== $object->getPaymentFee()) { $data->{'paymentFee'} = $object->getPaymentFee(); } + else { + $data->{'paymentFee'} = null; + } if (null !== $object->getPaymentVatRate()) { $data->{'paymentVatRate'} = $object->getPaymentVatRate(); } + else { + $data->{'paymentVatRate'} = null; + } if (null !== $object->getShippingMethodName()) { $data->{'shippingMethodName'} = $object->getShippingMethodName(); } + else { + $data->{'shippingMethodName'} = null; + } if (null !== $object->getShippingCost()) { $data->{'shippingCost'} = $object->getShippingCost(); } + else { + $data->{'shippingCost'} = null; + } if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } + else { + $data->{'shippingVatRate'} = null; + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } + else { + $data->{'customInfo1'} = null; + } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + else { + $data->{'customInfo2'} = null; + } if (null !== $object->getCustomInfo3()) { $data->{'customInfo3'} = $object->getCustomInfo3(); } + else { + $data->{'customInfo3'} = null; + } if (null !== $object->getCustomInfo4()) { $data->{'customInfo4'} = $object->getCustomInfo4(); } + else { + $data->{'customInfo4'} = null; + } if (null !== $object->getDiscountCode()) { $data->{'discountCode'} = $object->getDiscountCode(); } + else { + $data->{'discountCode'} = null; + } if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } + else { + $data->{'amountPaid'} = null; + } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } + else { + $data->{'isComplete'} = null; + } if (null !== $object->getCurrencyCode()) { $data->{'currencyCode'} = $object->getCurrencyCode(); } + else { + $data->{'currencyCode'} = null; + } if (null !== $object->getCurrencyExchangeRate()) { $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); } + else { + $data->{'currencyExchangeRate'} = null; + } if (null !== $object->getCurrencyPrecision()) { $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); } + else { + $data->{'currencyPrecision'} = null; + } if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getPaymentReference()) { $data->{'paymentReference'} = $object->getPaymentReference(); } + else { + $data->{'paymentReference'} = null; + } if (null !== $object->getPaymentStatus()) { $data->{'paymentStatus'} = $object->getPaymentStatus(); } + else { + $data->{'paymentStatus'} = null; + } if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } + else { + $data->{'isRead'} = null; + } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } + else { + $data->{'internalComment'} = null; + } if (null !== $object->getShippingTrackerType()) { $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); } + else { + $data->{'shippingTrackerType'} = null; + } if (null !== $object->getShippingTrackingNo()) { $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); } + else { + $data->{'shippingTrackingNo'} = null; + } if (null !== $object->getOriginalCustomerEmail()) { $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); } + else { + $data->{'originalCustomerEmail'} = null; + } if (null !== $object->getOriginalCustomerNationalIdNo()) { $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); } + else { + $data->{'originalCustomerNationalIdNo'} = null; + } if (null !== $object->getOriginalCustomerVatNo()) { $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); } + else { + $data->{'originalCustomerVatNo'} = null; + } if (null !== $object->getOriginalCustomerCustomInfo1()) { $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); } + else { + $data->{'originalCustomerCustomInfo1'} = null; + } if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } + else { + $data->{'originalCustomerCustomInfo2'} = null; + } if (null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { @@ -302,9 +560,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } + else { + $data->{'items'} = null; + } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } + else { + $data->{'addresses'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php index 557091f7..6493934b 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderStatusLanguageModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php index dd03fe16..e653983a 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderStatusLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php index 064fe8a8..cb11f392 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderStatusModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php index 142eb632..54ba6422 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderStatusModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index 62114a94..ae4609ec 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderStatusModel(); - if (property_exists($data, 'statusId')) { + if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - if (property_exists($data, 'shouldSendEmail')) { + elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { + $object->setStatusId(null); + } + if (property_exists($data, 'shouldSendEmail') && $data->{'shouldSendEmail'} !== null) { $object->setShouldSendEmail($data->{'shouldSendEmail'}); } - if (property_exists($data, 'idCode')) { + elseif (property_exists($data, 'shouldSendEmail') && $data->{'shouldSendEmail'} === null) { + $object->setShouldSendEmail(null); + } + if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { + $object->setIdCode(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,9 +60,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShouldSendEmail()) { $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); } + else { + $data->{'shouldSendEmail'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index f9ce1803..5819eae5 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -25,166 +25,319 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\OrderUpdateModel(); - if (property_exists($data, 'orderId')) { + if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { $object->setOrderId($data->{'orderId'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'orderId') && $data->{'orderId'} === null) { + $object->setOrderId(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'baseCurrencyCode')) { + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } + if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } - if (property_exists($data, 'shopCountryCode')) { + elseif (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} === null) { + $object->setBaseCurrencyCode(null); + } + if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - if (property_exists($data, 'totalAmount')) { + elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { + $object->setShopCountryCode(null); + } + if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { $object->setTotalAmount($data->{'totalAmount'}); } - if (property_exists($data, 'totalVat')) { + elseif (property_exists($data, 'totalAmount') && $data->{'totalAmount'} === null) { + $object->setTotalAmount(null); + } + if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { $object->setTotalVat($data->{'totalVat'}); } - if (property_exists($data, 'amountToPay')) { + elseif (property_exists($data, 'totalVat') && $data->{'totalVat'} === null) { + $object->setTotalVat(null); + } + if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { $object->setAmountToPay($data->{'amountToPay'}); } - if (property_exists($data, 'totalAmountInBaseCurrency')) { + elseif (property_exists($data, 'amountToPay') && $data->{'amountToPay'} === null) { + $object->setAmountToPay(null); + } + if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); } - if (property_exists($data, 'totalVatInBaseCurrency')) { + elseif (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} === null) { + $object->setTotalAmountInBaseCurrency(null); + } + if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); } - if (property_exists($data, 'amountToPayInBaseCurrency')) { + elseif (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} === null) { + $object->setTotalVatInBaseCurrency(null); + } + if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); } - if (property_exists($data, 'createdAt')) { + elseif (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} === null) { + $object->setAmountToPayInBaseCurrency(null); + } + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - if (property_exists($data, 'customerId')) { + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } + if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - if (property_exists($data, 'statusId')) { + elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { + $object->setCustomerId(null); + } + if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - if (property_exists($data, 'onOrderStatusChangeSendEmail')) { + elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { + $object->setStatusId(null); + } + if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); } - if (property_exists($data, 'onOrderStatusChangeProcessPayment')) { + elseif (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} === null) { + $object->setOnOrderStatusChangeSendEmail(null); + } + if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); } - if (property_exists($data, 'shippingMethodId')) { + elseif (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} === null) { + $object->setOnOrderStatusChangeProcessPayment(null); + } + if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - if (property_exists($data, 'paymentMethodId')) { + elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { + $object->setShippingMethodId(null); + } + if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - if (property_exists($data, 'paymentMethodIdCode')) { + elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { + $object->setPaymentMethodId(null); + } + if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); } - if (property_exists($data, 'paymentMethodName')) { + elseif (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} === null) { + $object->setPaymentMethodIdCode(null); + } + if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { $object->setPaymentMethodName($data->{'paymentMethodName'}); } - if (property_exists($data, 'paymentFee')) { + elseif (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} === null) { + $object->setPaymentMethodName(null); + } + if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { $object->setPaymentFee($data->{'paymentFee'}); } - if (property_exists($data, 'paymentVatRate')) { + elseif (property_exists($data, 'paymentFee') && $data->{'paymentFee'} === null) { + $object->setPaymentFee(null); + } + if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { $object->setPaymentVatRate($data->{'paymentVatRate'}); } - if (property_exists($data, 'shippingMethodName')) { + elseif (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} === null) { + $object->setPaymentVatRate(null); + } + if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { $object->setShippingMethodName($data->{'shippingMethodName'}); } - if (property_exists($data, 'shippingCost')) { + elseif (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} === null) { + $object->setShippingMethodName(null); + } + if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { $object->setShippingCost($data->{'shippingCost'}); } - if (property_exists($data, 'shippingVatRate')) { + elseif (property_exists($data, 'shippingCost') && $data->{'shippingCost'} === null) { + $object->setShippingCost(null); + } + if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { $object->setShippingVatRate($data->{'shippingVatRate'}); } - if (property_exists($data, 'totalWeight')) { + elseif (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} === null) { + $object->setShippingVatRate(null); + } + if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { $object->setTotalWeight($data->{'totalWeight'}); } - if (property_exists($data, 'customInfo1')) { + elseif (property_exists($data, 'totalWeight') && $data->{'totalWeight'} === null) { + $object->setTotalWeight(null); + } + if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - if (property_exists($data, 'customInfo2')) { + elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { + $object->setCustomInfo1(null); + } + if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - if (property_exists($data, 'customInfo3')) { + elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { + $object->setCustomInfo2(null); + } + if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { $object->setCustomInfo3($data->{'customInfo3'}); } - if (property_exists($data, 'customInfo4')) { + elseif (property_exists($data, 'customInfo3') && $data->{'customInfo3'} === null) { + $object->setCustomInfo3(null); + } + if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { $object->setCustomInfo4($data->{'customInfo4'}); } - if (property_exists($data, 'discountCode')) { + elseif (property_exists($data, 'customInfo4') && $data->{'customInfo4'} === null) { + $object->setCustomInfo4(null); + } + if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { $object->setDiscountCode($data->{'discountCode'}); } - if (property_exists($data, 'amountPaid')) { + elseif (property_exists($data, 'discountCode') && $data->{'discountCode'} === null) { + $object->setDiscountCode(null); + } + if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { $object->setAmountPaid($data->{'amountPaid'}); } - if (property_exists($data, 'amountPaidInBaseCurrency')) { + elseif (property_exists($data, 'amountPaid') && $data->{'amountPaid'} === null) { + $object->setAmountPaid(null); + } + if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); } - if (property_exists($data, 'isComplete')) { + elseif (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} === null) { + $object->setAmountPaidInBaseCurrency(null); + } + if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { $object->setIsComplete($data->{'isComplete'}); } - if (property_exists($data, 'currencyCode')) { + elseif (property_exists($data, 'isComplete') && $data->{'isComplete'} === null) { + $object->setIsComplete(null); + } + if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - if (property_exists($data, 'currencyExchangeRate')) { + elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { + $object->setCurrencyCode(null); + } + if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); } - if (property_exists($data, 'currencyPrecision')) { + elseif (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} === null) { + $object->setCurrencyExchangeRate(null); + } + if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { $object->setCurrencyPrecision($data->{'currencyPrecision'}); } - if (property_exists($data, 'langCode')) { + elseif (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} === null) { + $object->setCurrencyPrecision(null); + } + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'paymentReference')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { $object->setPaymentReference($data->{'paymentReference'}); } - if (property_exists($data, 'paymentStatus')) { + elseif (property_exists($data, 'paymentReference') && $data->{'paymentReference'} === null) { + $object->setPaymentReference(null); + } + if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { $object->setPaymentStatus($data->{'paymentStatus'}); } - if (property_exists($data, 'isRead')) { + elseif (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} === null) { + $object->setPaymentStatus(null); + } + if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { $object->setIsRead($data->{'isRead'}); } - if (property_exists($data, 'hasComment')) { + elseif (property_exists($data, 'isRead') && $data->{'isRead'} === null) { + $object->setIsRead(null); + } + if (property_exists($data, 'hasComment') && $data->{'hasComment'} !== null) { $object->setHasComment($data->{'hasComment'}); } - if (property_exists($data, 'internalComment')) { + elseif (property_exists($data, 'hasComment') && $data->{'hasComment'} === null) { + $object->setHasComment(null); + } + if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { $object->setInternalComment($data->{'internalComment'}); } - if (property_exists($data, 'shippingTrackerType')) { + elseif (property_exists($data, 'internalComment') && $data->{'internalComment'} === null) { + $object->setInternalComment(null); + } + if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { $object->setShippingTrackerType($data->{'shippingTrackerType'}); } - if (property_exists($data, 'shippingTrackingNo')) { + elseif (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} === null) { + $object->setShippingTrackerType(null); + } + if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); } - if (property_exists($data, 'originalCustomerEmail')) { + elseif (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} === null) { + $object->setShippingTrackingNo(null); + } + if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); } - if (property_exists($data, 'originalCustomerNationalIdNo')) { + elseif (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} === null) { + $object->setOriginalCustomerEmail(null); + } + if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); } - if (property_exists($data, 'originalCustomerVatNo')) { + elseif (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} === null) { + $object->setOriginalCustomerNationalIdNo(null); + } + if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); } - if (property_exists($data, 'originalCustomerCustomInfo1')) { + elseif (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} === null) { + $object->setOriginalCustomerVatNo(null); + } + if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); } - if (property_exists($data, 'originalCustomerCustomInfo2')) { + elseif (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} === null) { + $object->setOriginalCustomerCustomInfo1(null); + } + if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } - if (property_exists($data, 'items')) { + elseif (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} === null) { + $object->setOriginalCustomerCustomInfo2(null); + } + if (property_exists($data, 'items') && $data->{'items'} !== null) { $values = array(); foreach ($data->{'items'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); } $object->setItems($values); } - if (property_exists($data, 'addresses')) { + elseif (property_exists($data, 'items') && $data->{'items'} === null) { + $object->setItems(null); + } + if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); } + elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { + $object->setAddresses(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -193,108 +346,213 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } + else { + $data->{'createdAt'} = null; + } if (null !== $object->getCustomerId()) { $data->{'customerId'} = $object->getCustomerId(); } + else { + $data->{'customerId'} = null; + } if (null !== $object->getStatusId()) { $data->{'statusId'} = $object->getStatusId(); } + else { + $data->{'statusId'} = null; + } if (null !== $object->getOnOrderStatusChangeSendEmail()) { $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); } + else { + $data->{'onOrderStatusChangeSendEmail'} = null; + } if (null !== $object->getOnOrderStatusChangeProcessPayment()) { $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); } + else { + $data->{'onOrderStatusChangeProcessPayment'} = null; + } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } + else { + $data->{'shippingMethodId'} = null; + } if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } + else { + $data->{'paymentMethodId'} = null; + } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } + else { + $data->{'paymentMethodName'} = null; + } if (null !== $object->getPaymentFee()) { $data->{'paymentFee'} = $object->getPaymentFee(); } + else { + $data->{'paymentFee'} = null; + } if (null !== $object->getPaymentVatRate()) { $data->{'paymentVatRate'} = $object->getPaymentVatRate(); } + else { + $data->{'paymentVatRate'} = null; + } if (null !== $object->getShippingMethodName()) { $data->{'shippingMethodName'} = $object->getShippingMethodName(); } + else { + $data->{'shippingMethodName'} = null; + } if (null !== $object->getShippingCost()) { $data->{'shippingCost'} = $object->getShippingCost(); } + else { + $data->{'shippingCost'} = null; + } if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } + else { + $data->{'shippingVatRate'} = null; + } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } + else { + $data->{'customInfo1'} = null; + } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } + else { + $data->{'customInfo2'} = null; + } if (null !== $object->getCustomInfo3()) { $data->{'customInfo3'} = $object->getCustomInfo3(); } + else { + $data->{'customInfo3'} = null; + } if (null !== $object->getCustomInfo4()) { $data->{'customInfo4'} = $object->getCustomInfo4(); } + else { + $data->{'customInfo4'} = null; + } if (null !== $object->getDiscountCode()) { $data->{'discountCode'} = $object->getDiscountCode(); } + else { + $data->{'discountCode'} = null; + } if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } + else { + $data->{'amountPaid'} = null; + } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } + else { + $data->{'isComplete'} = null; + } if (null !== $object->getCurrencyCode()) { $data->{'currencyCode'} = $object->getCurrencyCode(); } + else { + $data->{'currencyCode'} = null; + } if (null !== $object->getCurrencyExchangeRate()) { $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); } + else { + $data->{'currencyExchangeRate'} = null; + } if (null !== $object->getCurrencyPrecision()) { $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); } + else { + $data->{'currencyPrecision'} = null; + } if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getPaymentReference()) { $data->{'paymentReference'} = $object->getPaymentReference(); } + else { + $data->{'paymentReference'} = null; + } if (null !== $object->getPaymentStatus()) { $data->{'paymentStatus'} = $object->getPaymentStatus(); } + else { + $data->{'paymentStatus'} = null; + } if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } + else { + $data->{'isRead'} = null; + } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } + else { + $data->{'internalComment'} = null; + } if (null !== $object->getShippingTrackerType()) { $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); } + else { + $data->{'shippingTrackerType'} = null; + } if (null !== $object->getShippingTrackingNo()) { $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); } + else { + $data->{'shippingTrackingNo'} = null; + } if (null !== $object->getOriginalCustomerEmail()) { $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); } + else { + $data->{'originalCustomerEmail'} = null; + } if (null !== $object->getOriginalCustomerNationalIdNo()) { $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); } + else { + $data->{'originalCustomerNationalIdNo'} = null; + } if (null !== $object->getOriginalCustomerVatNo()) { $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); } + else { + $data->{'originalCustomerVatNo'} = null; + } if (null !== $object->getOriginalCustomerCustomInfo1()) { $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); } + else { + $data->{'originalCustomerCustomInfo1'} = null; + } if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } + else { + $data->{'originalCustomerCustomInfo2'} = null; + } if (null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { @@ -302,9 +560,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } + else { + $data->{'items'} = null; + } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } + else { + $data->{'addresses'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index 3fd9b8c8..19abd7f8 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -25,24 +25,39 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PaginationModel(); - if (property_exists($data, 'current_page')) { + if (property_exists($data, 'current_page') && $data->{'current_page'} !== null) { $object->setCurrentPage($data->{'current_page'}); } - if (property_exists($data, 'per_page')) { + elseif (property_exists($data, 'current_page') && $data->{'current_page'} === null) { + $object->setCurrentPage(null); + } + if (property_exists($data, 'per_page') && $data->{'per_page'} !== null) { $object->setPerPage($data->{'per_page'}); } - if (property_exists($data, 'total')) { + elseif (property_exists($data, 'per_page') && $data->{'per_page'} === null) { + $object->setPerPage(null); + } + if (property_exists($data, 'total') && $data->{'total'} !== null) { $object->setTotal($data->{'total'}); } - if (property_exists($data, 'count')) { + elseif (property_exists($data, 'total') && $data->{'total'} === null) { + $object->setTotal(null); + } + if (property_exists($data, 'count') && $data->{'count'} !== null) { $object->setCount($data->{'count'}); } - if (property_exists($data, 'total_pages')) { + elseif (property_exists($data, 'count') && $data->{'count'} === null) { + $object->setCount(null); + } + if (property_exists($data, 'total_pages') && $data->{'total_pages'} !== null) { $object->setTotalPages($data->{'total_pages'}); } + elseif (property_exists($data, 'total_pages') && $data->{'total_pages'} === null) { + $object->setTotalPages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php index edc28f07..15cf03c9 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PaymentMethodLanguageModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index 72d84909..72b2c190 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PaymentMethodLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'title')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'title') && $data->{'title'} !== null) { $object->setTitle($data->{'title'}); } - if (property_exists($data, 'shortDescription')) { + elseif (property_exists($data, 'title') && $data->{'title'} === null) { + $object->setTitle(null); + } + if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } + elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { + $object->setShortDescription(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php index 6fe9f384..0db4a2cf 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PaymentMethodModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php index bf477dfd..94fe633a 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PaymentMethodModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index 70a7e8aa..293a437f 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -25,31 +25,49 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PaymentMethodModel(); - if (property_exists($data, 'paymentMethodId')) { + if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - if (property_exists($data, 'idCode')) { + elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { + $object->setPaymentMethodId(null); + } + if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - if (property_exists($data, 'active')) { + elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { + $object->setIdCode(null); + } + if (property_exists($data, 'active') && $data->{'active'} !== null) { $object->setActive($data->{'active'}); } - if (property_exists($data, 'fee')) { + elseif (property_exists($data, 'active') && $data->{'active'} === null) { + $object->setActive(null); + } + if (property_exists($data, 'fee') && $data->{'fee'} !== null) { $object->setFee($data->{'fee'}); } - if (property_exists($data, 'validForCountries')) { + elseif (property_exists($data, 'fee') && $data->{'fee'} === null) { + $object->setFee(null); + } + if (property_exists($data, 'validForCountries') && $data->{'validForCountries'} !== null) { $object->setValidForCountries($data->{'validForCountries'}); } - if (property_exists($data, 'validCountriesSelected')) { + elseif (property_exists($data, 'validForCountries') && $data->{'validForCountries'} === null) { + $object->setValidForCountries(null); + } + if (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} !== null) { $values = array(); foreach ($data->{'validCountriesSelected'} as $value) { $values[] = $value; } $object->setValidCountriesSelected($values); } + elseif (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} === null) { + $object->setValidCountriesSelected(null); + } if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); } @@ -74,21 +92,30 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} === null) { $object->setValidForMaxWeight(null); } - if (property_exists($data, 'validForShippingMethods')) { + if (property_exists($data, 'validForShippingMethods') && $data->{'validForShippingMethods'} !== null) { $object->setValidForShippingMethods($data->{'validForShippingMethods'}); } + elseif (property_exists($data, 'validForShippingMethods') && $data->{'validForShippingMethods'} === null) { + $object->setValidForShippingMethods(null); + } if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { $object->setValidForCustomerType($data->{'validForCustomerType'}); } elseif (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} === null) { $object->setValidForCustomerType(null); } - if (property_exists($data, 'isClickAndCollect')) { + if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} === null) { + $object->setIsClickAndCollect(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -97,6 +124,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php index db58717d..dc03612e 100644 --- a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PricelistModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\PricelistModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php index f193a253..3e2df5a0 100644 --- a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PricelistModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\PricelistModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 5df2c952..149be832 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\PricelistModel(); - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,54 +46,99 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'name')) { + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'isMaster')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'isMaster') && $data->{'isMaster'} !== null) { $object->setIsMaster($data->{'isMaster'}); } - if (property_exists($data, 'isActive')) { + elseif (property_exists($data, 'isMaster') && $data->{'isMaster'} === null) { + $object->setIsMaster(null); + } + if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - if (property_exists($data, 'region')) { + elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { + $object->setIsActive(null); + } + if (property_exists($data, 'region') && $data->{'region'} !== null) { $object->setRegion($data->{'region'}); } - if (property_exists($data, 'countryCodes')) { + elseif (property_exists($data, 'region') && $data->{'region'} === null) { + $object->setRegion(null); + } + if (property_exists($data, 'countryCodes') && $data->{'countryCodes'} !== null) { $values = array(); foreach ($data->{'countryCodes'} as $value) { $values[] = $value; } $object->setCountryCodes($values); } - if (property_exists($data, 'currencyCode')) { + elseif (property_exists($data, 'countryCodes') && $data->{'countryCodes'} === null) { + $object->setCountryCodes(null); + } + if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } + elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { + $object->setCurrencyCode(null); + } if (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} !== null) { $object->setParentPricelistId($data->{'parentPricelistId'}); } elseif (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} === null) { $object->setParentPricelistId(null); } - if (property_exists($data, 'isCustomerPricelist')) { + if (property_exists($data, 'isCustomerPricelist') && $data->{'isCustomerPricelist'} !== null) { $object->setIsCustomerPricelist($data->{'isCustomerPricelist'}); } - if (property_exists($data, 'isCountryPricelist')) { + elseif (property_exists($data, 'isCustomerPricelist') && $data->{'isCustomerPricelist'} === null) { + $object->setIsCustomerPricelist(null); + } + if (property_exists($data, 'isCountryPricelist') && $data->{'isCountryPricelist'} !== null) { $object->setIsCountryPricelist($data->{'isCountryPricelist'}); } + elseif (property_exists($data, 'isCountryPricelist') && $data->{'isCountryPricelist'} === null) { + $object->setIsCountryPricelist(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'parentPricelistId'} = $object->getParentPricelistId(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } + if (null !== $object->getParentPricelistId()) { + $data->{'parentPricelistId'} = $object->getParentPricelistId(); + } + else { + $data->{'parentPricelistId'} = null; + } if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); } + else { + $data->{'isCustomerPricelist'} = null; + } if (null !== $object->getIsCountryPricelist()) { $data->{'isCountryPricelist'} = $object->getIsCountryPricelist(); } + else { + $data->{'isCountryPricelist'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php index f5928eff..42ebcc3d 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php index a722b123..196993d1 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php index bfbc216e..9b0fe862 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModel(); - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } @@ -45,7 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } - $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); + else { + $data->{'pricelistId'} = null; + } + if (null !== $object->getSpecialPriceExVat()) { + $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); + } + else { + $data->{'specialPriceExVat'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php index 11288b41..c21f06a5 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryLanguagesModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php index f201b3d1..7eb2f0ea 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryLanguagesModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { $object->setPageTitle($data->{'pageTitle'}); } @@ -72,14 +78,45 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - $data->{'pageTitle'} = $object->getPageTitle(); - $data->{'description'} = $object->getDescription(); - $data->{'bottomDescription'} = $object->getBottomDescription(); - $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); - $data->{'permalink'} = $object->getPermalink(); + else { + $data->{'name'} = null; + } + if (null !== $object->getPageTitle()) { + $data->{'pageTitle'} = $object->getPageTitle(); + } + else { + $data->{'pageTitle'} = null; + } + if (null !== $object->getDescription()) { + $data->{'description'} = $object->getDescription(); + } + else { + $data->{'description'} = null; + } + if (null !== $object->getBottomDescription()) { + $data->{'bottomDescription'} = $object->getBottomDescription(); + } + else { + $data->{'bottomDescription'} = null; + } + if (null !== $object->getPageMetaDescription()) { + $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); + } + else { + $data->{'pageMetaDescription'} = null; + } + if (null !== $object->getPermalink()) { + $data->{'permalink'} = $object->getPermalink(); + } + else { + $data->{'permalink'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php index 27a88a03..6561e35c 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php index be0ae183..e1fdec66 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php index 4798b5fb..057f7227 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModel(); - if (property_exists($data, 'categoryId')) { + if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { $object->setCategoryId($data->{'categoryId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'categoryId') && $data->{'categoryId'} === null) { + $object->setCategoryId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCategoryId()) { $data->{'categoryId'} = $object->getCategoryId(); } + else { + $data->{'categoryId'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php index 77950586..751dca0d 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelCollectionMeta(); - if (property_exists($data, 'pagination')) { + if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } + elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { + $object->setPagination(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } + else { + $data->{'pagination'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php index 76764890..f794a51e 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel', 'json', $context); } $object->setData($values); } - if (property_exists($data, 'meta')) { + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } + if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta', 'json', $context)); } + elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { + $object->setMeta(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +56,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } + else { + $data->{'meta'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php index 72a9556d..6fade44d 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 0bf38669..01226dbf 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -25,27 +25,39 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryModel(); - if (property_exists($data, 'categoryId')) { + if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { $object->setCategoryId($data->{'categoryId'}); } + elseif (property_exists($data, 'categoryId') && $data->{'categoryId'} === null) { + $object->setCategoryId(null); + } if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { $object->setParentId($data->{'parentId'}); } elseif (property_exists($data, 'parentId') && $data->{'parentId'} === null) { $object->setParentId(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'openPage')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'openPage') && $data->{'openPage'} !== null) { $object->setOpenPage($data->{'openPage'}); } + elseif (property_exists($data, 'openPage') && $data->{'openPage'} === null) { + $object->setOpenPage(null); + } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } @@ -70,34 +82,77 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'hasChildren')) { + if (property_exists($data, 'hasChildren') && $data->{'hasChildren'} !== null) { $object->setHasChildren($data->{'hasChildren'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'hasChildren') && $data->{'hasChildren'} === null) { + $object->setHasChildren(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'parentId'} = $object->getParentId(); + if (null !== $object->getParentId()) { + $data->{'parentId'} = $object->getParentId(); + } + else { + $data->{'parentId'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getOpenPage()) { $data->{'openPage'} = $object->getOpenPage(); } - $data->{'imageFileId'} = $object->getImageFileId(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalType'} = $object->getExternalType(); - $data->{'externalIdType'} = $object->getExternalIdType(); + else { + $data->{'openPage'} = null; + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } + else { + $data->{'imageFileId'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalType()) { + $data->{'externalType'} = $object->getExternalType(); + } + else { + $data->{'externalType'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index b32ce9e0..566b1590 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -25,27 +25,39 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable(); - if (property_exists($data, 'categoryId')) { + if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { $object->setCategoryId($data->{'categoryId'}); } + elseif (property_exists($data, 'categoryId') && $data->{'categoryId'} === null) { + $object->setCategoryId(null); + } if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { $object->setParentId($data->{'parentId'}); } elseif (property_exists($data, 'parentId') && $data->{'parentId'} === null) { $object->setParentId(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'openPage')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'openPage') && $data->{'openPage'} !== null) { $object->setOpenPage($data->{'openPage'}); } + elseif (property_exists($data, 'openPage') && $data->{'openPage'} === null) { + $object->setOpenPage(null); + } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } @@ -70,35 +82,75 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'hasChildren')) { + if (property_exists($data, 'hasChildren') && $data->{'hasChildren'} !== null) { $object->setHasChildren($data->{'hasChildren'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'hasChildren') && $data->{'hasChildren'} === null) { + $object->setHasChildren(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'parentId'} = $object->getParentId(); + if (null !== $object->getParentId()) { + $data->{'parentId'} = $object->getParentId(); + } + else { + $data->{'parentId'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getOpenPage()) { $data->{'openPage'} = $object->getOpenPage(); } - $data->{'imageFileId'} = $object->getImageFileId(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalType'} = $object->getExternalType(); - $data->{'externalIdType'} = $object->getExternalIdType(); + else { + $data->{'openPage'} = null; + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } + else { + $data->{'imageFileId'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalType()) { + $data->{'externalType'} = $object->getExternalType(); + } + else { + $data->{'externalType'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -106,6 +158,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php index 7f11fe00..ca9dedc0 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductLanguageModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php index cffd3768..415d88ea 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductLanguageModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php index 4bb0742f..40fd16a7 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php @@ -25,30 +25,51 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'shortDescription')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } - if (property_exists($data, 'longDescription')) { + elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { + $object->setShortDescription(null); + } + if (property_exists($data, 'longDescription') && $data->{'longDescription'} !== null) { $object->setLongDescription($data->{'longDescription'}); } - if (property_exists($data, 'permalink')) { + elseif (property_exists($data, 'longDescription') && $data->{'longDescription'} === null) { + $object->setLongDescription(null); + } + if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { $object->setPermalink($data->{'permalink'}); } - if (property_exists($data, 'pageTitle')) { + elseif (property_exists($data, 'permalink') && $data->{'permalink'} === null) { + $object->setPermalink(null); + } + if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { $object->setPageTitle($data->{'pageTitle'}); } - if (property_exists($data, 'pageMetaDescription')) { + elseif (property_exists($data, 'pageTitle') && $data->{'pageTitle'} === null) { + $object->setPageTitle(null); + } + if (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} !== null) { $object->setPageMetaDescription($data->{'pageMetaDescription'}); } + elseif (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} === null) { + $object->setPageMetaDescription(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -57,24 +78,45 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getShortDescription()) { $data->{'shortDescription'} = $object->getShortDescription(); } + else { + $data->{'shortDescription'} = null; + } if (null !== $object->getLongDescription()) { $data->{'longDescription'} = $object->getLongDescription(); } + else { + $data->{'longDescription'} = null; + } if (null !== $object->getPermalink()) { $data->{'permalink'} = $object->getPermalink(); } + else { + $data->{'permalink'} = null; + } if (null !== $object->getPageTitle()) { $data->{'pageTitle'} = $object->getPageTitle(); } + else { + $data->{'pageTitle'} = null; + } if (null !== $object->getPageMetaDescription()) { $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); } + else { + $data->{'pageMetaDescription'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php index 713772b2..9b6d1409 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductLanguageSlimModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'shortDescription')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } - if (property_exists($data, 'permalink')) { + elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { + $object->setShortDescription(null); + } + if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { $object->setPermalink($data->{'permalink'}); } + elseif (property_exists($data, 'permalink') && $data->{'permalink'} === null) { + $object->setPermalink(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +60,27 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getShortDescription()) { $data->{'shortDescription'} = $object->getShortDescription(); } + else { + $data->{'shortDescription'} = null; + } if (null !== $object->getPermalink()) { $data->{'permalink'} = $object->getPermalink(); } + else { + $data->{'permalink'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php index 243bbe23..51ef2a2d 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php index 607943fd..32af6a16 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 43de8f19..449e09b7 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModel(); - if (property_exists($data, 'manufacturerId')) { + if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } + elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { + $object->setManufacturerId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,9 +46,12 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'name')) { + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } @@ -57,12 +63,30 @@ public function denormalize($data, $class, $format = null, array $context = arra public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - $data->{'url'} = $object->getUrl(); + else { + $data->{'name'} = null; + } + if (null !== $object->getUrl()) { + $data->{'url'} = $object->getUrl(); + } + else { + $data->{'url'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php index e6cf081a..57ea3df6 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php index 18288e1a..e0371b74 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index ab6a742e..99083cb4 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModel(); - if (property_exists($data, 'productMediaFileId')) { + if (property_exists($data, 'productMediaFileId') && $data->{'productMediaFileId'} !== null) { $object->setProductMediaFileId($data->{'productMediaFileId'}); } - if (property_exists($data, 'mediaFileId')) { + elseif (property_exists($data, 'productMediaFileId') && $data->{'productMediaFileId'} === null) { + $object->setProductMediaFileId(null); + } + if (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} !== null) { $object->setMediaFileId($data->{'mediaFileId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} === null) { + $object->setMediaFileId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,9 +60,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMediaFileId()) { $data->{'mediaFileId'} = $object->getMediaFileId(); } + else { + $data->{'mediaFileId'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php index fe3cd699..b99b6800 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php index eefd17ba..046f7018 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php index e2f90437..56e805da 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModel(); - if (property_exists($data, 'metaDataId')) { + if (property_exists($data, 'metaDataId') && $data->{'metaDataId'} !== null) { $object->setMetaDataId($data->{'metaDataId'}); } - if (property_exists($data, 'metaDataTypeId')) { + elseif (property_exists($data, 'metaDataId') && $data->{'metaDataId'} === null) { + $object->setMetaDataId(null); + } + if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { $object->setMetaDataTypeId($data->{'metaDataTypeId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} === null) { + $object->setMetaDataTypeId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +60,27 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMetaDataId()) { $data->{'metaDataId'} = $object->getMetaDataId(); } + else { + $data->{'metaDataId'} = null; + } if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } + else { + $data->{'metaDataTypeId'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index 5da5b321..4d60d259 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -25,25 +25,37 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable(); - if (property_exists($data, 'metaDataId')) { + if (property_exists($data, 'metaDataId') && $data->{'metaDataId'} !== null) { $object->setMetaDataId($data->{'metaDataId'}); } - if (property_exists($data, 'metaDataTypeId')) { + elseif (property_exists($data, 'metaDataId') && $data->{'metaDataId'} === null) { + $object->setMetaDataId(null); + } + if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { $object->setMetaDataTypeId($data->{'metaDataTypeId'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} === null) { + $object->setMetaDataTypeId(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -52,9 +64,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } + else { + $data->{'metaDataTypeId'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -62,6 +80,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php index b7eec1ef..27cf2b5c 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeLanguageModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php index 940f21aa..c63897cd 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php index d662ea49..acdb493e 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php index 22cb2685..f028ce4d 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index 2f3b97f0..fe0bc90b 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModel(); - if (property_exists($data, 'metaDataTypeId')) { + if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { $object->setMetaDataTypeId($data->{'metaDataTypeId'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} === null) { + $object->setMetaDataTypeId(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,6 +48,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php index e0764307..653c9aed 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable(); - if (property_exists($data, 'languages')) { + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php index 450b18fe..12939120 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php index 2fe88510..b87c3a88 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php index edcc15df..27ec6295 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'value')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'value') && $data->{'value'} !== null) { $object->setValue($data->{'value'}); } + elseif (property_exists($data, 'value') && $data->{'value'} === null) { + $object->setValue(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getValue()) { $data->{'value'} = $object->getValue(); } + else { + $data->{'value'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php index 1c8ca4cd..24144813 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModelCollectionMeta(); - if (property_exists($data, 'pagination')) { + if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } + elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { + $object->setPagination(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } + else { + $data->{'pagination'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php index ffb72193..39553a73 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductModel', 'json', $context); } $object->setData($values); } - if (property_exists($data, 'meta')) { + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } + if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta', 'json', $context)); } + elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { + $object->setMeta(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +56,15 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } + else { + $data->{'meta'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php index b85ec0a3..ebeb5d57 100644 --- a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php index 89da5e52..1d4d3067 100644 --- a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModelLanguages(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 039aaf03..470f095a 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModel(); - if (property_exists($data, 'productId')) { + if (property_exists($data, 'productId') && $data->{'productId'} !== null) { $object->setProductId($data->{'productId'}); } + elseif (property_exists($data, 'productId') && $data->{'productId'} === null) { + $object->setProductId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,28 +46,40 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'createdAt')) { + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { $object->setDefaultVatRate(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'visibilityPricelistIds')) { + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } + if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { $values[] = $value; } $object->setVisibilityPricelistIds($values); } - if (property_exists($data, 'moreInfoUrl')) { + elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { + $object->setVisibilityPricelistIds(null); + } + if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } + elseif (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} === null) { + $object->setMoreInfoUrl(null); + } if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } @@ -83,65 +98,125 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { $object->setSortIndex(null); } - if (property_exists($data, 'type')) { + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'isBackInStockWatchable')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } - if (property_exists($data, 'bundleUseManualPrice')) { + elseif (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} === null) { + $object->setIsBackInStockWatchable(null); + } + if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } + elseif (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} === null) { + $object->setBundleUseManualPrice(null); + } if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { $object->setAccounting(null); } - if (property_exists($data, 'hasSeveralVariants')) { + if (property_exists($data, 'hasSeveralVariants') && $data->{'hasSeveralVariants'} !== null) { $object->setHasSeveralVariants($data->{'hasSeveralVariants'}); } - if (property_exists($data, 'modifiedAt')) { + elseif (property_exists($data, 'hasSeveralVariants') && $data->{'hasSeveralVariants'} === null) { + $object->setHasSeveralVariants(null); + } + if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - if (property_exists($data, 'variants')) { + elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { + $object->setModifiedAt(null); + } + if (property_exists($data, 'variants') && $data->{'variants'} !== null) { $object->setVariants($this->denormalizer->denormalize($data->{'variants'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection', 'json', $context)); } - if (property_exists($data, 'bundledProducts')) { + elseif (property_exists($data, 'variants') && $data->{'variants'} === null) { + $object->setVariants(null); + } + if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { $object->setBundledProducts($this->denormalizer->denormalize($data->{'bundledProducts'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection', 'json', $context)); } - if (property_exists($data, 'mediaFiles')) { + elseif (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} === null) { + $object->setBundledProducts(null); + } + if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { $object->setMediaFiles($this->denormalizer->denormalize($data->{'mediaFiles'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection', 'json', $context)); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} === null) { + $object->setMediaFiles(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages', 'json', $context)); } - if (property_exists($data, 'vatRates')) { + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } + if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { $object->setVatRates($this->denormalizer->denormalize($data->{'vatRates'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection', 'json', $context)); } - if (property_exists($data, 'categories')) { + elseif (property_exists($data, 'vatRates') && $data->{'vatRates'} === null) { + $object->setVatRates(null); + } + if (property_exists($data, 'categories') && $data->{'categories'} !== null) { $object->setCategories($this->denormalizer->denormalize($data->{'categories'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection', 'json', $context)); } - if (property_exists($data, 'unit')) { + elseif (property_exists($data, 'categories') && $data->{'categories'} === null) { + $object->setCategories(null); + } + if (property_exists($data, 'unit') && $data->{'unit'} !== null) { $object->setUnit($this->denormalizer->denormalize($data->{'unit'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json', $context)); } - if (property_exists($data, 'metaData')) { + elseif (property_exists($data, 'unit') && $data->{'unit'} === null) { + $object->setUnit(null); + } + if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { $object->setMetaData($this->denormalizer->denormalize($data->{'metaData'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection', 'json', $context)); } + elseif (property_exists($data, 'metaData') && $data->{'metaData'} === null) { + $object->setMetaData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + else { + $data->{'createdAt'} = null; + } + if (null !== $object->getDefaultVatRate()) { + $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + } + else { + $data->{'defaultVatRate'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { @@ -149,46 +224,105 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'visibilityPricelistIds'} = $values; } + else { + $data->{'visibilityPricelistIds'} = null; + } if (null !== $object->getMoreInfoUrl()) { $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); } - $data->{'manufacturerId'} = $object->getManufacturerId(); - $data->{'unitId'} = $object->getUnitId(); - $data->{'sortIndex'} = $object->getSortIndex(); + else { + $data->{'moreInfoUrl'} = null; + } + if (null !== $object->getManufacturerId()) { + $data->{'manufacturerId'} = $object->getManufacturerId(); + } + else { + $data->{'manufacturerId'} = null; + } + if (null !== $object->getUnitId()) { + $data->{'unitId'} = $object->getUnitId(); + } + else { + $data->{'unitId'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } + else { + $data->{'isBackInStockWatchable'} = null; + } if (null !== $object->getBundleUseManualPrice()) { $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } - $data->{'accounting'} = $object->getAccounting(); + else { + $data->{'bundleUseManualPrice'} = null; + } + if (null !== $object->getAccounting()) { + $data->{'accounting'} = $object->getAccounting(); + } + else { + $data->{'accounting'} = null; + } if (null !== $object->getVariants()) { $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context); } + else { + $data->{'variants'} = null; + } if (null !== $object->getBundledProducts()) { $data->{'bundledProducts'} = $this->normalizer->normalize($object->getBundledProducts(), 'json', $context); } + else { + $data->{'bundledProducts'} = null; + } if (null !== $object->getMediaFiles()) { $data->{'mediaFiles'} = $this->normalizer->normalize($object->getMediaFiles(), 'json', $context); } + else { + $data->{'mediaFiles'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } if (null !== $object->getVatRates()) { $data->{'vatRates'} = $this->normalizer->normalize($object->getVatRates(), 'json', $context); } + else { + $data->{'vatRates'} = null; + } if (null !== $object->getCategories()) { $data->{'categories'} = $this->normalizer->normalize($object->getCategories(), 'json', $context); } + else { + $data->{'categories'} = null; + } if (null !== $object->getUnit()) { $data->{'unit'} = $this->normalizer->normalize($object->getUnit(), 'json', $context); } + else { + $data->{'unit'} = null; + } if (null !== $object->getMetaData()) { $data->{'metaData'} = $this->normalizer->normalize($object->getMetaData(), 'json', $context); } + else { + $data->{'metaData'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index b209c143..0c1ed54f 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModelPatchable(); if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { @@ -40,18 +40,24 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'createdAt')) { + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { $object->setDefaultVatRate(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { @@ -86,12 +92,18 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { $object->setSortIndex(null); } - if (property_exists($data, 'type')) { + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'isBackInStockWatchable')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } + elseif (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} === null) { + $object->setIsBackInStockWatchable(null); + } if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } @@ -104,55 +116,91 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { $object->setAccounting(null); } - if (property_exists($data, 'mediaFiles')) { + if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { $values_1 = array(); foreach ($data->{'mediaFiles'} as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context); } $object->setMediaFiles($values_1); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} === null) { + $object->setMediaFiles(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values_2 = array(); foreach ($data->{'languages'} as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context); } $object->setLanguages($values_2); } - if (property_exists($data, 'vatRates')) { + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } + if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { $values_3 = array(); foreach ($data->{'vatRates'} as $value_3) { $values_3[] = $this->denormalizer->denormalize($value_3, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context); } $object->setVatRates($values_3); } - if (property_exists($data, 'categories')) { + elseif (property_exists($data, 'vatRates') && $data->{'vatRates'} === null) { + $object->setVatRates(null); + } + if (property_exists($data, 'categories') && $data->{'categories'} !== null) { $values_4 = array(); foreach ($data->{'categories'} as $value_4) { $values_4[] = $this->denormalizer->denormalize($value_4, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context); } $object->setCategories($values_4); } - if (property_exists($data, 'metaData')) { + elseif (property_exists($data, 'categories') && $data->{'categories'} === null) { + $object->setCategories(null); + } + if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { $values_5 = array(); foreach ($data->{'metaData'} as $value_5) { $values_5[] = $this->denormalizer->denormalize($value_5, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable', 'json', $context); } $object->setMetaData($values_5); } + elseif (property_exists($data, 'metaData') && $data->{'metaData'} === null) { + $object->setMetaData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + else { + $data->{'createdAt'} = null; + } + if (null !== $object->getDefaultVatRate()) { + $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + } + else { + $data->{'defaultVatRate'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { @@ -163,18 +211,54 @@ public function normalize($object, $format = null, array $context = array()) else { $data->{'visibilityPricelistIds'} = null; } - $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); - $data->{'manufacturerId'} = $object->getManufacturerId(); - $data->{'unitId'} = $object->getUnitId(); - $data->{'sortIndex'} = $object->getSortIndex(); + if (null !== $object->getMoreInfoUrl()) { + $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); + } + else { + $data->{'moreInfoUrl'} = null; + } + if (null !== $object->getManufacturerId()) { + $data->{'manufacturerId'} = $object->getManufacturerId(); + } + else { + $data->{'manufacturerId'} = null; + } + if (null !== $object->getUnitId()) { + $data->{'unitId'} = $object->getUnitId(); + } + else { + $data->{'unitId'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - $data->{'accounting'} = $object->getAccounting(); + else { + $data->{'isBackInStockWatchable'} = null; + } + if (null !== $object->getBundleUseManualPrice()) { + $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); + } + else { + $data->{'bundleUseManualPrice'} = null; + } + if (null !== $object->getAccounting()) { + $data->{'accounting'} = $object->getAccounting(); + } + else { + $data->{'accounting'} = null; + } if (null !== $object->getMediaFiles()) { $values_1 = array(); foreach ($object->getMediaFiles() as $value_1) { @@ -182,6 +266,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'mediaFiles'} = $values_1; } + else { + $data->{'mediaFiles'} = null; + } if (null !== $object->getLanguages()) { $values_2 = array(); foreach ($object->getLanguages() as $value_2) { @@ -189,6 +276,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values_2; } + else { + $data->{'languages'} = null; + } if (null !== $object->getVatRates()) { $values_3 = array(); foreach ($object->getVatRates() as $value_3) { @@ -196,6 +286,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'vatRates'} = $values_3; } + else { + $data->{'vatRates'} = null; + } if (null !== $object->getCategories()) { $values_4 = array(); foreach ($object->getCategories() as $value_4) { @@ -203,6 +296,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'categories'} = $values_4; } + else { + $data->{'categories'} = null; + } if (null !== $object->getMetaData()) { $values_5 = array(); foreach ($object->getMetaData() as $value_5) { @@ -210,6 +306,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'metaData'} = $values_5; } + else { + $data->{'metaData'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 96cdbcdb..62baf164 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductModelUpdatable(); if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { @@ -40,18 +40,24 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'createdAt')) { + if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } + elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { + $object->setCreatedAt(null); + } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { $object->setDefaultVatRate(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { @@ -62,9 +68,12 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { $object->setVisibilityPricelistIds(null); } - if (property_exists($data, 'moreInfoUrl')) { + if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } + elseif (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} === null) { + $object->setMoreInfoUrl(null); + } if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } @@ -83,12 +92,18 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { $object->setSortIndex(null); } - if (property_exists($data, 'type')) { + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'isBackInStockWatchable')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } + elseif (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} === null) { + $object->setIsBackInStockWatchable(null); + } if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } @@ -101,13 +116,16 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { $object->setAccounting(null); } - if (property_exists($data, 'variants')) { + if (property_exists($data, 'variants') && $data->{'variants'} !== null) { $values_1 = array(); foreach ($data->{'variants'} as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel', 'json', $context); } $object->setVariants($values_1); } + elseif (property_exists($data, 'variants') && $data->{'variants'} === null) { + $object->setVariants(null); + } if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { $values_2 = array(); foreach ($data->{'bundledProducts'} as $value_2) { @@ -118,55 +136,91 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} === null) { $object->setBundledProducts(null); } - if (property_exists($data, 'mediaFiles')) { + if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { $values_3 = array(); foreach ($data->{'mediaFiles'} as $value_3) { $values_3[] = $this->denormalizer->denormalize($value_3, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context); } $object->setMediaFiles($values_3); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} === null) { + $object->setMediaFiles(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values_4 = array(); foreach ($data->{'languages'} as $value_4) { $values_4[] = $this->denormalizer->denormalize($value_4, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context); } $object->setLanguages($values_4); } - if (property_exists($data, 'vatRates')) { + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } + if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { $values_5 = array(); foreach ($data->{'vatRates'} as $value_5) { $values_5[] = $this->denormalizer->denormalize($value_5, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context); } $object->setVatRates($values_5); } - if (property_exists($data, 'categories')) { + elseif (property_exists($data, 'vatRates') && $data->{'vatRates'} === null) { + $object->setVatRates(null); + } + if (property_exists($data, 'categories') && $data->{'categories'} !== null) { $values_6 = array(); foreach ($data->{'categories'} as $value_6) { $values_6[] = $this->denormalizer->denormalize($value_6, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context); } $object->setCategories($values_6); } - if (property_exists($data, 'metaData')) { + elseif (property_exists($data, 'categories') && $data->{'categories'} === null) { + $object->setCategories(null); + } + if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { $values_7 = array(); foreach ($data->{'metaData'} as $value_7) { $values_7[] = $this->denormalizer->denormalize($value_7, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable', 'json', $context); } $object->setMetaData($values_7); } + elseif (property_exists($data, 'metaData') && $data->{'metaData'} === null) { + $object->setMetaData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + else { + $data->{'createdAt'} = null; + } + if (null !== $object->getDefaultVatRate()) { + $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + } + else { + $data->{'defaultVatRate'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { @@ -180,17 +234,51 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMoreInfoUrl()) { $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); } - $data->{'manufacturerId'} = $object->getManufacturerId(); - $data->{'unitId'} = $object->getUnitId(); - $data->{'sortIndex'} = $object->getSortIndex(); + else { + $data->{'moreInfoUrl'} = null; + } + if (null !== $object->getManufacturerId()) { + $data->{'manufacturerId'} = $object->getManufacturerId(); + } + else { + $data->{'manufacturerId'} = null; + } + if (null !== $object->getUnitId()) { + $data->{'unitId'} = $object->getUnitId(); + } + else { + $data->{'unitId'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - $data->{'accounting'} = $object->getAccounting(); + else { + $data->{'isBackInStockWatchable'} = null; + } + if (null !== $object->getBundleUseManualPrice()) { + $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); + } + else { + $data->{'bundleUseManualPrice'} = null; + } + if (null !== $object->getAccounting()) { + $data->{'accounting'} = $object->getAccounting(); + } + else { + $data->{'accounting'} = null; + } if (null !== $object->getVariants()) { $values_1 = array(); foreach ($object->getVariants() as $value_1) { @@ -198,6 +286,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'variants'} = $values_1; } + else { + $data->{'variants'} = null; + } if (null !== $object->getBundledProducts()) { $values_2 = array(); foreach ($object->getBundledProducts() as $value_2) { @@ -215,6 +306,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'mediaFiles'} = $values_3; } + else { + $data->{'mediaFiles'} = null; + } if (null !== $object->getLanguages()) { $values_4 = array(); foreach ($object->getLanguages() as $value_4) { @@ -222,6 +316,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values_4; } + else { + $data->{'languages'} = null; + } if (null !== $object->getVatRates()) { $values_5 = array(); foreach ($object->getVatRates() as $value_5) { @@ -229,6 +326,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'vatRates'} = $values_5; } + else { + $data->{'vatRates'} = null; + } if (null !== $object->getCategories()) { $values_6 = array(); foreach ($object->getCategories() as $value_6) { @@ -236,6 +336,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'categories'} = $values_6; } + else { + $data->{'categories'} = null; + } if (null !== $object->getMetaData()) { $values_7 = array(); foreach ($object->getMetaData() as $value_7) { @@ -243,6 +346,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'metaData'} = $values_7; } + else { + $data->{'metaData'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php index e5a7a277..01bca1a7 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductStockStatusLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php index 32e7ae36..e8167443 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index 0621f1db..b23fbd78 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php index 23eca402..aa375277 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php @@ -25,37 +25,55 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductStockStatusRequestModel(); - if (property_exists($data, 'stockStatusId')) { + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'idCode')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { + $object->setIdCode(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); } elseif (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} === null) { $object->setStockoutNewStatusId(null); } - if (property_exists($data, 'productBuyable')) { + if (property_exists($data, 'productBuyable') && $data->{'productBuyable'} !== null) { $object->setProductBuyable($data->{'productBuyable'}); } - if (property_exists($data, 'inStock')) { + elseif (property_exists($data, 'productBuyable') && $data->{'productBuyable'} === null) { + $object->setProductBuyable(null); + } + if (property_exists($data, 'inStock') && $data->{'inStock'} !== null) { $object->setInStock($data->{'inStock'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'inStock') && $data->{'inStock'} === null) { + $object->setInStock(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -64,13 +82,27 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); + else { + $data->{'sortIndex'} = null; + } + if (null !== $object->getStockoutNewStatusId()) { + $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); + } + else { + $data->{'stockoutNewStatusId'} = null; + } if (null !== $object->getProductBuyable()) { $data->{'productBuyable'} = $object->getProductBuyable(); } + else { + $data->{'productBuyable'} = null; + } if (null !== $object->getInStock()) { $data->{'inStock'} = $object->getInStock(); } + else { + $data->{'inStock'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -78,6 +110,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php index bd335cfd..fc5bb538 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductStockStatusResponseModelLanguages(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php index 92748e47..af8f77b7 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php @@ -25,33 +25,51 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductStockStatusResponseModel(); - if (property_exists($data, 'stockStatusId')) { + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'idCode')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { + $object->setIdCode(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); } elseif (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} === null) { $object->setStockoutNewStatusId(null); } - if (property_exists($data, 'productBuyable')) { + if (property_exists($data, 'productBuyable') && $data->{'productBuyable'} !== null) { $object->setProductBuyable($data->{'productBuyable'}); } - if (property_exists($data, 'inStock')) { + elseif (property_exists($data, 'productBuyable') && $data->{'productBuyable'} === null) { + $object->setProductBuyable(null); + } + if (property_exists($data, 'inStock') && $data->{'inStock'} !== null) { $object->setInStock($data->{'inStock'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'inStock') && $data->{'inStock'} === null) { + $object->setInStock(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,16 +78,33 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); + else { + $data->{'sortIndex'} = null; + } + if (null !== $object->getStockoutNewStatusId()) { + $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); + } + else { + $data->{'stockoutNewStatusId'} = null; + } if (null !== $object->getProductBuyable()) { $data->{'productBuyable'} = $object->getProductBuyable(); } + else { + $data->{'productBuyable'} = null; + } if (null !== $object->getInStock()) { $data->{'inStock'} = $object->getInStock(); } + else { + $data->{'inStock'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php index 625bb4fe..68c65139 100644 --- a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php index 230c4eff..65ed65ea 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php index e471318e..e26723bb 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php index 5b49b5cf..3af18723 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModel(); - if (property_exists($data, 'tagOptionId')) { + if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { $object->setTagOptionId($data->{'tagOptionId'}); } - if (property_exists($data, 'tagId')) { + elseif (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} === null) { + $object->setTagOptionId(null); + } + if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } + elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { + $object->setTagId(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagOptionId()) { $data->{'tagOptionId'} = $object->getTagOptionId(); } + else { + $data->{'tagOptionId'} = null; + } if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } + else { + $data->{'tagId'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php index 19ac0c8e..18980cc5 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel(); - if (property_exists($data, 'tagOptionId')) { + if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { $object->setTagOptionId($data->{'tagOptionId'}); } + elseif (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} === null) { + $object->setTagOptionId(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagOptionId()) { $data->{'tagOptionId'} = $object->getTagOptionId(); } + else { + $data->{'tagOptionId'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php index 0c8f71a8..f37d4edc 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php index 041eec83..e129a1c2 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index 41f99a03..acd901e5 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -25,22 +25,31 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagModel(); - if (property_exists($data, 'tagId')) { + if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { + $object->setTagId(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -53,6 +62,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php index 8e4c89fe..9a87f86e 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'value')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'value') && $data->{'value'} !== null) { $object->setValue($data->{'value'}); } + elseif (property_exists($data, 'value') && $data->{'value'} === null) { + $object->setValue(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getValue()) { $data->{'value'} = $object->getValue(); } + else { + $data->{'value'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php index 8701856c..b10a17d1 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php index 87e21841..ded90158 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index 1f1758fa..359b6592 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -25,25 +25,37 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModel(); - if (property_exists($data, 'tagOptionId')) { + if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { $object->setTagOptionId($data->{'tagOptionId'}); } - if (property_exists($data, 'value')) { + elseif (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} === null) { + $object->setTagOptionId(null); + } + if (property_exists($data, 'value') && $data->{'value'} !== null) { $object->setValue($data->{'value'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'value') && $data->{'value'} === null) { + $object->setValue(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -52,6 +64,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -59,6 +74,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php index b521dbc6..e8d4912a 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel(); - if (property_exists($data, 'sortIndex')) { + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -46,6 +52,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -53,6 +62,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php index 3ccaefc5..aa8a3bc6 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel(); - if (property_exists($data, 'sortIndex')) { + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -46,6 +52,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -53,6 +62,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php index 59fd4807..d3f4ea31 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php @@ -25,19 +25,25 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel(); - if (property_exists($data, 'sortIndex')) { + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -46,6 +52,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -53,6 +62,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php index 5cf3169b..0ce1ffd6 100644 --- a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php @@ -25,22 +25,31 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagPatchRequestModel(); - if (property_exists($data, 'name')) { + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -49,9 +58,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -59,6 +74,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php index 71334c93..3dfd277b 100644 --- a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php @@ -25,22 +25,31 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagPostRequestModel(); - if (property_exists($data, 'name')) { + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -49,9 +58,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -59,6 +74,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php index fa4f3322..08869873 100644 --- a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php @@ -25,22 +25,31 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductTagPutRequestModel(); - if (property_exists($data, 'name')) { + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'type')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -49,9 +58,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } + else { + $data->{'type'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -59,6 +74,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php index 1768c10e..2a7446df 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductUnitLanguageModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php index 7fc7ee97..b621ee65 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php @@ -25,18 +25,27 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductUnitLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'symbol')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'symbol') && $data->{'symbol'} !== null) { $object->setSymbol($data->{'symbol'}); } + elseif (property_exists($data, 'symbol') && $data->{'symbol'} === null) { + $object->setSymbol(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -45,12 +54,21 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getSymbol()) { $data->{'symbol'} = $object->getSymbol(); } + else { + $data->{'symbol'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php index bee0cfec..aa6deeaf 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductUnitModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php index 5f5b9b93..c9a80872 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductUnitModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index c2cedad8..ae6d6ad7 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductUnitModel(); - if (property_exists($data, 'unitId')) { + if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } + elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { + $object->setUnitId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,19 +46,35 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'languages')) { + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php index 77ca2c06..7780db46 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductUnitModelUpdatable(); - if (property_exists($data, 'unitId')) { + if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } + elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { + $object->setUnitId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,20 +46,33 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'languages')) { + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -64,6 +80,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php index 766e9f82..accf5511 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php index 239cbf0f..f288c4ba 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php index 3905c393..9ae6144e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php index 35656c46..3934e278 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelLanguages(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index f622ddb4..d40f2694 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModel(); - if (property_exists($data, 'attributeId')) { + if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { $object->setAttributeId($data->{'attributeId'}); } + elseif (property_exists($data, 'attributeId') && $data->{'attributeId'} === null) { + $object->setAttributeId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,9 +46,12 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'languages')) { + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,11 +60,27 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeId()) { $data->{'attributeId'} = $object->getAttributeId(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + else { + $data->{'attributeId'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index b516afae..19ed3d03 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable(); - if (property_exists($data, 'attributeId')) { + if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { $object->setAttributeId($data->{'attributeId'}); } + elseif (property_exists($data, 'attributeId') && $data->{'attributeId'} === null) { + $object->setAttributeId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,20 +46,33 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'languages')) { + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -64,6 +80,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php index 597ecd9c..ca20af40 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php index 64aee6de..ce6b5bf3 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php index f9f57420..ebd2bfdc 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php index d1a1aab5..b418451c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelLanguages(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index bcfae148..7cfa563f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModel(); - if (property_exists($data, 'attributeValueId')) { + if (property_exists($data, 'attributeValueId') && $data->{'attributeValueId'} !== null) { $object->setAttributeValueId($data->{'attributeValueId'}); } + elseif (property_exists($data, 'attributeValueId') && $data->{'attributeValueId'} === null) { + $object->setAttributeValueId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,15 +46,24 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'skuSuffix')) { + if (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} !== null) { $object->setSkuSuffix($data->{'skuSuffix'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} === null) { + $object->setSkuSuffix(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,17 +72,39 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeValueId()) { $data->{'attributeValueId'} = $object->getAttributeValueId(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + else { + $data->{'attributeValueId'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } + else { + $data->{'skuSuffix'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 654cfa7a..0c896911 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable(); if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { @@ -40,32 +40,57 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'skuSuffix')) { + if (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} !== null) { $object->setSkuSuffix($data->{'skuSuffix'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} === null) { + $object->setSkuSuffix(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } + else { + $data->{'skuSuffix'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -73,6 +98,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php index b7299b36..222eafff 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index b7564bda..0eb76647 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php index e86cc674..566c9dd4 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel(); - if (property_exists($data, 'sku')) { + if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } + elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { + $object->setSku(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -125,17 +128,75 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); + else { + $data->{'sku'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } + if (null !== $object->getIsActive()) { + $data->{'isActive'} = $object->getIsActive(); + } + else { + $data->{'isActive'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + else { + $data->{'stockStatusId'} = null; + } + if (null !== $object->getStockQuantity()) { + $data->{'stockQuantity'} = $object->getStockQuantity(); + } + else { + $data->{'stockQuantity'} = null; + } + if (null !== $object->getWeightInKg()) { + $data->{'weightInKg'} = $object->getWeightInKg(); + } + else { + $data->{'weightInKg'} = null; + } + if (null !== $object->getCostPrice()) { + $data->{'costPrice'} = $object->getCostPrice(); + } + else { + $data->{'costPrice'} = null; + } + if (null !== $object->getEan()) { + $data->{'ean'} = $object->getEan(); + } + else { + $data->{'ean'} = null; + } + if (null !== $object->getMpn()) { + $data->{'mpn'} = $object->getMpn(); + } + else { + $data->{'mpn'} = null; + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } + else { + $data->{'imageFileId'} = null; + } if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php index 4ededf93..a1c16efb 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php index 3adc279f..b36dba20 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index f2cd043d..c700d956 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModel(); - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,22 +46,28 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'priceExVat')) { + if (property_exists($data, 'priceExVat') && $data->{'priceExVat'} !== null) { $object->setPriceExVat($data->{'priceExVat'}); } + elseif (property_exists($data, 'priceExVat') && $data->{'priceExVat'} === null) { + $object->setPriceExVat(null); + } if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } elseif (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} === null) { $object->setSpecialPriceExVat(null); } - if (property_exists($data, 'volumePrices')) { + if (property_exists($data, 'volumePrices') && $data->{'volumePrices'} !== null) { $values = array(); foreach ($data->{'volumePrices'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context); } $object->setVolumePrices($values); } + elseif (property_exists($data, 'volumePrices') && $data->{'volumePrices'} === null) { + $object->setVolumePrices(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -67,12 +76,33 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + else { + $data->{'pricelistId'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getPriceExVat()) { $data->{'priceExVat'} = $object->getPriceExVat(); } - $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); + else { + $data->{'priceExVat'} = null; + } + if (null !== $object->getSpecialPriceExVat()) { + $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); + } + else { + $data->{'specialPriceExVat'} = null; + } if (null !== $object->getVolumePrices()) { $values = array(); foreach ($object->getVolumePrices() as $value) { @@ -80,6 +110,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'volumePrices'} = $values; } + else { + $data->{'volumePrices'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php index aeac04ee..11417db0 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantPutRequestModel(); - if (property_exists($data, 'sku')) { + if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } + elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { + $object->setSku(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -125,17 +128,75 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); + else { + $data->{'sku'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } + if (null !== $object->getIsActive()) { + $data->{'isActive'} = $object->getIsActive(); + } + else { + $data->{'isActive'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + else { + $data->{'stockStatusId'} = null; + } + if (null !== $object->getStockQuantity()) { + $data->{'stockQuantity'} = $object->getStockQuantity(); + } + else { + $data->{'stockQuantity'} = null; + } + if (null !== $object->getWeightInKg()) { + $data->{'weightInKg'} = $object->getWeightInKg(); + } + else { + $data->{'weightInKg'} = null; + } + if (null !== $object->getCostPrice()) { + $data->{'costPrice'} = $object->getCostPrice(); + } + else { + $data->{'costPrice'} = null; + } + if (null !== $object->getEan()) { + $data->{'ean'} = $object->getEan(); + } + else { + $data->{'ean'} = null; + } + if (null !== $object->getMpn()) { + $data->{'mpn'} = $object->getMpn(); + } + else { + $data->{'mpn'} = null; + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } + else { + $data->{'imageFileId'} = null; + } if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php index 7521c11f..9539eb0a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantRequestModel(); - if (property_exists($data, 'sku')) { + if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } + elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { + $object->setSku(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -97,13 +100,16 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { $object->setImageFileId(null); } - if (property_exists($data, 'attributeValueLinks')) { + if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); } + elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { + $object->setAttributeValueLinks(null); + } if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { @@ -122,17 +128,75 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); + else { + $data->{'sku'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } + if (null !== $object->getIsActive()) { + $data->{'isActive'} = $object->getIsActive(); + } + else { + $data->{'isActive'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + else { + $data->{'stockStatusId'} = null; + } + if (null !== $object->getStockQuantity()) { + $data->{'stockQuantity'} = $object->getStockQuantity(); + } + else { + $data->{'stockQuantity'} = null; + } + if (null !== $object->getWeightInKg()) { + $data->{'weightInKg'} = $object->getWeightInKg(); + } + else { + $data->{'weightInKg'} = null; + } + if (null !== $object->getCostPrice()) { + $data->{'costPrice'} = $object->getCostPrice(); + } + else { + $data->{'costPrice'} = null; + } + if (null !== $object->getEan()) { + $data->{'ean'} = $object->getEan(); + } + else { + $data->{'ean'} = null; + } + if (null !== $object->getMpn()) { + $data->{'mpn'} = $object->getMpn(); + } + else { + $data->{'mpn'} = null; + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } + else { + $data->{'imageFileId'} = null; + } if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { @@ -140,6 +204,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValueLinks'} = $values; } + else { + $data->{'attributeValueLinks'} = null; + } if (null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php index 9ddfed54..e25d0034 100644 --- a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantResponseModel(); - if (property_exists($data, 'sku')) { + if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } + elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { + $object->setSku(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -97,13 +100,16 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { $object->setImageFileId(null); } - if (property_exists($data, 'attributeValueLinks')) { + if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); } + elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { + $object->setAttributeValueLinks(null); + } if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { @@ -114,23 +120,32 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { $object->setVolumePricingInheritancePricelistIds(null); } - if (property_exists($data, 'variantId')) { + if (property_exists($data, 'variantId') && $data->{'variantId'} !== null) { $object->setVariantId($data->{'variantId'}); } - if (property_exists($data, 'prices')) { + elseif (property_exists($data, 'variantId') && $data->{'variantId'} === null) { + $object->setVariantId(null); + } + if (property_exists($data, 'prices') && $data->{'prices'} !== null) { $values_2 = array(); foreach ($data->{'prices'} as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context); } $object->setPrices($values_2); } - if (property_exists($data, 'attributeValues')) { + elseif (property_exists($data, 'prices') && $data->{'prices'} === null) { + $object->setPrices(null); + } + if (property_exists($data, 'attributeValues') && $data->{'attributeValues'} !== null) { $values_3 = array(); foreach ($data->{'attributeValues'} as $value_3) { $values_3[] = $this->denormalizer->denormalize($value_3, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context); } $object->setAttributeValues($values_3); } + elseif (property_exists($data, 'attributeValues') && $data->{'attributeValues'} === null) { + $object->setAttributeValues(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -139,17 +154,75 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); + else { + $data->{'sku'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } + if (null !== $object->getIsActive()) { + $data->{'isActive'} = $object->getIsActive(); + } + else { + $data->{'isActive'} = null; + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + else { + $data->{'sortIndex'} = null; + } + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + else { + $data->{'stockStatusId'} = null; + } + if (null !== $object->getStockQuantity()) { + $data->{'stockQuantity'} = $object->getStockQuantity(); + } + else { + $data->{'stockQuantity'} = null; + } + if (null !== $object->getWeightInKg()) { + $data->{'weightInKg'} = $object->getWeightInKg(); + } + else { + $data->{'weightInKg'} = null; + } + if (null !== $object->getCostPrice()) { + $data->{'costPrice'} = $object->getCostPrice(); + } + else { + $data->{'costPrice'} = null; + } + if (null !== $object->getEan()) { + $data->{'ean'} = $object->getEan(); + } + else { + $data->{'ean'} = null; + } + if (null !== $object->getMpn()) { + $data->{'mpn'} = $object->getMpn(); + } + else { + $data->{'mpn'} = null; + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } + else { + $data->{'imageFileId'} = null; + } if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { @@ -157,6 +230,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValueLinks'} = $values; } + else { + $data->{'attributeValueLinks'} = null; + } if (null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { @@ -174,6 +250,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'prices'} = $values_2; } + else { + $data->{'prices'} = null; + } if (null !== $object->getAttributeValues()) { $values_3 = array(); foreach ($object->getAttributeValues() as $value_3) { @@ -181,6 +260,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValues'} = $values_3; } + else { + $data->{'attributeValues'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php index 6ed76bea..8d87ef80 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantStockModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php index 3dc78ac2..f64cdb3c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantStockModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php index dc59128a..920af1a2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel(); - if (property_exists($data, 'stockStatusId')) { + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'stockQuantity')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } + elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { + $object->setStockQuantity(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } + else { + $data->{'stockStatusId'} = null; + } if (null !== $object->getStockQuantity()) { $data->{'stockQuantity'} = $object->getStockQuantity(); } + else { + $data->{'stockQuantity'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index 690e3bbe..cf57ea17 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -25,18 +25,27 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantStockResponseModel(); - if (property_exists($data, 'stockLocationId')) { + if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { $object->setStockLocationId($data->{'stockLocationId'}); } - if (property_exists($data, 'stockStatusId')) { + elseif (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} === null) { + $object->setStockLocationId(null); + } + if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - if (property_exists($data, 'stockQuantity')) { + elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { + $object->setStockStatusId(null); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } + elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { + $object->setStockQuantity(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -45,9 +54,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } + else { + $data->{'stockStatusId'} = null; + } if (null !== $object->getStockQuantity()) { $data->{'stockQuantity'} = $object->getStockQuantity(); } + else { + $data->{'stockQuantity'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php index ae496f0d..9cc946a4 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php index d8639ed5..463f5b82 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php index 0189ecd7..3fc0a4db 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel(); - if (property_exists($data, 'pricelistId')) { + if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } + elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { + $object->setPricelistId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,12 +46,18 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'priceExVat')) { + if (property_exists($data, 'priceExVat') && $data->{'priceExVat'} !== null) { $object->setPriceExVat($data->{'priceExVat'}); } - if (property_exists($data, 'quantity')) { + elseif (property_exists($data, 'priceExVat') && $data->{'priceExVat'} === null) { + $object->setPriceExVat(null); + } + if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } + elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { + $object->setQuantity(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -57,14 +66,33 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + else { + $data->{'pricelistId'} = null; + } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getPriceExVat()) { $data->{'priceExVat'} = $object->getPriceExVat(); } + else { + $data->{'priceExVat'} = null; + } if (null !== $object->getQuantity()) { $data->{'quantity'} = $object->getQuantity(); } + else { + $data->{'quantity'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php index ce55b524..f7cc2025 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVatRateModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php index 314d388b..d98a114d 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVatRateModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php index dd1fe2dc..ea809821 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductVatRateModel(); - if (property_exists($data, 'countryCode')) { + if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { $object->setCountryCode($data->{'countryCode'}); } - if (property_exists($data, 'vatRate')) { + elseif (property_exists($data, 'countryCode') && $data->{'countryCode'} === null) { + $object->setCountryCode(null); + } + if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { $object->setVatRate($data->{'vatRate'}); } + elseif (property_exists($data, 'vatRate') && $data->{'vatRate'} === null) { + $object->setVatRate(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCountryCode()) { $data->{'countryCode'} = $object->getCountryCode(); } + else { + $data->{'countryCode'} = null; + } if (null !== $object->getVatRate()) { $data->{'vatRate'} = $object->getVatRate(); } + else { + $data->{'vatRate'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php index a3d8e697..24aa3b5f 100644 --- a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ProductsAttributesModelItem(); - if (property_exists($data, 'attributeId')) { + if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { $object->setAttributeId($data->{'attributeId'}); } + elseif (property_exists($data, 'attributeId') && $data->{'attributeId'} === null) { + $object->setAttributeId(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeId()) { $data->{'attributeId'} = $object->getAttributeId(); } + else { + $data->{'attributeId'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php index 95909813..e8e1e067 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingMethodLanguageModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index 4bdcd4b2..8d8a9439 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -25,21 +25,33 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingMethodLanguageModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'title')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'title') && $data->{'title'} !== null) { $object->setTitle($data->{'title'}); } - if (property_exists($data, 'shortDescription')) { + elseif (property_exists($data, 'title') && $data->{'title'} === null) { + $object->setTitle(null); + } + if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } + elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { + $object->setShortDescription(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php index 26841cc2..c4c8a7a3 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingMethodModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php index 59464780..fae87c5b 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingMethodModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index b307fe5f..8c7affb2 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -25,25 +25,37 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingMethodModel(); - if (property_exists($data, 'shippingMethodId')) { + if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - if (property_exists($data, 'active')) { + elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { + $object->setShippingMethodId(null); + } + if (property_exists($data, 'active') && $data->{'active'} !== null) { $object->setActive($data->{'active'}); } - if (property_exists($data, 'validForCountries')) { + elseif (property_exists($data, 'active') && $data->{'active'} === null) { + $object->setActive(null); + } + if (property_exists($data, 'validForCountries') && $data->{'validForCountries'} !== null) { $object->setValidForCountries($data->{'validForCountries'}); } - if (property_exists($data, 'validCountriesSelected')) { + elseif (property_exists($data, 'validForCountries') && $data->{'validForCountries'} === null) { + $object->setValidForCountries(null); + } + if (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} !== null) { $values = array(); foreach ($data->{'validCountriesSelected'} as $value) { $values[] = $value; } $object->setValidCountriesSelected($values); } + elseif (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} === null) { + $object->setValidCountriesSelected(null); + } if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); } @@ -86,12 +98,18 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'freeShippingMinWeight') && $data->{'freeShippingMinWeight'} === null) { $object->setFreeShippingMinWeight(null); } - if (property_exists($data, 'isClickAndCollect')) { + if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} === null) { + $object->setIsClickAndCollect(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -100,6 +118,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php index bb4ae394..6aeaf66e 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingTrackingTypeModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index 81dc7ec9..498548f2 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShippingTrackingTypeModel(); - if (property_exists($data, 'type')) { + if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'type') && $data->{'type'} === null) { + $object->setType(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ShopItemNormalizer.php b/src/Api/Generated/Normalizer/ShopItemNormalizer.php index 8549926b..dbfc1746 100644 --- a/src/Api/Generated/Normalizer/ShopItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShopItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ShopModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index c1b350f5..e1db687e 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -25,61 +25,109 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\ShopModel(); - if (property_exists($data, 'name')) { + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'idCode')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - if (property_exists($data, 'status')) { + elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { + $object->setIdCode(null); + } + if (property_exists($data, 'status') && $data->{'status'} !== null) { $object->setStatus($data->{'status'}); } - if (property_exists($data, 'defaultLangCode')) { + elseif (property_exists($data, 'status') && $data->{'status'} === null) { + $object->setStatus(null); + } + if (property_exists($data, 'defaultLangCode') && $data->{'defaultLangCode'} !== null) { $object->setDefaultLangCode($data->{'defaultLangCode'}); } - if (property_exists($data, 'activeLangCodes')) { + elseif (property_exists($data, 'defaultLangCode') && $data->{'defaultLangCode'} === null) { + $object->setDefaultLangCode(null); + } + if (property_exists($data, 'activeLangCodes') && $data->{'activeLangCodes'} !== null) { $values = array(); foreach ($data->{'activeLangCodes'} as $value) { $values[] = $value; } $object->setActiveLangCodes($values); } - if (property_exists($data, 'baseCurrency')) { + elseif (property_exists($data, 'activeLangCodes') && $data->{'activeLangCodes'} === null) { + $object->setActiveLangCodes(null); + } + if (property_exists($data, 'baseCurrency') && $data->{'baseCurrency'} !== null) { $object->setBaseCurrency($data->{'baseCurrency'}); } - if (property_exists($data, 'defaultCustomerCountryCode')) { + elseif (property_exists($data, 'baseCurrency') && $data->{'baseCurrency'} === null) { + $object->setBaseCurrency(null); + } + if (property_exists($data, 'defaultCustomerCountryCode') && $data->{'defaultCustomerCountryCode'} !== null) { $object->setDefaultCustomerCountryCode($data->{'defaultCustomerCountryCode'}); } - if (property_exists($data, 'generalDefaultVatRate')) { + elseif (property_exists($data, 'defaultCustomerCountryCode') && $data->{'defaultCustomerCountryCode'} === null) { + $object->setDefaultCustomerCountryCode(null); + } + if (property_exists($data, 'generalDefaultVatRate') && $data->{'generalDefaultVatRate'} !== null) { $object->setGeneralDefaultVatRate($data->{'generalDefaultVatRate'}); } - if (property_exists($data, 'shopCompanyName')) { + elseif (property_exists($data, 'generalDefaultVatRate') && $data->{'generalDefaultVatRate'} === null) { + $object->setGeneralDefaultVatRate(null); + } + if (property_exists($data, 'shopCompanyName') && $data->{'shopCompanyName'} !== null) { $object->setShopCompanyName($data->{'shopCompanyName'}); } - if (property_exists($data, 'shopAddress')) { + elseif (property_exists($data, 'shopCompanyName') && $data->{'shopCompanyName'} === null) { + $object->setShopCompanyName(null); + } + if (property_exists($data, 'shopAddress') && $data->{'shopAddress'} !== null) { $object->setShopAddress($data->{'shopAddress'}); } - if (property_exists($data, 'shopPostalCode')) { + elseif (property_exists($data, 'shopAddress') && $data->{'shopAddress'} === null) { + $object->setShopAddress(null); + } + if (property_exists($data, 'shopPostalCode') && $data->{'shopPostalCode'} !== null) { $object->setShopPostalCode($data->{'shopPostalCode'}); } - if (property_exists($data, 'shopCity')) { + elseif (property_exists($data, 'shopPostalCode') && $data->{'shopPostalCode'} === null) { + $object->setShopPostalCode(null); + } + if (property_exists($data, 'shopCity') && $data->{'shopCity'} !== null) { $object->setShopCity($data->{'shopCity'}); } - if (property_exists($data, 'shopOrgNo')) { + elseif (property_exists($data, 'shopCity') && $data->{'shopCity'} === null) { + $object->setShopCity(null); + } + if (property_exists($data, 'shopOrgNo') && $data->{'shopOrgNo'} !== null) { $object->setShopOrgNo($data->{'shopOrgNo'}); } - if (property_exists($data, 'shopPhoneNo')) { + elseif (property_exists($data, 'shopOrgNo') && $data->{'shopOrgNo'} === null) { + $object->setShopOrgNo(null); + } + if (property_exists($data, 'shopPhoneNo') && $data->{'shopPhoneNo'} !== null) { $object->setShopPhoneNo($data->{'shopPhoneNo'}); } - if (property_exists($data, 'shopVatNo')) { + elseif (property_exists($data, 'shopPhoneNo') && $data->{'shopPhoneNo'} === null) { + $object->setShopPhoneNo(null); + } + if (property_exists($data, 'shopVatNo') && $data->{'shopVatNo'} !== null) { $object->setShopVatNo($data->{'shopVatNo'}); } - if (property_exists($data, 'shopCountryCode')) { + elseif (property_exists($data, 'shopVatNo') && $data->{'shopVatNo'} === null) { + $object->setShopVatNo(null); + } + if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } + elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { + $object->setShopCountryCode(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php index 9374bc7c..5a7182ac 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationLanguagesModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php index 39194930..424c669b 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php @@ -25,15 +25,21 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationLanguagesModel(); - if (property_exists($data, 'langCode')) { + if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { + $object->setLangCode(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } + else { + $data->{'langCode'} = null; + } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php index 064b4489..d56e2de9 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php index 84fbb8df..e4e2abc0 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\StockLocationModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 29a37b0e..53f862be 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationModel(); - if (property_exists($data, 'stockLocationId')) { + if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { $object->setStockLocationId($data->{'stockLocationId'}); } + elseif (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} === null) { + $object->setStockLocationId(null); + } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } @@ -43,37 +46,71 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'ecommerceStockLocation')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} === null) { + $object->setEcommerceStockLocation(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context)); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } + else { + $data->{'ecommerceStockLocation'} = null; + } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index e484a4f0..eb2d262d 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationPostRequestModel(); if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { @@ -40,38 +40,69 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'ecommerceStockLocation')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} === null) { + $object->setEcommerceStockLocation(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } + else { + $data->{'ecommerceStockLocation'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -79,6 +110,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index 09c8fd59..2c57bc66 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -25,7 +25,7 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\StockLocationPutRequestModel(); if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { @@ -40,38 +40,69 @@ public function denormalize($data, $class, $format = null, array $context = arra elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { $object->setExternalIdType(null); } - if (property_exists($data, 'visibility')) { + if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - if (property_exists($data, 'sortIndex')) { + elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { + $object->setVisibility(null); + } + if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - if (property_exists($data, 'ecommerceStockLocation')) { + elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { + $object->setSortIndex(null); + } + if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } - if (property_exists($data, 'languages')) { + elseif (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} === null) { + $object->setEcommerceStockLocation(null); + } + if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); } $object->setLanguages($values); } + elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { + $object->setLanguages(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + else { + $data->{'externalId'} = null; + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + else { + $data->{'externalIdType'} = null; + } if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } + else { + $data->{'visibility'} = null; + } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } + else { + $data->{'sortIndex'} = null; + } if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } + else { + $data->{'ecommerceStockLocation'} = null; + } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -79,6 +110,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } + else { + $data->{'languages'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index d61567a6..005a82e5 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -25,18 +25,27 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\TokenModel(); - if (property_exists($data, 'access_token')) { + if (property_exists($data, 'access_token') && $data->{'access_token'} !== null) { $object->setAccessToken($data->{'access_token'}); } - if (property_exists($data, 'scope')) { + elseif (property_exists($data, 'access_token') && $data->{'access_token'} === null) { + $object->setAccessToken(null); + } + if (property_exists($data, 'scope') && $data->{'scope'} !== null) { $object->setScope($data->{'scope'}); } - if (property_exists($data, 'expires_in')) { + elseif (property_exists($data, 'scope') && $data->{'scope'} === null) { + $object->setScope(null); + } + if (property_exists($data, 'expires_in') && $data->{'expires_in'} !== null) { $object->setExpiresIn($data->{'expires_in'}); } + elseif (property_exists($data, 'expires_in') && $data->{'expires_in'} === null) { + $object->setExpiresIn(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php index b7f0532a..5c6d25bd 100644 --- a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\VatRateModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\VatRateModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php index 59b9d13e..7aad1336 100644 --- a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\VatRateModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\VatRateModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php index 7771a79d..c80a939d 100644 --- a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php @@ -25,24 +25,39 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\VatRateModel(); - if (property_exists($data, 'countryCode')) { + if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { $object->setCountryCode($data->{'countryCode'}); } - if (property_exists($data, 'defaultVatRate')) { + elseif (property_exists($data, 'countryCode') && $data->{'countryCode'} === null) { + $object->setCountryCode(null); + } + if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } - if (property_exists($data, 'fixedOrderPaymentVatRate')) { + elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { + $object->setDefaultVatRate(null); + } + if (property_exists($data, 'fixedOrderPaymentVatRate') && $data->{'fixedOrderPaymentVatRate'} !== null) { $object->setFixedOrderPaymentVatRate($data->{'fixedOrderPaymentVatRate'}); } - if (property_exists($data, 'fixedOrderShippingVatRate')) { + elseif (property_exists($data, 'fixedOrderPaymentVatRate') && $data->{'fixedOrderPaymentVatRate'} === null) { + $object->setFixedOrderPaymentVatRate(null); + } + if (property_exists($data, 'fixedOrderShippingVatRate') && $data->{'fixedOrderShippingVatRate'} !== null) { $object->setFixedOrderShippingVatRate($data->{'fixedOrderShippingVatRate'}); } - if (property_exists($data, 'fixedOrderDiscountVatRate')) { + elseif (property_exists($data, 'fixedOrderShippingVatRate') && $data->{'fixedOrderShippingVatRate'} === null) { + $object->setFixedOrderShippingVatRate(null); + } + if (property_exists($data, 'fixedOrderDiscountVatRate') && $data->{'fixedOrderDiscountVatRate'} !== null) { $object->setFixedOrderDiscountVatRate($data->{'fixedOrderDiscountVatRate'}); } + elseif (property_exists($data, 'fixedOrderDiscountVatRate') && $data->{'fixedOrderDiscountVatRate'} === null) { + $object->setFixedOrderDiscountVatRate(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -51,18 +66,33 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCountryCode()) { $data->{'countryCode'} = $object->getCountryCode(); } + else { + $data->{'countryCode'} = null; + } if (null !== $object->getDefaultVatRate()) { $data->{'defaultVatRate'} = $object->getDefaultVatRate(); } + else { + $data->{'defaultVatRate'} = null; + } if (null !== $object->getFixedOrderPaymentVatRate()) { $data->{'fixedOrderPaymentVatRate'} = $object->getFixedOrderPaymentVatRate(); } + else { + $data->{'fixedOrderPaymentVatRate'} = null; + } if (null !== $object->getFixedOrderShippingVatRate()) { $data->{'fixedOrderShippingVatRate'} = $object->getFixedOrderShippingVatRate(); } + else { + $data->{'fixedOrderShippingVatRate'} = null; + } if (null !== $object->getFixedOrderDiscountVatRate()) { $data->{'fixedOrderDiscountVatRate'} = $object->getFixedOrderDiscountVatRate(); } + else { + $data->{'fixedOrderDiscountVatRate'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php index 1ea9aedc..271253d5 100644 --- a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php @@ -25,16 +25,19 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\WebHookModelCollection(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $values = array(); foreach ($data->{'data'} as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\WebHookModel', 'json', $context); } $object->setData($values); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -47,6 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php index ab908b5a..f918c3b2 100644 --- a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php @@ -25,12 +25,15 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\WebHookModelItem(); - if (property_exists($data, 'data')) { + if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\WebHookModel', 'json', $context)); } + elseif (property_exists($data, 'data') && $data->{'data'} === null) { + $object->setData(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -39,6 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } + else { + $data->{'data'} = null; + } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index af76de08..c4c4f86a 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -25,27 +25,39 @@ public function supportsNormalization($data, $format = null) public function denormalize($data, $class, $format = null, array $context = array()) { if (!is_object($data)) { - throw new InvalidArgumentException(sprintf('Given $data is not an object (%s given). We need an object in order to continue denormalize method.', gettype($data))); + return null; } $object = new \Starweb\Api\Generated\Model\WebHookModel(); - if (property_exists($data, 'webHookId')) { + if (property_exists($data, 'webHookId') && $data->{'webHookId'} !== null) { $object->setWebHookId($data->{'webHookId'}); } - if (property_exists($data, 'name')) { + elseif (property_exists($data, 'webHookId') && $data->{'webHookId'} === null) { + $object->setWebHookId(null); + } + if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - if (property_exists($data, 'event')) { + elseif (property_exists($data, 'name') && $data->{'name'} === null) { + $object->setName(null); + } + if (property_exists($data, 'event') && $data->{'event'} !== null) { $object->setEvent($data->{'event'}); } + elseif (property_exists($data, 'event') && $data->{'event'} === null) { + $object->setEvent(null); + } if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { $object->setStatusId(null); } - if (property_exists($data, 'url')) { + if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } + elseif (property_exists($data, 'url') && $data->{'url'} === null) { + $object->setUrl(null); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,13 +66,27 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } + else { + $data->{'name'} = null; + } if (null !== $object->getEvent()) { $data->{'event'} = $object->getEvent(); } - $data->{'statusId'} = $object->getStatusId(); + else { + $data->{'event'} = null; + } + if (null !== $object->getStatusId()) { + $data->{'statusId'} = $object->getStatusId(); + } + else { + $data->{'statusId'} = null; + } if (null !== $object->getUrl()) { $data->{'url'} = $object->getUrl(); } + else { + $data->{'url'} = null; + } return $data; } } \ No newline at end of file From acc113ecd7835509dee96c22b7fbc12cc3de016c Mon Sep 17 00:00:00 2001 From: Tim Kolmogorov Date: Thu, 17 Sep 2020 15:34:47 +0200 Subject: [PATCH 67/87] Add externalId and externalIdType to customer data --- resources/specification/openapi.json | 30 ++ src/Api/Generated/Client.php | 2 +- .../Generated/Model/CustomerCreatedModel.php | 54 ++++ src/Api/Generated/Model/CustomerModel.php | 54 ++++ .../Generated/Model/CustomerUpdateModel.php | 54 ++++ .../Normalizer/AddressModelItemNormalizer.php | 6 - .../Normalizer/AddressModelNormalizer.php | 78 ----- ...ndledProductsModelCollectionNormalizer.php | 6 - .../BundledProductsModelItemNormalizer.php | 6 - .../BundledProductsModelNormalizer.php | 40 +-- .../ClientCredentialModelNormalizer.php | 18 -- .../CurrencyCollectionNormalizer.php | 6 - .../CurrencyModelItemNormalizer.php | 6 - .../Normalizer/CurrencyModelNormalizer.php | 15 - ...tomerAddedTagModelCollectionNormalizer.php | 6 - .../CustomerAddedTagModelItemNormalizer.php | 6 - .../CustomerAddedTagModelNormalizer.php | 9 - ...AddressesModelCollectionDataNormalizer.php | 12 - ...omerAddressesModelCollectionNormalizer.php | 6 - .../CustomerAddressesModelItemNormalizer.php | 6 - .../CustomerCreatedModelItemNormalizer.php | 6 - .../CustomerCreatedModelNormalizer.php | 63 +--- ...ernalServicesModelCollectionNormalizer.php | 6 - ...merExternalServicesModelItemNormalizer.php | 6 - ...ustomerExternalServicesModelNormalizer.php | 12 - .../CustomerModelCollectionMetaNormalizer.php | 6 - .../CustomerModelCollectionNormalizer.php | 12 - .../CustomerModelItemNormalizer.php | 6 - .../Normalizer/CustomerModelNormalizer.php | 63 +--- .../CustomerTagModelCollectionNormalizer.php | 6 - .../CustomerTagModelItemNormalizer.php | 6 - .../Normalizer/CustomerTagModelNormalizer.php | 6 - ...CustomerUpdateModelAddressesNormalizer.php | 12 - .../CustomerUpdateModelNormalizer.php | 70 +---- .../Normalizer/ErrorModelNormalizer.php | 6 - .../Normalizer/JaneObjectNormalizer.php | 48 --- ...MediaFileModelCollectionMetaNormalizer.php | 6 - .../MediaFileModelCollectionNormalizer.php | 12 - .../MediaFileModelItemNormalizer.php | 6 - .../Normalizer/MediaFileModelNormalizer.php | 27 -- .../MediaFileUploadModelNormalizer.php | 6 - .../Normalizer/NormalizerFactory.php | 202 +++++++++++- .../OrderAddressCollectionNormalizer.php | 6 - .../OrderAddressModelNormalizer.php | 36 --- .../OrderCommentModelCollectionNormalizer.php | 6 - .../OrderCommentModelItemNormalizer.php | 6 - .../OrderCommentModelNormalizer.php | 21 -- ...ternalServiceModelCollectionNormalizer.php | 6 - .../OrderExternalServiceModelNormalizer.php | 15 - ...derExternalServicesModelItemNormalizer.php | 6 - ...BundledModelItemBundledItemsNormalizer.php | 6 - .../OrderItemBundledModelItemNormalizer.php | 6 - ...rItemModelCollectionDataItemNormalizer.php | 63 ---- .../OrderItemModelCollectionNormalizer.php | 6 - .../OrderItemModelItemNormalizer.php | 6 - .../Normalizer/OrderItemModelNormalizer.php | 57 ---- .../OrderModelCollectionMetaNormalizer.php | 6 - .../OrderModelCollectionNormalizer.php | 12 - .../Normalizer/OrderModelItemNormalizer.php | 6 - .../Normalizer/OrderModelNormalizer.php | 288 ------------------ .../Normalizer/OrderPutModelNormalizer.php | 264 ---------------- ...tatusLanguageModelCollectionNormalizer.php | 6 - .../OrderStatusLanguageModelNormalizer.php | 12 - .../OrderStatusModelCollectionNormalizer.php | 6 - .../OrderStatusModelItemNormalizer.php | 6 - .../Normalizer/OrderStatusModelNormalizer.php | 18 -- .../Normalizer/OrderUpdateModelNormalizer.php | 264 ---------------- .../Normalizer/PaginationModelNormalizer.php | 15 - ...ethodLanguageModelCollectionNormalizer.php | 6 - .../PaymentMethodLanguageModelNormalizer.php | 12 - ...PaymentMethodModelCollectionNormalizer.php | 6 - .../PaymentMethodModelItemNormalizer.php | 6 - .../PaymentMethodModelNormalizer.php | 45 --- .../PricelistModelCollectionNormalizer.php | 6 - .../PricelistModelItemNormalizer.php | 6 - .../Normalizer/PricelistModelNormalizer.php | 63 +--- ...eProductPriceModelCollectionNormalizer.php | 6 - ...tBundleProductPriceModelItemNormalizer.php | 6 - ...oductBundleProductPriceModelNormalizer.php | 16 +- ...goryLanguagesModelCollectionNormalizer.php | 6 - ...roductCategoryLanguagesModelNormalizer.php | 62 +--- ...tCategoryLinkModelCollectionNormalizer.php | 6 - ...ProductCategoryLinkModelItemNormalizer.php | 6 - .../ProductCategoryLinkModelNormalizer.php | 12 - ...tCategoryModelCollectionMetaNormalizer.php | 6 - ...oductCategoryModelCollectionNormalizer.php | 12 - .../ProductCategoryModelItemNormalizer.php | 6 - .../ProductCategoryModelNormalizer.php | 80 +---- ...roductCategoryModelUpdatableNormalizer.php | 80 +---- ...oductLanguageModelCollectionNormalizer.php | 6 - .../ProductLanguageModelItemNormalizer.php | 6 - .../ProductLanguageModelNormalizer.php | 42 --- .../ProductLanguageSlimModelNormalizer.php | 24 -- ...tManufacturerModelCollectionNormalizer.php | 6 - ...ProductManufacturerModelItemNormalizer.php | 6 - .../ProductManufacturerModelNormalizer.php | 39 +-- ...MediaFileLinkModelCollectionNormalizer.php | 6 - ...roductMediaFileLinkModelItemNormalizer.php | 6 - .../ProductMediaFileLinkModelNormalizer.php | 18 -- ...oductMetaDataModelCollectionNormalizer.php | 6 - .../ProductMetaDataModelItemNormalizer.php | 6 - .../ProductMetaDataModelNormalizer.php | 24 -- ...roductMetaDataModelUpdatableNormalizer.php | 21 -- ...aTypeLanguageModelCollectionNormalizer.php | 6 - ...uctMetaDataTypeLanguageModelNormalizer.php | 12 - ...tMetaDataTypeModelCollectionNormalizer.php | 6 - ...ProductMetaDataTypeModelItemNormalizer.php | 6 - .../ProductMetaDataTypeModelNormalizer.php | 9 - ...ctMetaDataTypeModelUpdatableNormalizer.php | 6 - ...aLanguageDataModelCollectionNormalizer.php | 6 - ...uctMetaLanguageDataModelItemNormalizer.php | 6 - ...ProductMetaLanguageDataModelNormalizer.php | 12 - .../ProductModelCollectionMetaNormalizer.php | 6 - .../ProductModelCollectionNormalizer.php | 12 - .../Normalizer/ProductModelItemNormalizer.php | 6 - .../ProductModelLanguagesNormalizer.php | 6 - .../Normalizer/ProductModelNormalizer.php | 169 +--------- .../ProductModelPatchableNormalizer.php | 147 +-------- .../ProductModelUpdatableNormalizer.php | 152 +-------- ...ductStockStatusLanguageModelNormalizer.php | 12 - ...ctStockStatusModelCollectionNormalizer.php | 6 - .../ProductStockStatusModelItemNormalizer.php | 6 - ...oductStockStatusRequestModelNormalizer.php | 40 +-- ...StatusResponseModelLanguagesNormalizer.php | 6 - ...ductStockStatusResponseModelNormalizer.php | 40 +-- .../ProductTagLanguageModelNormalizer.php | 12 - ...roductTagLinkModelCollectionNormalizer.php | 6 - .../ProductTagLinkModelItemNormalizer.php | 6 - .../ProductTagLinkModelNormalizer.php | 12 - ...oductTagLinkPostRequestModelNormalizer.php | 6 - .../ProductTagModelCollectionNormalizer.php | 6 - .../ProductTagModelItemNormalizer.php | 6 - .../Normalizer/ProductTagModelNormalizer.php | 12 - ...roductTagOptionLanguageModelNormalizer.php | 12 - ...ductTagOptionModelCollectionNormalizer.php | 6 - .../ProductTagOptionModelItemNormalizer.php | 6 - .../ProductTagOptionModelNormalizer.php | 18 -- ...ctTagOptionPatchRequestModelNormalizer.php | 12 - ...uctTagOptionPostRequestModelNormalizer.php | 12 - ...ductTagOptionPutRequestModelNormalizer.php | 12 - .../ProductTagPatchRequestModelNormalizer.php | 18 -- .../ProductTagPostRequestModelNormalizer.php | 18 -- .../ProductTagPutRequestModelNormalizer.php | 18 -- ...tUnitLanguageModelCollectionNormalizer.php | 6 - .../ProductUnitLanguageModelNormalizer.php | 18 -- .../ProductUnitModelCollectionNormalizer.php | 6 - .../ProductUnitModelItemNormalizer.php | 6 - .../Normalizer/ProductUnitModelNormalizer.php | 29 +- .../ProductUnitModelUpdatableNormalizer.php | 29 +- ...ariantAttributeLanguageModelNormalizer.php | 12 - ...iantAttributeModelCollectionNormalizer.php | 6 - ...uctVariantAttributeModelItemNormalizer.php | 6 - ...riantAttributeModelLanguagesNormalizer.php | 6 - ...ProductVariantAttributeModelNormalizer.php | 32 +- ...riantAttributeModelUpdatableNormalizer.php | 29 +- ...tAttributeValueLanguageModelNormalizer.php | 12 - ...ttributeValueModelCollectionNormalizer.php | 6 - ...riantAttributeValueModelItemNormalizer.php | 6 - ...AttributeValueModelLanguagesNormalizer.php | 6 - ...ctVariantAttributeValueModelNormalizer.php | 44 +-- ...AttributeValueModelUpdatableNormalizer.php | 38 +-- ...roductVariantModelCollectionNormalizer.php | 6 - .../ProductVariantModelItemNormalizer.php | 6 - ...ductVariantPatchRequestModelNormalizer.php | 122 +------- ...tVariantPriceModelCollectionNormalizer.php | 6 - ...ProductVariantPriceModelItemNormalizer.php | 6 - .../ProductVariantPriceModelNormalizer.php | 48 +-- ...roductVariantPutRequestModelNormalizer.php | 122 +------- .../ProductVariantRequestModelNormalizer.php | 125 +------- .../ProductVariantResponseModelNormalizer.php | 140 +-------- ...tVariantStockModelCollectionNormalizer.php | 6 - ...ProductVariantStockModelItemNormalizer.php | 6 - ...tVariantStockPutRequestModelNormalizer.php | 12 - ...uctVariantStockResponseModelNormalizer.php | 15 - ...ntVolumePriceModelCollectionNormalizer.php | 6 - ...tVariantVolumePriceModelItemNormalizer.php | 6 - ...oductVariantVolumePriceModelNormalizer.php | 38 +-- ...roductVatRateModelCollectionNormalizer.php | 6 - .../ProductVatRateModelItemNormalizer.php | 6 - .../ProductVatRateModelNormalizer.php | 12 - .../ProductsAttributesModelItemNormalizer.php | 6 - ...ethodLanguageModelCollectionNormalizer.php | 6 - .../ShippingMethodLanguageModelNormalizer.php | 12 - ...hippingMethodModelCollectionNormalizer.php | 6 - .../ShippingMethodModelItemNormalizer.php | 6 - .../ShippingMethodModelNormalizer.php | 42 --- ...gTrackingTypeModelCollectionNormalizer.php | 6 - .../ShippingTrackingTypeModelNormalizer.php | 6 - .../Normalizer/ShopItemNormalizer.php | 6 - .../Normalizer/ShopModelNormalizer.php | 48 --- ...tionLanguagesModelCollectionNormalizer.php | 6 - .../StockLocationLanguagesModelNormalizer.php | 12 - ...StockLocationModelCollectionNormalizer.php | 6 - .../StockLocationModelItemNormalizer.php | 6 - .../StockLocationModelNormalizer.php | 47 +-- ...tockLocationPostRequestModelNormalizer.php | 44 +-- ...StockLocationPutRequestModelNormalizer.php | 44 +-- .../Normalizer/TokenModelNormalizer.php | 9 - .../VatRateModelCollectionNormalizer.php | 6 - .../Normalizer/VatRateModelItemNormalizer.php | 6 - .../Normalizer/VatRateModelNormalizer.php | 30 -- .../WebHookModelCollectionNormalizer.php | 6 - .../Normalizer/WebHookModelItemNormalizer.php | 6 - .../Normalizer/WebHookModelNormalizer.php | 31 +- 204 files changed, 529 insertions(+), 4572 deletions(-) delete mode 100644 src/Api/Generated/Normalizer/JaneObjectNormalizer.php diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 1f7dce27..9ae4efdc 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -9833,6 +9833,16 @@ "nullable": true, "description": "The id of the pricelist the customer is linked to (or null if the customer has no specific pricelist linked)" }, + "externalId": { + "type": "string", + "nullable": true, + "description": "Customer's ID in Specter." + }, + "externalIdType": { + "type": "string", + "nullable": true, + "description": "Type of the customer's external ID defined in the 'externalId' value" + }, "langCode": { "type": "string", "readOnly": true, @@ -9919,6 +9929,16 @@ "nullable": true, "description": "The id of the pricelist the customer is linked to (or null if the customer has no specific pricelist linked)", "readOnly": true + }, + "externalId": { + "type": "string", + "nullable": true, + "description": "Customer's ID in Specter." + }, + "externalIdType": { + "type": "string", + "nullable": true, + "description": "Type of the customer's external ID defined in the 'externalId' value" } }, "type": "object" @@ -9998,6 +10018,16 @@ "nullable": true, "description": "The id of the pricelist the customer is linked to (or null if the customer has no specific pricelist linked)", "readOnly": true + }, + "externalId": { + "type": "string", + "nullable": true, + "description": "Customer's ID in Specter." + }, + "externalIdType": { + "type": "string", + "nullable": true, + "description": "Type of the customer's external ID defined in the 'externalId' value" } } }, diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 0e704e2c..5c37bfcc 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -3170,7 +3170,7 @@ public static function create($httpClient = null) } $messageFactory = \Http\Discovery\MessageFactoryDiscovery::find(); $streamFactory = \Http\Discovery\StreamFactoryDiscovery::find(); - $serializer = new \Symfony\Component\Serializer\Serializer(array(new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Starweb\Api\Generated\Normalizer\JaneObjectNormalizer()), array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode()))); + $serializer = new \Symfony\Component\Serializer\Serializer(\Starweb\Api\Generated\Normalizer\NormalizerFactory::create(), array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode()))); return new static($httpClient, $messageFactory, $serializer, $streamFactory); } } \ No newline at end of file diff --git a/src/Api/Generated/Model/CustomerCreatedModel.php b/src/Api/Generated/Model/CustomerCreatedModel.php index 95ea3734..b02b7193 100644 --- a/src/Api/Generated/Model/CustomerCreatedModel.php +++ b/src/Api/Generated/Model/CustomerCreatedModel.php @@ -76,6 +76,18 @@ class CustomerCreatedModel * @var int|null */ protected $pricelistId; + /** + * Customer's ID in Specter. + * + * @var string|null + */ + protected $externalId; + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @var string|null + */ + protected $externalIdType; /** * The customers ID * @@ -328,4 +340,46 @@ public function setPricelistId(?int $pricelistId) : self $this->pricelistId = $pricelistId; return $this; } + /** + * Customer's ID in Specter. + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * Customer's ID in Specter. + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } } \ No newline at end of file diff --git a/src/Api/Generated/Model/CustomerModel.php b/src/Api/Generated/Model/CustomerModel.php index 684d41c0..8d67417e 100644 --- a/src/Api/Generated/Model/CustomerModel.php +++ b/src/Api/Generated/Model/CustomerModel.php @@ -76,6 +76,18 @@ class CustomerModel * @var int|null */ protected $pricelistId; + /** + * Customer's ID in Specter. + * + * @var string|null + */ + protected $externalId; + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @var string|null + */ + protected $externalIdType; /** * The customers ID * @@ -328,4 +340,46 @@ public function setPricelistId(?int $pricelistId) : self $this->pricelistId = $pricelistId; return $this; } + /** + * Customer's ID in Specter. + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * Customer's ID in Specter. + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } } \ No newline at end of file diff --git a/src/Api/Generated/Model/CustomerUpdateModel.php b/src/Api/Generated/Model/CustomerUpdateModel.php index 1918d9f7..1089c052 100644 --- a/src/Api/Generated/Model/CustomerUpdateModel.php +++ b/src/Api/Generated/Model/CustomerUpdateModel.php @@ -58,6 +58,18 @@ class CustomerUpdateModel * @var int|null */ protected $pricelistId; + /** + * Customer's ID in Specter. + * + * @var string|null + */ + protected $externalId; + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @var string|null + */ + protected $externalIdType; /** * Language code for the customer * @@ -259,6 +271,48 @@ public function setPricelistId(?int $pricelistId) : self $this->pricelistId = $pricelistId; return $this; } + /** + * Customer's ID in Specter. + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * Customer's ID in Specter. + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * Type of the customer's external ID defined in the 'externalId' value + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * Language code for the customer * diff --git a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php index f912f299..10bc7b8c 100644 --- a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/AddressModelNormalizer.php b/src/Api/Generated/Normalizer/AddressModelNormalizer.php index dd964c3d..b3b8ec38 100644 --- a/src/Api/Generated/Normalizer/AddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelNormalizer.php @@ -31,81 +31,42 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'companyName') && $data->{'companyName'} !== null) { $object->setCompanyName($data->{'companyName'}); } - elseif (property_exists($data, 'companyName') && $data->{'companyName'} === null) { - $object->setCompanyName(null); - } if (property_exists($data, 'firstName') && $data->{'firstName'} !== null) { $object->setFirstName($data->{'firstName'}); } - elseif (property_exists($data, 'firstName') && $data->{'firstName'} === null) { - $object->setFirstName(null); - } if (property_exists($data, 'lastName') && $data->{'lastName'} !== null) { $object->setLastName($data->{'lastName'}); } - elseif (property_exists($data, 'lastName') && $data->{'lastName'} === null) { - $object->setLastName(null); - } if (property_exists($data, 'careOf') && $data->{'careOf'} !== null) { $object->setCareOf($data->{'careOf'}); } - elseif (property_exists($data, 'careOf') && $data->{'careOf'} === null) { - $object->setCareOf(null); - } if (property_exists($data, 'attention') && $data->{'attention'} !== null) { $object->setAttention($data->{'attention'}); } - elseif (property_exists($data, 'attention') && $data->{'attention'} === null) { - $object->setAttention(null); - } if (property_exists($data, 'reference') && $data->{'reference'} !== null) { $object->setReference($data->{'reference'}); } - elseif (property_exists($data, 'reference') && $data->{'reference'} === null) { - $object->setReference(null); - } if (property_exists($data, 'address') && $data->{'address'} !== null) { $object->setAddress($data->{'address'}); } - elseif (property_exists($data, 'address') && $data->{'address'} === null) { - $object->setAddress(null); - } if (property_exists($data, 'postalCode') && $data->{'postalCode'} !== null) { $object->setPostalCode($data->{'postalCode'}); } - elseif (property_exists($data, 'postalCode') && $data->{'postalCode'} === null) { - $object->setPostalCode(null); - } if (property_exists($data, 'city') && $data->{'city'} !== null) { $object->setCity($data->{'city'}); } - elseif (property_exists($data, 'city') && $data->{'city'} === null) { - $object->setCity(null); - } if (property_exists($data, 'state') && $data->{'state'} !== null) { $object->setState($data->{'state'}); } - elseif (property_exists($data, 'state') && $data->{'state'} === null) { - $object->setState(null); - } if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { $object->setCountryCode($data->{'countryCode'}); } - elseif (property_exists($data, 'countryCode') && $data->{'countryCode'} === null) { - $object->setCountryCode(null); - } if (property_exists($data, 'phoneNo') && $data->{'phoneNo'} !== null) { $object->setPhoneNo($data->{'phoneNo'}); } - elseif (property_exists($data, 'phoneNo') && $data->{'phoneNo'} === null) { - $object->setPhoneNo(null); - } if (property_exists($data, 'mobilePhoneNo') && $data->{'mobilePhoneNo'} !== null) { $object->setMobilePhoneNo($data->{'mobilePhoneNo'}); } - elseif (property_exists($data, 'mobilePhoneNo') && $data->{'mobilePhoneNo'} === null) { - $object->setMobilePhoneNo(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -114,81 +75,42 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCompanyName()) { $data->{'companyName'} = $object->getCompanyName(); } - else { - $data->{'companyName'} = null; - } if (null !== $object->getFirstName()) { $data->{'firstName'} = $object->getFirstName(); } - else { - $data->{'firstName'} = null; - } if (null !== $object->getLastName()) { $data->{'lastName'} = $object->getLastName(); } - else { - $data->{'lastName'} = null; - } if (null !== $object->getCareOf()) { $data->{'careOf'} = $object->getCareOf(); } - else { - $data->{'careOf'} = null; - } if (null !== $object->getAttention()) { $data->{'attention'} = $object->getAttention(); } - else { - $data->{'attention'} = null; - } if (null !== $object->getReference()) { $data->{'reference'} = $object->getReference(); } - else { - $data->{'reference'} = null; - } if (null !== $object->getAddress()) { $data->{'address'} = $object->getAddress(); } - else { - $data->{'address'} = null; - } if (null !== $object->getPostalCode()) { $data->{'postalCode'} = $object->getPostalCode(); } - else { - $data->{'postalCode'} = null; - } if (null !== $object->getCity()) { $data->{'city'} = $object->getCity(); } - else { - $data->{'city'} = null; - } if (null !== $object->getState()) { $data->{'state'} = $object->getState(); } - else { - $data->{'state'} = null; - } if (null !== $object->getCountryCode()) { $data->{'countryCode'} = $object->getCountryCode(); } - else { - $data->{'countryCode'} = null; - } if (null !== $object->getPhoneNo()) { $data->{'phoneNo'} = $object->getPhoneNo(); } - else { - $data->{'phoneNo'} = null; - } if (null !== $object->getMobilePhoneNo()) { $data->{'mobilePhoneNo'} = $object->getMobilePhoneNo(); } - else { - $data->{'mobilePhoneNo'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php index b3153b7f..ca035258 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php index fd31cb3d..fa261ea8 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php index 06ab6099..b2c47d00 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'singleVariant') && $data->{'singleVariant'} !== null) { $object->setSingleVariant($data->{'singleVariant'}); } - elseif (property_exists($data, 'singleVariant') && $data->{'singleVariant'} === null) { - $object->setSingleVariant(null); - } if (property_exists($data, 'bundledProductId') && $data->{'bundledProductId'} !== null) { $object->setBundledProductId($data->{'bundledProductId'}); } - elseif (property_exists($data, 'bundledProductId') && $data->{'bundledProductId'} === null) { - $object->setBundledProductId(null); - } if (property_exists($data, 'variantSku') && $data->{'variantSku'} !== null) { $object->setVariantSku($data->{'variantSku'}); } - elseif (property_exists($data, 'variantSku') && $data->{'variantSku'} === null) { - $object->setVariantSku(null); - } if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } - elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { - $object->setQuantity(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'prices') && $data->{'prices'} !== null) { $values = array(); foreach ($data->{'prices'} as $value) { @@ -65,9 +50,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setPrices($values); } - elseif (property_exists($data, 'prices') && $data->{'prices'} === null) { - $object->setPrices(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -76,33 +58,16 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSingleVariant()) { $data->{'singleVariant'} = $object->getSingleVariant(); } - else { - $data->{'singleVariant'} = null; - } if (null !== $object->getBundledProductId()) { $data->{'bundledProductId'} = $object->getBundledProductId(); } - else { - $data->{'bundledProductId'} = null; - } if (null !== $object->getVariantSku()) { $data->{'variantSku'} = $object->getVariantSku(); } - else { - $data->{'variantSku'} = null; - } - if (null !== $object->getQuantity()) { - $data->{'quantity'} = $object->getQuantity(); - } - else { - $data->{'quantity'} = null; - } + $data->{'quantity'} = $object->getQuantity(); if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getPrices()) { $values = array(); foreach ($object->getPrices() as $value) { @@ -110,9 +75,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'prices'} = $values; } - else { - $data->{'prices'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php index b4997cd7..02e52849 100644 --- a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'grant_type') && $data->{'grant_type'} !== null) { $object->setGrantType($data->{'grant_type'}); } - elseif (property_exists($data, 'grant_type') && $data->{'grant_type'} === null) { - $object->setGrantType(null); - } if (property_exists($data, 'client_id') && $data->{'client_id'} !== null) { $object->setClientId($data->{'client_id'}); } - elseif (property_exists($data, 'client_id') && $data->{'client_id'} === null) { - $object->setClientId(null); - } if (property_exists($data, 'client_secret') && $data->{'client_secret'} !== null) { $object->setClientSecret($data->{'client_secret'}); } - elseif (property_exists($data, 'client_secret') && $data->{'client_secret'} === null) { - $object->setClientSecret(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,21 +45,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getGrantType()) { $data->{'grant_type'} = $object->getGrantType(); } - else { - $data->{'grant_type'} = null; - } if (null !== $object->getClientId()) { $data->{'client_id'} = $object->getClientId(); } - else { - $data->{'client_id'} = null; - } if (null !== $object->getClientSecret()) { $data->{'client_secret'} = $object->getClientSecret(); } - else { - $data->{'client_secret'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php index 68daa9b7..208b0e24 100644 --- a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php index e9f0e181..2f0f352e 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CurrencyModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index e344a0f4..4bc3d7d2 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'code') && $data->{'code'} !== null) { $object->setCode($data->{'code'}); } - elseif (property_exists($data, 'code') && $data->{'code'} === null) { - $object->setCode(null); - } if (property_exists($data, 'exchangeRate') && $data->{'exchangeRate'} !== null) { $object->setExchangeRate($data->{'exchangeRate'}); } - elseif (property_exists($data, 'exchangeRate') && $data->{'exchangeRate'} === null) { - $object->setExchangeRate(null); - } if (property_exists($data, 'precision') && $data->{'precision'} !== null) { $object->setPrecision($data->{'precision'}); } - elseif (property_exists($data, 'precision') && $data->{'precision'} === null) { - $object->setPrecision(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,15 +45,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExchangeRate()) { $data->{'exchangeRate'} = $object->getExchangeRate(); } - else { - $data->{'exchangeRate'} = null; - } if (null !== $object->getPrecision()) { $data->{'precision'} = $object->getPrecision(); } - else { - $data->{'precision'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php index c62efad7..dc7fac12 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php index a600ac64..a18cfd67 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index 9c011673..202031aa 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { - $object->setTagId(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,9 +42,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } - else { - $data->{'tagId'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php index 250c1395..7238425a 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'invoice') && $data->{'invoice'} !== null) { $object->setInvoice($this->denormalizer->denormalize($data->{'invoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'invoice') && $data->{'invoice'} === null) { - $object->setInvoice(null); - } if (property_exists($data, 'delivery') && $data->{'delivery'} !== null) { $object->setDelivery($this->denormalizer->denormalize($data->{'delivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'delivery') && $data->{'delivery'} === null) { - $object->setDelivery(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getInvoice()) { $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); } - else { - $data->{'invoice'} = null; - } if (null !== $object->getDelivery()) { $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); } - else { - $data->{'delivery'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php index 808048c2..272d0996 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php index 4f75b6db..c3dc5c0c 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php index b9e233b6..c93d3e80 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 04b64b59..3a5a96bb 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -31,74 +31,44 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { - $object->setCustomerId(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'email') && $data->{'email'} !== null) { $object->setEmail($data->{'email'}); } - elseif (property_exists($data, 'email') && $data->{'email'} === null) { - $object->setEmail(null); - } if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { $object->setNationalIdNo($data->{'nationalIdNo'}); } - elseif (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} === null) { - $object->setNationalIdNo(null); - } if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { $object->setVatNo($data->{'vatNo'}); } - elseif (property_exists($data, 'vatNo') && $data->{'vatNo'} === null) { - $object->setVatNo(null); - } if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { - $object->setCustomInfo1(null); - } if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { - $object->setCustomInfo2(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'approved') && $data->{'approved'} !== null) { $object->setApproved($data->{'approved'}); } - elseif (property_exists($data, 'approved') && $data->{'approved'} === null) { - $object->setApproved(null); - } if (property_exists($data, 'approvedAt') && $data->{'approvedAt'} !== null) { $object->setApprovedAt($data->{'approvedAt'}); } - elseif (property_exists($data, 'approvedAt') && $data->{'approvedAt'} === null) { - $object->setApprovedAt(null); - } if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { + $object->setExternalIdType($data->{'externalIdType'}); } return $object; } @@ -108,45 +78,26 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getEmail()) { $data->{'email'} = $object->getEmail(); } - else { - $data->{'email'} = null; - } if (null !== $object->getNationalIdNo()) { $data->{'nationalIdNo'} = $object->getNationalIdNo(); } - else { - $data->{'nationalIdNo'} = null; - } if (null !== $object->getVatNo()) { $data->{'vatNo'} = $object->getVatNo(); } - else { - $data->{'vatNo'} = null; - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } - else { - $data->{'customInfo1'} = null; - } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - else { - $data->{'customInfo2'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php index 61ca9c8c..f59047b6 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php index 9bb6cc85..57a8b9e8 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php index ce25dfb6..b33db242 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'serviceName') && $data->{'serviceName'} !== null) { $object->setServiceName($data->{'serviceName'}); } - elseif (property_exists($data, 'serviceName') && $data->{'serviceName'} === null) { - $object->setServiceName(null); - } if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { $object->setExternalIdValue($data->{'externalIdValue'}); } - elseif (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} === null) { - $object->setExternalIdValue(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getServiceName()) { $data->{'serviceName'} = $object->getServiceName(); } - else { - $data->{'serviceName'} = null; - } if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } - else { - $data->{'externalIdValue'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php index 7249384f..6cbe2860 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } - elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { - $object->setPagination(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } - else { - $data->{'pagination'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php index f837ece0..282f5382 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php @@ -35,15 +35,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta', 'json', $context)); } - elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { - $object->setMeta(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -56,15 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - else { - $data->{'meta'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php index eb20ce97..d35c7837 100644 --- a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index 6f2b819a..b336e816 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -31,74 +31,44 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { - $object->setCustomerId(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'email') && $data->{'email'} !== null) { $object->setEmail($data->{'email'}); } - elseif (property_exists($data, 'email') && $data->{'email'} === null) { - $object->setEmail(null); - } if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { $object->setNationalIdNo($data->{'nationalIdNo'}); } - elseif (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} === null) { - $object->setNationalIdNo(null); - } if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { $object->setVatNo($data->{'vatNo'}); } - elseif (property_exists($data, 'vatNo') && $data->{'vatNo'} === null) { - $object->setVatNo(null); - } if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { - $object->setCustomInfo1(null); - } if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { - $object->setCustomInfo2(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'approved') && $data->{'approved'} !== null) { $object->setApproved($data->{'approved'}); } - elseif (property_exists($data, 'approved') && $data->{'approved'} === null) { - $object->setApproved(null); - } if (property_exists($data, 'approvedAt') && $data->{'approvedAt'} !== null) { $object->setApprovedAt($data->{'approvedAt'}); } - elseif (property_exists($data, 'approvedAt') && $data->{'approvedAt'} === null) { - $object->setApprovedAt(null); - } if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { + $object->setExternalIdType($data->{'externalIdType'}); } return $object; } @@ -108,45 +78,26 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getEmail()) { $data->{'email'} = $object->getEmail(); } - else { - $data->{'email'} = null; - } if (null !== $object->getNationalIdNo()) { $data->{'nationalIdNo'} = $object->getNationalIdNo(); } - else { - $data->{'nationalIdNo'} = null; - } if (null !== $object->getVatNo()) { $data->{'vatNo'} = $object->getVatNo(); } - else { - $data->{'vatNo'} = null; - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } - else { - $data->{'customInfo1'} = null; - } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - else { - $data->{'customInfo2'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php index 4cc8cf1f..d1c2b22b 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php index ffa8e2e6..0ddccaab 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerTagModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index b7ad01c1..cc0334c1 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { - $object->setTagId(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php index 7f8d1792..476926ef 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'invoice') && $data->{'invoice'} !== null) { $object->setInvoice($this->denormalizer->denormalize($data->{'invoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'invoice') && $data->{'invoice'} === null) { - $object->setInvoice(null); - } if (property_exists($data, 'delivery') && $data->{'delivery'} !== null) { $object->setDelivery($this->denormalizer->denormalize($data->{'delivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'delivery') && $data->{'delivery'} === null) { - $object->setDelivery(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getInvoice()) { $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); } - else { - $data->{'invoice'} = null; - } if (null !== $object->getDelivery()) { $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); } - else { - $data->{'delivery'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index c8d630a4..534301ba 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -31,69 +31,42 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { - $object->setCustomerId(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'email') && $data->{'email'} !== null) { $object->setEmail($data->{'email'}); } - elseif (property_exists($data, 'email') && $data->{'email'} === null) { - $object->setEmail(null); - } if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { $object->setNationalIdNo($data->{'nationalIdNo'}); } - elseif (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} === null) { - $object->setNationalIdNo(null); - } if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { $object->setVatNo($data->{'vatNo'}); } - elseif (property_exists($data, 'vatNo') && $data->{'vatNo'} === null) { - $object->setVatNo(null); - } if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { - $object->setCustomInfo1(null); - } if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { - $object->setCustomInfo2(null); - } if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { + $object->setExternalIdType($data->{'externalIdType'}); } if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses', 'json', $context)); } - elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { - $object->setAddresses(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -102,57 +75,30 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getEmail()) { $data->{'email'} = $object->getEmail(); } - else { - $data->{'email'} = null; - } if (null !== $object->getNationalIdNo()) { $data->{'nationalIdNo'} = $object->getNationalIdNo(); } - else { - $data->{'nationalIdNo'} = null; - } if (null !== $object->getVatNo()) { $data->{'vatNo'} = $object->getVatNo(); } - else { - $data->{'vatNo'} = null; - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } - else { - $data->{'customInfo1'} = null; - } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - else { - $data->{'customInfo2'} = null; - } - if (null !== $object->getPricelistId()) { - $data->{'pricelistId'} = $object->getPricelistId(); - } - else { - $data->{'pricelistId'} = null; - } + $data->{'pricelistId'} = $object->getPricelistId(); + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } - else { - $data->{'addresses'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index f44b1442..2a33d9cf 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'error') && $data->{'error'} !== null) { $object->setError($data->{'error'}); } - elseif (property_exists($data, 'error') && $data->{'error'} === null) { - $object->setError(null); - } if (property_exists($data, 'error_description') && $data->{'error_description'} !== null) { $object->setErrorDescription($data->{'error_description'}); } - elseif (property_exists($data, 'error_description') && $data->{'error_description'} === null) { - $object->setErrorDescription(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/JaneObjectNormalizer.php b/src/Api/Generated/Normalizer/JaneObjectNormalizer.php deleted file mode 100644 index 20248e01..00000000 --- a/src/Api/Generated/Normalizer/JaneObjectNormalizer.php +++ /dev/null @@ -1,48 +0,0 @@ - 'Starweb\\Api\\Generated\\Normalizer\\ErrorModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaginationModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaginationModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderPutModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderPutModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderUpdateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingTrackingTypeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingTrackingTypeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\AddressModel' => 'Starweb\\Api\\Generated\\Normalizer\\AddressModelNormalizer', 'Starweb\\Api\\Generated\\Model\\AddressModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\AddressModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderAddressModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderAddressModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderAddressCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemBundledModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemBundledModelItemBundledItemsNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelCollectionDataItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServiceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServicesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServiceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyModel' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerUpdateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerUpdateModelAddressesNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerCreatedModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerCreatedModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelCollectionDataNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\TokenModel' => 'Starweb\\Api\\Generated\\Normalizer\\TokenModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel' => 'Starweb\\Api\\Generated\\Normalizer\\ClientCredentialModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModel' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileUploadModelNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModel' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLanguagesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLanguagesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelPatchableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageSlimModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusResponseModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShopModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShopModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShopItem' => 'Starweb\\Api\\Generated\\Normalizer\\ShopItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductsAttributesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModel' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModel' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModel' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationLanguagesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationLanguagesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPatchRequestModelNormalizer'), $normalizersCache = array(); - public function supportsDenormalization($data, $type, $format = null) - { - return array_key_exists($type, $this->normalizers); - } - public function supportsNormalization($data, $format = null) - { - return is_object($data) && array_key_exists(get_class($data), $this->normalizers); - } - public function normalize($object, $format = null, array $context = array()) - { - $normalizerClass = $this->normalizers[get_class($object)]; - $normalizer = $this->getNormalizer($normalizerClass); - return $normalizer->normalize($object, $format, $context); - } - public function denormalize($data, $class, $format = null, array $context = array()) - { - $denormalizerClass = $this->normalizers[$class]; - $denormalizer = $this->getNormalizer($denormalizerClass); - return $denormalizer->denormalize($data, $class, $format, $context); - } - private function getNormalizer(string $normalizerClass) - { - return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); - } - private function initNormalizer(string $normalizerClass) - { - $normalizer = new $normalizerClass(); - $normalizer->setNormalizer($this->normalizer); - $normalizer->setDenormalizer($this->denormalizer); - $this->normalizersCache[$normalizerClass] = $normalizer; - return $normalizer; - } -} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php index bc763b68..086838fa 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } - elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { - $object->setPagination(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } - else { - $data->{'pagination'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php index 08a60cd6..0433bcfc 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php @@ -35,15 +35,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta', 'json', $context)); } - elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { - $object->setMeta(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -56,15 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - else { - $data->{'meta'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php index 0e4cb62a..7cbd0e23 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\MediaFileModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index 48e4bc98..6550405a 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -31,57 +31,30 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} !== null) { $object->setMediaFileId($data->{'mediaFileId'}); } - elseif (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} === null) { - $object->setMediaFileId(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'size') && $data->{'size'} !== null) { $object->setSize($data->{'size'}); } - elseif (property_exists($data, 'size') && $data->{'size'} === null) { - $object->setSize(null); - } if (property_exists($data, 'mime') && $data->{'mime'} !== null) { $object->setMime($data->{'mime'}); } - elseif (property_exists($data, 'mime') && $data->{'mime'} === null) { - $object->setMime(null); - } if (property_exists($data, 'height') && $data->{'height'} !== null) { $object->setHeight($data->{'height'}); } - elseif (property_exists($data, 'height') && $data->{'height'} === null) { - $object->setHeight(null); - } if (property_exists($data, 'width') && $data->{'width'} !== null) { $object->setWidth($data->{'width'}); } - elseif (property_exists($data, 'width') && $data->{'width'} === null) { - $object->setWidth(null); - } if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } - elseif (property_exists($data, 'url') && $data->{'url'} === null) { - $object->setUrl(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php index a3c93485..e1371381 100644 --- a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'file') && $data->{'file'} !== null) { $object->setFile($data->{'file'}); } - elseif (property_exists($data, 'file') && $data->{'file'} === null) { - $object->setFile(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getFile()) { $data->{'file'} = $object->getFile(); } - else { - $data->{'file'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index c5caabdf..9fd19e15 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -2,17 +2,209 @@ namespace Starweb\Api\Generated\Normalizer; -@trigger_error('The "NormalizerFactory" class is deprecated since Jane 5.3, use "JaneObjectNormalizer" instead.', E_USER_DEPRECATED); -/** - * @deprecated The "NormalizerFactory" class is deprecated since Jane 5.3, use "JaneObjectNormalizer" instead. - */ class NormalizerFactory { public static function create() { $normalizers = array(); $normalizers[] = new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(); - $normalizers[] = new \Starweb\Api\Generated\Normalizer\JaneObjectNormalizer(); + $normalizers[] = new ErrorModelNormalizer(); + $normalizers[] = new PaginationModelNormalizer(); + $normalizers[] = new OrderModelNormalizer(); + $normalizers[] = new OrderPutModelNormalizer(); + $normalizers[] = new OrderUpdateModelNormalizer(); + $normalizers[] = new OrderModelItemNormalizer(); + $normalizers[] = new OrderModelCollectionNormalizer(); + $normalizers[] = new OrderModelCollectionMetaNormalizer(); + $normalizers[] = new ShippingTrackingTypeModelNormalizer(); + $normalizers[] = new ShippingTrackingTypeModelCollectionNormalizer(); + $normalizers[] = new AddressModelNormalizer(); + $normalizers[] = new AddressModelItemNormalizer(); + $normalizers[] = new OrderAddressModelNormalizer(); + $normalizers[] = new OrderAddressCollectionNormalizer(); + $normalizers[] = new OrderStatusModelNormalizer(); + $normalizers[] = new OrderStatusLanguageModelNormalizer(); + $normalizers[] = new OrderStatusLanguageModelCollectionNormalizer(); + $normalizers[] = new OrderStatusModelItemNormalizer(); + $normalizers[] = new OrderStatusModelCollectionNormalizer(); + $normalizers[] = new OrderItemModelNormalizer(); + $normalizers[] = new OrderItemModelItemNormalizer(); + $normalizers[] = new OrderItemBundledModelItemNormalizer(); + $normalizers[] = new OrderItemBundledModelItemBundledItemsNormalizer(); + $normalizers[] = new OrderItemModelCollectionNormalizer(); + $normalizers[] = new OrderItemModelCollectionDataItemNormalizer(); + $normalizers[] = new OrderExternalServiceModelNormalizer(); + $normalizers[] = new OrderExternalServicesModelItemNormalizer(); + $normalizers[] = new OrderExternalServiceModelCollectionNormalizer(); + $normalizers[] = new CurrencyModelNormalizer(); + $normalizers[] = new CurrencyModelItemNormalizer(); + $normalizers[] = new CurrencyCollectionNormalizer(); + $normalizers[] = new CustomerUpdateModelNormalizer(); + $normalizers[] = new CustomerUpdateModelAddressesNormalizer(); + $normalizers[] = new CustomerModelNormalizer(); + $normalizers[] = new CustomerModelItemNormalizer(); + $normalizers[] = new CustomerCreatedModelNormalizer(); + $normalizers[] = new CustomerCreatedModelItemNormalizer(); + $normalizers[] = new CustomerModelCollectionNormalizer(); + $normalizers[] = new CustomerModelCollectionMetaNormalizer(); + $normalizers[] = new CustomerAddedTagModelNormalizer(); + $normalizers[] = new CustomerAddedTagModelItemNormalizer(); + $normalizers[] = new CustomerAddedTagModelCollectionNormalizer(); + $normalizers[] = new CustomerAddressesModelItemNormalizer(); + $normalizers[] = new CustomerAddressesModelCollectionNormalizer(); + $normalizers[] = new CustomerAddressesModelCollectionDataNormalizer(); + $normalizers[] = new CustomerExternalServicesModelNormalizer(); + $normalizers[] = new CustomerExternalServicesModelItemNormalizer(); + $normalizers[] = new CustomerExternalServicesModelCollectionNormalizer(); + $normalizers[] = new TokenModelNormalizer(); + $normalizers[] = new ClientCredentialModelNormalizer(); + $normalizers[] = new CustomerTagModelNormalizer(); + $normalizers[] = new CustomerTagModelItemNormalizer(); + $normalizers[] = new CustomerTagModelCollectionNormalizer(); + $normalizers[] = new PaymentMethodLanguageModelNormalizer(); + $normalizers[] = new PaymentMethodLanguageModelCollectionNormalizer(); + $normalizers[] = new PaymentMethodModelNormalizer(); + $normalizers[] = new PaymentMethodModelItemNormalizer(); + $normalizers[] = new PaymentMethodModelCollectionNormalizer(); + $normalizers[] = new ShippingMethodLanguageModelNormalizer(); + $normalizers[] = new ShippingMethodLanguageModelCollectionNormalizer(); + $normalizers[] = new ShippingMethodModelNormalizer(); + $normalizers[] = new ShippingMethodModelItemNormalizer(); + $normalizers[] = new ShippingMethodModelCollectionNormalizer(); + $normalizers[] = new PricelistModelNormalizer(); + $normalizers[] = new PricelistModelItemNormalizer(); + $normalizers[] = new PricelistModelCollectionNormalizer(); + $normalizers[] = new OrderCommentModelNormalizer(); + $normalizers[] = new OrderCommentModelItemNormalizer(); + $normalizers[] = new OrderCommentModelCollectionNormalizer(); + $normalizers[] = new MediaFileUploadModelNormalizer(); + $normalizers[] = new MediaFileModelNormalizer(); + $normalizers[] = new MediaFileModelItemNormalizer(); + $normalizers[] = new MediaFileModelCollectionNormalizer(); + $normalizers[] = new MediaFileModelCollectionMetaNormalizer(); + $normalizers[] = new ProductCategoryModelNormalizer(); + $normalizers[] = new ProductCategoryModelUpdatableNormalizer(); + $normalizers[] = new ProductCategoryLanguagesModelNormalizer(); + $normalizers[] = new ProductCategoryLanguagesModelCollectionNormalizer(); + $normalizers[] = new ProductCategoryModelItemNormalizer(); + $normalizers[] = new ProductCategoryModelCollectionNormalizer(); + $normalizers[] = new ProductCategoryModelCollectionMetaNormalizer(); + $normalizers[] = new ProductModelNormalizer(); + $normalizers[] = new ProductModelLanguagesNormalizer(); + $normalizers[] = new ProductModelUpdatableNormalizer(); + $normalizers[] = new ProductModelPatchableNormalizer(); + $normalizers[] = new ProductModelItemNormalizer(); + $normalizers[] = new ProductModelCollectionNormalizer(); + $normalizers[] = new ProductModelCollectionMetaNormalizer(); + $normalizers[] = new ProductVariantModelItemNormalizer(); + $normalizers[] = new ProductVariantModelCollectionNormalizer(); + $normalizers[] = new ProductVariantRequestModelNormalizer(); + $normalizers[] = new ProductVariantPutRequestModelNormalizer(); + $normalizers[] = new ProductVariantPatchRequestModelNormalizer(); + $normalizers[] = new ProductVariantResponseModelNormalizer(); + $normalizers[] = new ProductMediaFileLinkModelItemNormalizer(); + $normalizers[] = new ProductMediaFileLinkModelCollectionNormalizer(); + $normalizers[] = new ProductMediaFileLinkModelNormalizer(); + $normalizers[] = new ProductLanguageModelItemNormalizer(); + $normalizers[] = new ProductLanguageModelCollectionNormalizer(); + $normalizers[] = new ProductLanguageModelNormalizer(); + $normalizers[] = new ProductLanguageSlimModelNormalizer(); + $normalizers[] = new ProductVatRateModelItemNormalizer(); + $normalizers[] = new ProductVatRateModelCollectionNormalizer(); + $normalizers[] = new ProductVatRateModelNormalizer(); + $normalizers[] = new ProductCategoryLinkModelItemNormalizer(); + $normalizers[] = new ProductCategoryLinkModelCollectionNormalizer(); + $normalizers[] = new ProductCategoryLinkModelNormalizer(); + $normalizers[] = new ProductMetaDataModelItemNormalizer(); + $normalizers[] = new ProductMetaDataModelCollectionNormalizer(); + $normalizers[] = new ProductMetaDataModelUpdatableNormalizer(); + $normalizers[] = new ProductMetaDataModelNormalizer(); + $normalizers[] = new ProductMetaLanguageDataModelItemNormalizer(); + $normalizers[] = new ProductMetaLanguageDataModelCollectionNormalizer(); + $normalizers[] = new ProductMetaLanguageDataModelNormalizer(); + $normalizers[] = new ProductUnitModelCollectionNormalizer(); + $normalizers[] = new ProductUnitModelItemNormalizer(); + $normalizers[] = new ProductUnitModelNormalizer(); + $normalizers[] = new ProductUnitModelUpdatableNormalizer(); + $normalizers[] = new ProductUnitLanguageModelCollectionNormalizer(); + $normalizers[] = new ProductUnitLanguageModelNormalizer(); + $normalizers[] = new ProductVariantPriceModelItemNormalizer(); + $normalizers[] = new ProductVariantPriceModelCollectionNormalizer(); + $normalizers[] = new ProductVariantPriceModelNormalizer(); + $normalizers[] = new ProductVariantVolumePriceModelItemNormalizer(); + $normalizers[] = new ProductVariantVolumePriceModelCollectionNormalizer(); + $normalizers[] = new ProductVariantVolumePriceModelNormalizer(); + $normalizers[] = new ProductManufacturerModelItemNormalizer(); + $normalizers[] = new ProductManufacturerModelCollectionNormalizer(); + $normalizers[] = new ProductManufacturerModelNormalizer(); + $normalizers[] = new ProductMetaDataTypeModelCollectionNormalizer(); + $normalizers[] = new ProductMetaDataTypeModelItemNormalizer(); + $normalizers[] = new ProductMetaDataTypeModelNormalizer(); + $normalizers[] = new ProductMetaDataTypeModelUpdatableNormalizer(); + $normalizers[] = new ProductMetaDataTypeLanguageModelCollectionNormalizer(); + $normalizers[] = new ProductMetaDataTypeLanguageModelNormalizer(); + $normalizers[] = new ProductStockStatusResponseModelNormalizer(); + $normalizers[] = new ProductStockStatusResponseModelLanguagesNormalizer(); + $normalizers[] = new ProductStockStatusRequestModelNormalizer(); + $normalizers[] = new ProductStockStatusLanguageModelNormalizer(); + $normalizers[] = new ProductStockStatusModelItemNormalizer(); + $normalizers[] = new ProductStockStatusModelCollectionNormalizer(); + $normalizers[] = new ShopModelNormalizer(); + $normalizers[] = new ShopItemNormalizer(); + $normalizers[] = new ProductVariantAttributeValueModelItemNormalizer(); + $normalizers[] = new ProductVariantAttributeValueModelCollectionNormalizer(); + $normalizers[] = new ProductVariantAttributeValueModelUpdatableNormalizer(); + $normalizers[] = new ProductVariantAttributeValueLanguageModelNormalizer(); + $normalizers[] = new ProductVariantAttributeValueModelNormalizer(); + $normalizers[] = new ProductVariantAttributeValueModelLanguagesNormalizer(); + $normalizers[] = new ProductVariantAttributeModelItemNormalizer(); + $normalizers[] = new ProductVariantAttributeModelCollectionNormalizer(); + $normalizers[] = new ProductVariantAttributeModelUpdatableNormalizer(); + $normalizers[] = new ProductVariantAttributeLanguageModelNormalizer(); + $normalizers[] = new ProductVariantAttributeModelNormalizer(); + $normalizers[] = new ProductVariantAttributeModelLanguagesNormalizer(); + $normalizers[] = new ProductsAttributesModelItemNormalizer(); + $normalizers[] = new VatRateModelItemNormalizer(); + $normalizers[] = new VatRateModelCollectionNormalizer(); + $normalizers[] = new VatRateModelNormalizer(); + $normalizers[] = new WebHookModelNormalizer(); + $normalizers[] = new WebHookModelItemNormalizer(); + $normalizers[] = new WebHookModelCollectionNormalizer(); + $normalizers[] = new BundledProductsModelCollectionNormalizer(); + $normalizers[] = new BundledProductsModelItemNormalizer(); + $normalizers[] = new BundledProductsModelNormalizer(); + $normalizers[] = new StockLocationModelNormalizer(); + $normalizers[] = new StockLocationPostRequestModelNormalizer(); + $normalizers[] = new StockLocationPutRequestModelNormalizer(); + $normalizers[] = new StockLocationLanguagesModelNormalizer(); + $normalizers[] = new StockLocationLanguagesModelCollectionNormalizer(); + $normalizers[] = new StockLocationModelItemNormalizer(); + $normalizers[] = new StockLocationModelCollectionNormalizer(); + $normalizers[] = new ProductVariantStockModelItemNormalizer(); + $normalizers[] = new ProductVariantStockModelCollectionNormalizer(); + $normalizers[] = new ProductVariantStockResponseModelNormalizer(); + $normalizers[] = new ProductVariantStockPutRequestModelNormalizer(); + $normalizers[] = new ProductBundleProductPriceModelItemNormalizer(); + $normalizers[] = new ProductBundleProductPriceModelCollectionNormalizer(); + $normalizers[] = new ProductBundleProductPriceModelNormalizer(); + $normalizers[] = new ProductTagModelNormalizer(); + $normalizers[] = new ProductTagLanguageModelNormalizer(); + $normalizers[] = new ProductTagPostRequestModelNormalizer(); + $normalizers[] = new ProductTagModelItemNormalizer(); + $normalizers[] = new ProductTagModelCollectionNormalizer(); + $normalizers[] = new ProductTagPutRequestModelNormalizer(); + $normalizers[] = new ProductTagPatchRequestModelNormalizer(); + $normalizers[] = new ProductTagLinkModelItemNormalizer(); + $normalizers[] = new ProductTagLinkModelCollectionNormalizer(); + $normalizers[] = new ProductTagLinkModelNormalizer(); + $normalizers[] = new ProductTagLinkPostRequestModelNormalizer(); + $normalizers[] = new ProductTagOptionModelNormalizer(); + $normalizers[] = new ProductTagOptionLanguageModelNormalizer(); + $normalizers[] = new ProductTagOptionPostRequestModelNormalizer(); + $normalizers[] = new ProductTagOptionModelItemNormalizer(); + $normalizers[] = new ProductTagOptionModelCollectionNormalizer(); + $normalizers[] = new ProductTagOptionPutRequestModelNormalizer(); + $normalizers[] = new ProductTagOptionPatchRequestModelNormalizer(); return $normalizers; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php index 177dd531..fe074886 100644 --- a/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressCollectionNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index abf935b3..1a80f70d 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -31,39 +31,21 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'originalInvoice') && $data->{'originalInvoice'} !== null) { $object->setOriginalInvoice($this->denormalizer->denormalize($data->{'originalInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'originalInvoice') && $data->{'originalInvoice'} === null) { - $object->setOriginalInvoice(null); - } if (property_exists($data, 'originalDelivery') && $data->{'originalDelivery'} !== null) { $object->setOriginalDelivery($this->denormalizer->denormalize($data->{'originalDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'originalDelivery') && $data->{'originalDelivery'} === null) { - $object->setOriginalDelivery(null); - } if (property_exists($data, 'customerInvoice') && $data->{'customerInvoice'} !== null) { $object->setCustomerInvoice($this->denormalizer->denormalize($data->{'customerInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'customerInvoice') && $data->{'customerInvoice'} === null) { - $object->setCustomerInvoice(null); - } if (property_exists($data, 'customerDelivery') && $data->{'customerDelivery'} !== null) { $object->setCustomerDelivery($this->denormalizer->denormalize($data->{'customerDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'customerDelivery') && $data->{'customerDelivery'} === null) { - $object->setCustomerDelivery(null); - } if (property_exists($data, 'paymentMethodInvoice') && $data->{'paymentMethodInvoice'} !== null) { $object->setPaymentMethodInvoice($this->denormalizer->denormalize($data->{'paymentMethodInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'paymentMethodInvoice') && $data->{'paymentMethodInvoice'} === null) { - $object->setPaymentMethodInvoice(null); - } if (property_exists($data, 'paymentMethodDelivery') && $data->{'paymentMethodDelivery'} !== null) { $object->setPaymentMethodDelivery($this->denormalizer->denormalize($data->{'paymentMethodDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); } - elseif (property_exists($data, 'paymentMethodDelivery') && $data->{'paymentMethodDelivery'} === null) { - $object->setPaymentMethodDelivery(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -72,39 +54,21 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOriginalInvoice()) { $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); } - else { - $data->{'originalInvoice'} = null; - } if (null !== $object->getOriginalDelivery()) { $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); } - else { - $data->{'originalDelivery'} = null; - } if (null !== $object->getCustomerInvoice()) { $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); } - else { - $data->{'customerInvoice'} = null; - } if (null !== $object->getCustomerDelivery()) { $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); } - else { - $data->{'customerDelivery'} = null; - } if (null !== $object->getPaymentMethodInvoice()) { $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); } - else { - $data->{'paymentMethodInvoice'} = null; - } if (null !== $object->getPaymentMethodDelivery()) { $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); } - else { - $data->{'paymentMethodDelivery'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php index 75efcd81..aecfa411 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php index 25fff37a..2d86bbe2 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderCommentModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index 44f6e3b5..f9991635 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'commentId') && $data->{'commentId'} !== null) { $object->setCommentId($data->{'commentId'}); } - elseif (property_exists($data, 'commentId') && $data->{'commentId'} === null) { - $object->setCommentId(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'text') && $data->{'text'} !== null) { $object->setText($data->{'text'}); } - elseif (property_exists($data, 'text') && $data->{'text'} === null) { - $object->setText(null); - } if (property_exists($data, 'from') && $data->{'from'} !== null) { $object->setFrom($data->{'from'}); } - elseif (property_exists($data, 'from') && $data->{'from'} === null) { - $object->setFrom(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,21 +48,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getText()) { $data->{'text'} = $object->getText(); } - else { - $data->{'text'} = null; - } if (null !== $object->getFrom()) { $data->{'from'} = $object->getFrom(); } - else { - $data->{'from'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php index a0f9d857..12f3235f 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index 6e0d1e98..de2d1470 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'serviceName') && $data->{'serviceName'} !== null) { $object->setServiceName($data->{'serviceName'}); } - elseif (property_exists($data, 'serviceName') && $data->{'serviceName'} === null) { - $object->setServiceName(null); - } if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { $object->setExternalIdValue($data->{'externalIdValue'}); } - elseif (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} === null) { - $object->setExternalIdValue(null); - } if (property_exists($data, 'readOnly') && $data->{'readOnly'} !== null) { $object->setReadOnly($data->{'readOnly'}); } - elseif (property_exists($data, 'readOnly') && $data->{'readOnly'} === null) { - $object->setReadOnly(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,15 +45,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getServiceName()) { $data->{'serviceName'} = $object->getServiceName(); } - else { - $data->{'serviceName'} = null; - } if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } - else { - $data->{'externalIdValue'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php index 745003a4..ed7b3bcc 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php index b3a9c6e5..f2973cfb 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php index 94cb27ef..1f9b14e6 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'bundledItems') && $data->{'bundledItems'} !== null) { $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); } - elseif (property_exists($data, 'bundledItems') && $data->{'bundledItems'} === null) { - $object->setBundledItems(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getBundledItems()) { $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); } - else { - $data->{'bundledItems'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php index 5e110ba3..2fa9b6d2 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -31,69 +31,36 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'itemId') && $data->{'itemId'} !== null) { $object->setItemId($data->{'itemId'}); } - elseif (property_exists($data, 'itemId') && $data->{'itemId'} === null) { - $object->setItemId(null); - } if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { - $object->setSku(null); - } if (property_exists($data, 'description') && $data->{'description'} !== null) { $object->setDescription($data->{'description'}); } - elseif (property_exists($data, 'description') && $data->{'description'} === null) { - $object->setDescription(null); - } if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } - elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { - $object->setQuantity(null); - } if (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} !== null) { $object->setUnitSymbol($data->{'unitSymbol'}); } - elseif (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} === null) { - $object->setUnitSymbol(null); - } if (property_exists($data, 'unitPrice') && $data->{'unitPrice'} !== null) { $object->setUnitPrice($data->{'unitPrice'}); } - elseif (property_exists($data, 'unitPrice') && $data->{'unitPrice'} === null) { - $object->setUnitPrice(null); - } if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { $object->setVatRate($data->{'vatRate'}); } - elseif (property_exists($data, 'vatRate') && $data->{'vatRate'} === null) { - $object->setVatRate(null); - } if (property_exists($data, 'discount') && $data->{'discount'} !== null) { $object->setDiscount($data->{'discount'}); } - elseif (property_exists($data, 'discount') && $data->{'discount'} === null) { - $object->setDiscount(null); - } if (property_exists($data, 'discountType') && $data->{'discountType'} !== null) { $object->setDiscountType($data->{'discountType'}); } - elseif (property_exists($data, 'discountType') && $data->{'discountType'} === null) { - $object->setDiscountType(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'bundledItems') && $data->{'bundledItems'} !== null) { $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); } - elseif (property_exists($data, 'bundledItems') && $data->{'bundledItems'} === null) { - $object->setBundledItems(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -102,63 +69,33 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - else { - $data->{'sku'} = null; - } if (null !== $object->getDescription()) { $data->{'description'} = $object->getDescription(); } - else { - $data->{'description'} = null; - } if (null !== $object->getQuantity()) { $data->{'quantity'} = $object->getQuantity(); } - else { - $data->{'quantity'} = null; - } if (null !== $object->getUnitSymbol()) { $data->{'unitSymbol'} = $object->getUnitSymbol(); } - else { - $data->{'unitSymbol'} = null; - } if (null !== $object->getUnitPrice()) { $data->{'unitPrice'} = $object->getUnitPrice(); } - else { - $data->{'unitPrice'} = null; - } if (null !== $object->getVatRate()) { $data->{'vatRate'} = $object->getVatRate(); } - else { - $data->{'vatRate'} = null; - } if (null !== $object->getDiscount()) { $data->{'discount'} = $object->getDiscount(); } - else { - $data->{'discount'} = null; - } if (null !== $object->getDiscountType()) { $data->{'discountType'} = $object->getDiscountType(); } - else { - $data->{'discountType'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getBundledItems()) { $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); } - else { - $data->{'bundledItems'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php index 838eaf23..3a0fa728 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php index 3f947497..7e8545b1 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index 8f1c4b4f..57e00c12 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -31,63 +31,33 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'itemId') && $data->{'itemId'} !== null) { $object->setItemId($data->{'itemId'}); } - elseif (property_exists($data, 'itemId') && $data->{'itemId'} === null) { - $object->setItemId(null); - } if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { - $object->setSku(null); - } if (property_exists($data, 'description') && $data->{'description'} !== null) { $object->setDescription($data->{'description'}); } - elseif (property_exists($data, 'description') && $data->{'description'} === null) { - $object->setDescription(null); - } if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } - elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { - $object->setQuantity(null); - } if (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} !== null) { $object->setUnitSymbol($data->{'unitSymbol'}); } - elseif (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} === null) { - $object->setUnitSymbol(null); - } if (property_exists($data, 'unitPrice') && $data->{'unitPrice'} !== null) { $object->setUnitPrice($data->{'unitPrice'}); } - elseif (property_exists($data, 'unitPrice') && $data->{'unitPrice'} === null) { - $object->setUnitPrice(null); - } if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { $object->setVatRate($data->{'vatRate'}); } - elseif (property_exists($data, 'vatRate') && $data->{'vatRate'} === null) { - $object->setVatRate(null); - } if (property_exists($data, 'discount') && $data->{'discount'} !== null) { $object->setDiscount($data->{'discount'}); } - elseif (property_exists($data, 'discount') && $data->{'discount'} === null) { - $object->setDiscount(null); - } if (property_exists($data, 'discountType') && $data->{'discountType'} !== null) { $object->setDiscountType($data->{'discountType'}); } - elseif (property_exists($data, 'discountType') && $data->{'discountType'} === null) { - $object->setDiscountType(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -96,57 +66,30 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - else { - $data->{'sku'} = null; - } if (null !== $object->getDescription()) { $data->{'description'} = $object->getDescription(); } - else { - $data->{'description'} = null; - } if (null !== $object->getQuantity()) { $data->{'quantity'} = $object->getQuantity(); } - else { - $data->{'quantity'} = null; - } if (null !== $object->getUnitSymbol()) { $data->{'unitSymbol'} = $object->getUnitSymbol(); } - else { - $data->{'unitSymbol'} = null; - } if (null !== $object->getUnitPrice()) { $data->{'unitPrice'} = $object->getUnitPrice(); } - else { - $data->{'unitPrice'} = null; - } if (null !== $object->getVatRate()) { $data->{'vatRate'} = $object->getVatRate(); } - else { - $data->{'vatRate'} = null; - } if (null !== $object->getDiscount()) { $data->{'discount'} = $object->getDiscount(); } - else { - $data->{'discount'} = null; - } if (null !== $object->getDiscountType()) { $data->{'discountType'} = $object->getDiscountType(); } - else { - $data->{'discountType'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php index 6aa1ede3..cf9f71f4 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } - elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { - $object->setPagination(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } - else { - $data->{'pagination'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php index 94e2f169..64a1e0f1 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php @@ -35,15 +35,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta', 'json', $context)); } - elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { - $object->setMeta(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -56,15 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - else { - $data->{'meta'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php index ac74d766..1cd544da 100644 --- a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index a07afe67..3d0d6f2a 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -31,333 +31,168 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { $object->setOrderId($data->{'orderId'}); } - elseif (property_exists($data, 'orderId') && $data->{'orderId'} === null) { - $object->setOrderId(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } - elseif (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} === null) { - $object->setBaseCurrencyCode(null); - } if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { - $object->setShopCountryCode(null); - } if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { $object->setTotalAmount($data->{'totalAmount'}); } - elseif (property_exists($data, 'totalAmount') && $data->{'totalAmount'} === null) { - $object->setTotalAmount(null); - } if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { $object->setTotalVat($data->{'totalVat'}); } - elseif (property_exists($data, 'totalVat') && $data->{'totalVat'} === null) { - $object->setTotalVat(null); - } if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { $object->setAmountToPay($data->{'amountToPay'}); } - elseif (property_exists($data, 'amountToPay') && $data->{'amountToPay'} === null) { - $object->setAmountToPay(null); - } if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); } - elseif (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} === null) { - $object->setTotalAmountInBaseCurrency(null); - } if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); } - elseif (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} === null) { - $object->setTotalVatInBaseCurrency(null); - } if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); } - elseif (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} === null) { - $object->setAmountToPayInBaseCurrency(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { - $object->setCustomerId(null); - } if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { - $object->setStatusId(null); - } if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); } - elseif (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} === null) { - $object->setOnOrderStatusChangeSendEmail(null); - } if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); } - elseif (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} === null) { - $object->setOnOrderStatusChangeProcessPayment(null); - } if (property_exists($data, 'sendEmailsOnStatusChange') && $data->{'sendEmailsOnStatusChange'} !== null) { $object->setSendEmailsOnStatusChange($data->{'sendEmailsOnStatusChange'}); } - elseif (property_exists($data, 'sendEmailsOnStatusChange') && $data->{'sendEmailsOnStatusChange'} === null) { - $object->setSendEmailsOnStatusChange(null); - } if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { - $object->setShippingMethodId(null); - } if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { - $object->setPaymentMethodId(null); - } if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); } - elseif (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} === null) { - $object->setPaymentMethodIdCode(null); - } if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { $object->setPaymentMethodName($data->{'paymentMethodName'}); } - elseif (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} === null) { - $object->setPaymentMethodName(null); - } if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { $object->setPaymentFee($data->{'paymentFee'}); } - elseif (property_exists($data, 'paymentFee') && $data->{'paymentFee'} === null) { - $object->setPaymentFee(null); - } if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { $object->setPaymentVatRate($data->{'paymentVatRate'}); } - elseif (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} === null) { - $object->setPaymentVatRate(null); - } if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { $object->setShippingMethodName($data->{'shippingMethodName'}); } - elseif (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} === null) { - $object->setShippingMethodName(null); - } if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { $object->setShippingCost($data->{'shippingCost'}); } - elseif (property_exists($data, 'shippingCost') && $data->{'shippingCost'} === null) { - $object->setShippingCost(null); - } if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { $object->setShippingVatRate($data->{'shippingVatRate'}); } - elseif (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} === null) { - $object->setShippingVatRate(null); - } if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { $object->setTotalWeight($data->{'totalWeight'}); } - elseif (property_exists($data, 'totalWeight') && $data->{'totalWeight'} === null) { - $object->setTotalWeight(null); - } if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { - $object->setCustomInfo1(null); - } if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { - $object->setCustomInfo2(null); - } if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { $object->setCustomInfo3($data->{'customInfo3'}); } - elseif (property_exists($data, 'customInfo3') && $data->{'customInfo3'} === null) { - $object->setCustomInfo3(null); - } if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { $object->setCustomInfo4($data->{'customInfo4'}); } - elseif (property_exists($data, 'customInfo4') && $data->{'customInfo4'} === null) { - $object->setCustomInfo4(null); - } if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { $object->setDiscountCode($data->{'discountCode'}); } - elseif (property_exists($data, 'discountCode') && $data->{'discountCode'} === null) { - $object->setDiscountCode(null); - } if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { $object->setAmountPaid($data->{'amountPaid'}); } - elseif (property_exists($data, 'amountPaid') && $data->{'amountPaid'} === null) { - $object->setAmountPaid(null); - } if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); } - elseif (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} === null) { - $object->setAmountPaidInBaseCurrency(null); - } if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { $object->setIsComplete($data->{'isComplete'}); } - elseif (property_exists($data, 'isComplete') && $data->{'isComplete'} === null) { - $object->setIsComplete(null); - } if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { - $object->setCurrencyCode(null); - } if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); } - elseif (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} === null) { - $object->setCurrencyExchangeRate(null); - } if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { $object->setCurrencyPrecision($data->{'currencyPrecision'}); } - elseif (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} === null) { - $object->setCurrencyPrecision(null); - } if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { $object->setPaymentReference($data->{'paymentReference'}); } - elseif (property_exists($data, 'paymentReference') && $data->{'paymentReference'} === null) { - $object->setPaymentReference(null); - } if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { $object->setPaymentStatus($data->{'paymentStatus'}); } - elseif (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} === null) { - $object->setPaymentStatus(null); - } if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { $object->setIsRead($data->{'isRead'}); } - elseif (property_exists($data, 'isRead') && $data->{'isRead'} === null) { - $object->setIsRead(null); - } if (property_exists($data, 'hasComments') && $data->{'hasComments'} !== null) { $object->setHasComments($data->{'hasComments'}); } - elseif (property_exists($data, 'hasComments') && $data->{'hasComments'} === null) { - $object->setHasComments(null); - } if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { $object->setInternalComment($data->{'internalComment'}); } - elseif (property_exists($data, 'internalComment') && $data->{'internalComment'} === null) { - $object->setInternalComment(null); - } if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { $object->setShippingTrackerType($data->{'shippingTrackerType'}); } - elseif (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} === null) { - $object->setShippingTrackerType(null); - } if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); } - elseif (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} === null) { - $object->setShippingTrackingNo(null); - } if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); } - elseif (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} === null) { - $object->setOriginalCustomerEmail(null); - } if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); } - elseif (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} === null) { - $object->setOriginalCustomerNationalIdNo(null); - } if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); } - elseif (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} === null) { - $object->setOriginalCustomerVatNo(null); - } if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); } - elseif (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} === null) { - $object->setOriginalCustomerCustomInfo1(null); - } if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } - elseif (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} === null) { - $object->setOriginalCustomerCustomInfo2(null); - } if (property_exists($data, 'items') && $data->{'items'} !== null) { $object->setItems($this->denormalizer->denormalize($data->{'items'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json', $context)); } - elseif (property_exists($data, 'items') && $data->{'items'} === null) { - $object->setItems(null); - } if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection', 'json', $context)); } - elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { - $object->setAddresses(null); - } if (property_exists($data, 'externalServices') && $data->{'externalServices'} !== null) { $object->setExternalServices($this->denormalizer->denormalize($data->{'externalServices'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection', 'json', $context)); } - elseif (property_exists($data, 'externalServices') && $data->{'externalServices'} === null) { - $object->setExternalServices(null); - } if (property_exists($data, 'customer') && $data->{'customer'} !== null) { $object->setCustomer($this->denormalizer->denormalize($data->{'customer'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json', $context)); } - elseif (property_exists($data, 'customer') && $data->{'customer'} === null) { - $object->setCustomer(null); - } if (property_exists($data, 'status') && $data->{'status'} !== null) { $object->setStatus($this->denormalizer->denormalize($data->{'status'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json', $context)); } - elseif (property_exists($data, 'status') && $data->{'status'} === null) { - $object->setStatus(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -366,249 +201,126 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getCustomerId()) { $data->{'customerId'} = $object->getCustomerId(); } - else { - $data->{'customerId'} = null; - } if (null !== $object->getStatusId()) { $data->{'statusId'} = $object->getStatusId(); } - else { - $data->{'statusId'} = null; - } if (null !== $object->getOnOrderStatusChangeSendEmail()) { $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); } - else { - $data->{'onOrderStatusChangeSendEmail'} = null; - } if (null !== $object->getOnOrderStatusChangeProcessPayment()) { $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); } - else { - $data->{'onOrderStatusChangeProcessPayment'} = null; - } if (null !== $object->getSendEmailsOnStatusChange()) { $data->{'sendEmailsOnStatusChange'} = $object->getSendEmailsOnStatusChange(); } - else { - $data->{'sendEmailsOnStatusChange'} = null; - } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } - else { - $data->{'shippingMethodId'} = null; - } if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - else { - $data->{'paymentMethodId'} = null; - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } - else { - $data->{'paymentMethodName'} = null; - } if (null !== $object->getPaymentFee()) { $data->{'paymentFee'} = $object->getPaymentFee(); } - else { - $data->{'paymentFee'} = null; - } if (null !== $object->getPaymentVatRate()) { $data->{'paymentVatRate'} = $object->getPaymentVatRate(); } - else { - $data->{'paymentVatRate'} = null; - } if (null !== $object->getShippingMethodName()) { $data->{'shippingMethodName'} = $object->getShippingMethodName(); } - else { - $data->{'shippingMethodName'} = null; - } if (null !== $object->getShippingCost()) { $data->{'shippingCost'} = $object->getShippingCost(); } - else { - $data->{'shippingCost'} = null; - } if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - else { - $data->{'shippingVatRate'} = null; - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } - else { - $data->{'customInfo1'} = null; - } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - else { - $data->{'customInfo2'} = null; - } if (null !== $object->getCustomInfo3()) { $data->{'customInfo3'} = $object->getCustomInfo3(); } - else { - $data->{'customInfo3'} = null; - } if (null !== $object->getCustomInfo4()) { $data->{'customInfo4'} = $object->getCustomInfo4(); } - else { - $data->{'customInfo4'} = null; - } if (null !== $object->getDiscountCode()) { $data->{'discountCode'} = $object->getDiscountCode(); } - else { - $data->{'discountCode'} = null; - } if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - else { - $data->{'amountPaid'} = null; - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } - else { - $data->{'isComplete'} = null; - } if (null !== $object->getCurrencyCode()) { $data->{'currencyCode'} = $object->getCurrencyCode(); } - else { - $data->{'currencyCode'} = null; - } if (null !== $object->getCurrencyExchangeRate()) { $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); } - else { - $data->{'currencyExchangeRate'} = null; - } if (null !== $object->getCurrencyPrecision()) { $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); } - else { - $data->{'currencyPrecision'} = null; - } if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getPaymentReference()) { $data->{'paymentReference'} = $object->getPaymentReference(); } - else { - $data->{'paymentReference'} = null; - } if (null !== $object->getPaymentStatus()) { $data->{'paymentStatus'} = $object->getPaymentStatus(); } - else { - $data->{'paymentStatus'} = null; - } if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - else { - $data->{'isRead'} = null; - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } - else { - $data->{'internalComment'} = null; - } if (null !== $object->getShippingTrackerType()) { $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); } - else { - $data->{'shippingTrackerType'} = null; - } if (null !== $object->getShippingTrackingNo()) { $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); } - else { - $data->{'shippingTrackingNo'} = null; - } if (null !== $object->getOriginalCustomerEmail()) { $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); } - else { - $data->{'originalCustomerEmail'} = null; - } if (null !== $object->getOriginalCustomerNationalIdNo()) { $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); } - else { - $data->{'originalCustomerNationalIdNo'} = null; - } if (null !== $object->getOriginalCustomerVatNo()) { $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); } - else { - $data->{'originalCustomerVatNo'} = null; - } if (null !== $object->getOriginalCustomerCustomInfo1()) { $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); } - else { - $data->{'originalCustomerCustomInfo1'} = null; - } if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } - else { - $data->{'originalCustomerCustomInfo2'} = null; - } if (null !== $object->getItems()) { $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context); } - else { - $data->{'items'} = null; - } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } - else { - $data->{'addresses'} = null; - } if (null !== $object->getExternalServices()) { $data->{'externalServices'} = $this->normalizer->normalize($object->getExternalServices(), 'json', $context); } - else { - $data->{'externalServices'} = null; - } if (null !== $object->getCustomer()) { $data->{'customer'} = $this->normalizer->normalize($object->getCustomer(), 'json', $context); } - else { - $data->{'customer'} = null; - } if (null !== $object->getStatus()) { $data->{'status'} = $this->normalizer->normalize($object->getStatus(), 'json', $context); } - else { - $data->{'status'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index e06c4b92..8f285625 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -31,297 +31,150 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { $object->setOrderId($data->{'orderId'}); } - elseif (property_exists($data, 'orderId') && $data->{'orderId'} === null) { - $object->setOrderId(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } - elseif (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} === null) { - $object->setBaseCurrencyCode(null); - } if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { - $object->setShopCountryCode(null); - } if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { $object->setTotalAmount($data->{'totalAmount'}); } - elseif (property_exists($data, 'totalAmount') && $data->{'totalAmount'} === null) { - $object->setTotalAmount(null); - } if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { $object->setTotalVat($data->{'totalVat'}); } - elseif (property_exists($data, 'totalVat') && $data->{'totalVat'} === null) { - $object->setTotalVat(null); - } if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { $object->setAmountToPay($data->{'amountToPay'}); } - elseif (property_exists($data, 'amountToPay') && $data->{'amountToPay'} === null) { - $object->setAmountToPay(null); - } if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); } - elseif (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} === null) { - $object->setTotalAmountInBaseCurrency(null); - } if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); } - elseif (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} === null) { - $object->setTotalVatInBaseCurrency(null); - } if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); } - elseif (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} === null) { - $object->setAmountToPayInBaseCurrency(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { - $object->setCustomerId(null); - } if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { - $object->setStatusId(null); - } if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); } - elseif (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} === null) { - $object->setOnOrderStatusChangeSendEmail(null); - } if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); } - elseif (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} === null) { - $object->setOnOrderStatusChangeProcessPayment(null); - } if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { - $object->setShippingMethodId(null); - } if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { - $object->setPaymentMethodId(null); - } if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); } - elseif (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} === null) { - $object->setPaymentMethodIdCode(null); - } if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { $object->setPaymentMethodName($data->{'paymentMethodName'}); } - elseif (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} === null) { - $object->setPaymentMethodName(null); - } if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { $object->setPaymentFee($data->{'paymentFee'}); } - elseif (property_exists($data, 'paymentFee') && $data->{'paymentFee'} === null) { - $object->setPaymentFee(null); - } if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { $object->setPaymentVatRate($data->{'paymentVatRate'}); } - elseif (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} === null) { - $object->setPaymentVatRate(null); - } if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { $object->setShippingMethodName($data->{'shippingMethodName'}); } - elseif (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} === null) { - $object->setShippingMethodName(null); - } if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { $object->setShippingCost($data->{'shippingCost'}); } - elseif (property_exists($data, 'shippingCost') && $data->{'shippingCost'} === null) { - $object->setShippingCost(null); - } if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { $object->setShippingVatRate($data->{'shippingVatRate'}); } - elseif (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} === null) { - $object->setShippingVatRate(null); - } if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { $object->setTotalWeight($data->{'totalWeight'}); } - elseif (property_exists($data, 'totalWeight') && $data->{'totalWeight'} === null) { - $object->setTotalWeight(null); - } if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { - $object->setCustomInfo1(null); - } if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { - $object->setCustomInfo2(null); - } if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { $object->setCustomInfo3($data->{'customInfo3'}); } - elseif (property_exists($data, 'customInfo3') && $data->{'customInfo3'} === null) { - $object->setCustomInfo3(null); - } if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { $object->setCustomInfo4($data->{'customInfo4'}); } - elseif (property_exists($data, 'customInfo4') && $data->{'customInfo4'} === null) { - $object->setCustomInfo4(null); - } if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { $object->setDiscountCode($data->{'discountCode'}); } - elseif (property_exists($data, 'discountCode') && $data->{'discountCode'} === null) { - $object->setDiscountCode(null); - } if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { $object->setAmountPaid($data->{'amountPaid'}); } - elseif (property_exists($data, 'amountPaid') && $data->{'amountPaid'} === null) { - $object->setAmountPaid(null); - } if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); } - elseif (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} === null) { - $object->setAmountPaidInBaseCurrency(null); - } if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { $object->setIsComplete($data->{'isComplete'}); } - elseif (property_exists($data, 'isComplete') && $data->{'isComplete'} === null) { - $object->setIsComplete(null); - } if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { - $object->setCurrencyCode(null); - } if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); } - elseif (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} === null) { - $object->setCurrencyExchangeRate(null); - } if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { $object->setCurrencyPrecision($data->{'currencyPrecision'}); } - elseif (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} === null) { - $object->setCurrencyPrecision(null); - } if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { $object->setPaymentReference($data->{'paymentReference'}); } - elseif (property_exists($data, 'paymentReference') && $data->{'paymentReference'} === null) { - $object->setPaymentReference(null); - } if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { $object->setPaymentStatus($data->{'paymentStatus'}); } - elseif (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} === null) { - $object->setPaymentStatus(null); - } if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { $object->setIsRead($data->{'isRead'}); } - elseif (property_exists($data, 'isRead') && $data->{'isRead'} === null) { - $object->setIsRead(null); - } if (property_exists($data, 'hasComment') && $data->{'hasComment'} !== null) { $object->setHasComment($data->{'hasComment'}); } - elseif (property_exists($data, 'hasComment') && $data->{'hasComment'} === null) { - $object->setHasComment(null); - } if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { $object->setInternalComment($data->{'internalComment'}); } - elseif (property_exists($data, 'internalComment') && $data->{'internalComment'} === null) { - $object->setInternalComment(null); - } if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { $object->setShippingTrackerType($data->{'shippingTrackerType'}); } - elseif (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} === null) { - $object->setShippingTrackerType(null); - } if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); } - elseif (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} === null) { - $object->setShippingTrackingNo(null); - } if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); } - elseif (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} === null) { - $object->setOriginalCustomerEmail(null); - } if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); } - elseif (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} === null) { - $object->setOriginalCustomerNationalIdNo(null); - } if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); } - elseif (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} === null) { - $object->setOriginalCustomerVatNo(null); - } if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); } - elseif (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} === null) { - $object->setOriginalCustomerCustomInfo1(null); - } if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } - elseif (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} === null) { - $object->setOriginalCustomerCustomInfo2(null); - } if (property_exists($data, 'items') && $data->{'items'} !== null) { $values = array(); foreach ($data->{'items'} as $value) { @@ -329,15 +182,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setItems($values); } - elseif (property_exists($data, 'items') && $data->{'items'} === null) { - $object->setItems(null); - } if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); } - elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { - $object->setAddresses(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -346,213 +193,108 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getCustomerId()) { $data->{'customerId'} = $object->getCustomerId(); } - else { - $data->{'customerId'} = null; - } if (null !== $object->getStatusId()) { $data->{'statusId'} = $object->getStatusId(); } - else { - $data->{'statusId'} = null; - } if (null !== $object->getOnOrderStatusChangeSendEmail()) { $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); } - else { - $data->{'onOrderStatusChangeSendEmail'} = null; - } if (null !== $object->getOnOrderStatusChangeProcessPayment()) { $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); } - else { - $data->{'onOrderStatusChangeProcessPayment'} = null; - } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } - else { - $data->{'shippingMethodId'} = null; - } if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - else { - $data->{'paymentMethodId'} = null; - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } - else { - $data->{'paymentMethodName'} = null; - } if (null !== $object->getPaymentFee()) { $data->{'paymentFee'} = $object->getPaymentFee(); } - else { - $data->{'paymentFee'} = null; - } if (null !== $object->getPaymentVatRate()) { $data->{'paymentVatRate'} = $object->getPaymentVatRate(); } - else { - $data->{'paymentVatRate'} = null; - } if (null !== $object->getShippingMethodName()) { $data->{'shippingMethodName'} = $object->getShippingMethodName(); } - else { - $data->{'shippingMethodName'} = null; - } if (null !== $object->getShippingCost()) { $data->{'shippingCost'} = $object->getShippingCost(); } - else { - $data->{'shippingCost'} = null; - } if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - else { - $data->{'shippingVatRate'} = null; - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } - else { - $data->{'customInfo1'} = null; - } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - else { - $data->{'customInfo2'} = null; - } if (null !== $object->getCustomInfo3()) { $data->{'customInfo3'} = $object->getCustomInfo3(); } - else { - $data->{'customInfo3'} = null; - } if (null !== $object->getCustomInfo4()) { $data->{'customInfo4'} = $object->getCustomInfo4(); } - else { - $data->{'customInfo4'} = null; - } if (null !== $object->getDiscountCode()) { $data->{'discountCode'} = $object->getDiscountCode(); } - else { - $data->{'discountCode'} = null; - } if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - else { - $data->{'amountPaid'} = null; - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } - else { - $data->{'isComplete'} = null; - } if (null !== $object->getCurrencyCode()) { $data->{'currencyCode'} = $object->getCurrencyCode(); } - else { - $data->{'currencyCode'} = null; - } if (null !== $object->getCurrencyExchangeRate()) { $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); } - else { - $data->{'currencyExchangeRate'} = null; - } if (null !== $object->getCurrencyPrecision()) { $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); } - else { - $data->{'currencyPrecision'} = null; - } if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getPaymentReference()) { $data->{'paymentReference'} = $object->getPaymentReference(); } - else { - $data->{'paymentReference'} = null; - } if (null !== $object->getPaymentStatus()) { $data->{'paymentStatus'} = $object->getPaymentStatus(); } - else { - $data->{'paymentStatus'} = null; - } if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - else { - $data->{'isRead'} = null; - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } - else { - $data->{'internalComment'} = null; - } if (null !== $object->getShippingTrackerType()) { $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); } - else { - $data->{'shippingTrackerType'} = null; - } if (null !== $object->getShippingTrackingNo()) { $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); } - else { - $data->{'shippingTrackingNo'} = null; - } if (null !== $object->getOriginalCustomerEmail()) { $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); } - else { - $data->{'originalCustomerEmail'} = null; - } if (null !== $object->getOriginalCustomerNationalIdNo()) { $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); } - else { - $data->{'originalCustomerNationalIdNo'} = null; - } if (null !== $object->getOriginalCustomerVatNo()) { $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); } - else { - $data->{'originalCustomerVatNo'} = null; - } if (null !== $object->getOriginalCustomerCustomInfo1()) { $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); } - else { - $data->{'originalCustomerCustomInfo1'} = null; - } if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } - else { - $data->{'originalCustomerCustomInfo2'} = null; - } if (null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { @@ -560,15 +302,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } - else { - $data->{'items'} = null; - } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } - else { - $data->{'addresses'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php index 6493934b..8ba85601 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php index e653983a..13b5cfb8 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php index cb11f392..c76d7e66 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php index 54ba6422..fe084284 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index ae4609ec..21178e7f 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { - $object->setStatusId(null); - } if (property_exists($data, 'shouldSendEmail') && $data->{'shouldSendEmail'} !== null) { $object->setShouldSendEmail($data->{'shouldSendEmail'}); } - elseif (property_exists($data, 'shouldSendEmail') && $data->{'shouldSendEmail'} === null) { - $object->setShouldSendEmail(null); - } if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { - $object->setIdCode(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,15 +48,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getShouldSendEmail()) { $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); } - else { - $data->{'shouldSendEmail'} = null; - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index 5819eae5..e5992ab8 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -31,297 +31,150 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { $object->setOrderId($data->{'orderId'}); } - elseif (property_exists($data, 'orderId') && $data->{'orderId'} === null) { - $object->setOrderId(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } - elseif (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} === null) { - $object->setBaseCurrencyCode(null); - } if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { - $object->setShopCountryCode(null); - } if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { $object->setTotalAmount($data->{'totalAmount'}); } - elseif (property_exists($data, 'totalAmount') && $data->{'totalAmount'} === null) { - $object->setTotalAmount(null); - } if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { $object->setTotalVat($data->{'totalVat'}); } - elseif (property_exists($data, 'totalVat') && $data->{'totalVat'} === null) { - $object->setTotalVat(null); - } if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { $object->setAmountToPay($data->{'amountToPay'}); } - elseif (property_exists($data, 'amountToPay') && $data->{'amountToPay'} === null) { - $object->setAmountToPay(null); - } if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); } - elseif (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} === null) { - $object->setTotalAmountInBaseCurrency(null); - } if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); } - elseif (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} === null) { - $object->setTotalVatInBaseCurrency(null); - } if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); } - elseif (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} === null) { - $object->setAmountToPayInBaseCurrency(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { $object->setCustomerId($data->{'customerId'}); } - elseif (property_exists($data, 'customerId') && $data->{'customerId'} === null) { - $object->setCustomerId(null); - } if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { - $object->setStatusId(null); - } if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); } - elseif (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} === null) { - $object->setOnOrderStatusChangeSendEmail(null); - } if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); } - elseif (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} === null) { - $object->setOnOrderStatusChangeProcessPayment(null); - } if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { - $object->setShippingMethodId(null); - } if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { - $object->setPaymentMethodId(null); - } if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); } - elseif (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} === null) { - $object->setPaymentMethodIdCode(null); - } if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { $object->setPaymentMethodName($data->{'paymentMethodName'}); } - elseif (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} === null) { - $object->setPaymentMethodName(null); - } if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { $object->setPaymentFee($data->{'paymentFee'}); } - elseif (property_exists($data, 'paymentFee') && $data->{'paymentFee'} === null) { - $object->setPaymentFee(null); - } if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { $object->setPaymentVatRate($data->{'paymentVatRate'}); } - elseif (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} === null) { - $object->setPaymentVatRate(null); - } if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { $object->setShippingMethodName($data->{'shippingMethodName'}); } - elseif (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} === null) { - $object->setShippingMethodName(null); - } if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { $object->setShippingCost($data->{'shippingCost'}); } - elseif (property_exists($data, 'shippingCost') && $data->{'shippingCost'} === null) { - $object->setShippingCost(null); - } if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { $object->setShippingVatRate($data->{'shippingVatRate'}); } - elseif (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} === null) { - $object->setShippingVatRate(null); - } if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { $object->setTotalWeight($data->{'totalWeight'}); } - elseif (property_exists($data, 'totalWeight') && $data->{'totalWeight'} === null) { - $object->setTotalWeight(null); - } if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { $object->setCustomInfo1($data->{'customInfo1'}); } - elseif (property_exists($data, 'customInfo1') && $data->{'customInfo1'} === null) { - $object->setCustomInfo1(null); - } if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { $object->setCustomInfo2($data->{'customInfo2'}); } - elseif (property_exists($data, 'customInfo2') && $data->{'customInfo2'} === null) { - $object->setCustomInfo2(null); - } if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { $object->setCustomInfo3($data->{'customInfo3'}); } - elseif (property_exists($data, 'customInfo3') && $data->{'customInfo3'} === null) { - $object->setCustomInfo3(null); - } if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { $object->setCustomInfo4($data->{'customInfo4'}); } - elseif (property_exists($data, 'customInfo4') && $data->{'customInfo4'} === null) { - $object->setCustomInfo4(null); - } if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { $object->setDiscountCode($data->{'discountCode'}); } - elseif (property_exists($data, 'discountCode') && $data->{'discountCode'} === null) { - $object->setDiscountCode(null); - } if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { $object->setAmountPaid($data->{'amountPaid'}); } - elseif (property_exists($data, 'amountPaid') && $data->{'amountPaid'} === null) { - $object->setAmountPaid(null); - } if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); } - elseif (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} === null) { - $object->setAmountPaidInBaseCurrency(null); - } if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { $object->setIsComplete($data->{'isComplete'}); } - elseif (property_exists($data, 'isComplete') && $data->{'isComplete'} === null) { - $object->setIsComplete(null); - } if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { - $object->setCurrencyCode(null); - } if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); } - elseif (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} === null) { - $object->setCurrencyExchangeRate(null); - } if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { $object->setCurrencyPrecision($data->{'currencyPrecision'}); } - elseif (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} === null) { - $object->setCurrencyPrecision(null); - } if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { $object->setPaymentReference($data->{'paymentReference'}); } - elseif (property_exists($data, 'paymentReference') && $data->{'paymentReference'} === null) { - $object->setPaymentReference(null); - } if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { $object->setPaymentStatus($data->{'paymentStatus'}); } - elseif (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} === null) { - $object->setPaymentStatus(null); - } if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { $object->setIsRead($data->{'isRead'}); } - elseif (property_exists($data, 'isRead') && $data->{'isRead'} === null) { - $object->setIsRead(null); - } if (property_exists($data, 'hasComment') && $data->{'hasComment'} !== null) { $object->setHasComment($data->{'hasComment'}); } - elseif (property_exists($data, 'hasComment') && $data->{'hasComment'} === null) { - $object->setHasComment(null); - } if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { $object->setInternalComment($data->{'internalComment'}); } - elseif (property_exists($data, 'internalComment') && $data->{'internalComment'} === null) { - $object->setInternalComment(null); - } if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { $object->setShippingTrackerType($data->{'shippingTrackerType'}); } - elseif (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} === null) { - $object->setShippingTrackerType(null); - } if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); } - elseif (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} === null) { - $object->setShippingTrackingNo(null); - } if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); } - elseif (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} === null) { - $object->setOriginalCustomerEmail(null); - } if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); } - elseif (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} === null) { - $object->setOriginalCustomerNationalIdNo(null); - } if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); } - elseif (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} === null) { - $object->setOriginalCustomerVatNo(null); - } if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); } - elseif (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} === null) { - $object->setOriginalCustomerCustomInfo1(null); - } if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } - elseif (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} === null) { - $object->setOriginalCustomerCustomInfo2(null); - } if (property_exists($data, 'items') && $data->{'items'} !== null) { $values = array(); foreach ($data->{'items'} as $value) { @@ -329,15 +182,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setItems($values); } - elseif (property_exists($data, 'items') && $data->{'items'} === null) { - $object->setItems(null); - } if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); } - elseif (property_exists($data, 'addresses') && $data->{'addresses'} === null) { - $object->setAddresses(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -346,213 +193,108 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } if (null !== $object->getCustomerId()) { $data->{'customerId'} = $object->getCustomerId(); } - else { - $data->{'customerId'} = null; - } if (null !== $object->getStatusId()) { $data->{'statusId'} = $object->getStatusId(); } - else { - $data->{'statusId'} = null; - } if (null !== $object->getOnOrderStatusChangeSendEmail()) { $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); } - else { - $data->{'onOrderStatusChangeSendEmail'} = null; - } if (null !== $object->getOnOrderStatusChangeProcessPayment()) { $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); } - else { - $data->{'onOrderStatusChangeProcessPayment'} = null; - } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } - else { - $data->{'shippingMethodId'} = null; - } if (null !== $object->getPaymentMethodId()) { $data->{'paymentMethodId'} = $object->getPaymentMethodId(); } - else { - $data->{'paymentMethodId'} = null; - } if (null !== $object->getPaymentMethodName()) { $data->{'paymentMethodName'} = $object->getPaymentMethodName(); } - else { - $data->{'paymentMethodName'} = null; - } if (null !== $object->getPaymentFee()) { $data->{'paymentFee'} = $object->getPaymentFee(); } - else { - $data->{'paymentFee'} = null; - } if (null !== $object->getPaymentVatRate()) { $data->{'paymentVatRate'} = $object->getPaymentVatRate(); } - else { - $data->{'paymentVatRate'} = null; - } if (null !== $object->getShippingMethodName()) { $data->{'shippingMethodName'} = $object->getShippingMethodName(); } - else { - $data->{'shippingMethodName'} = null; - } if (null !== $object->getShippingCost()) { $data->{'shippingCost'} = $object->getShippingCost(); } - else { - $data->{'shippingCost'} = null; - } if (null !== $object->getShippingVatRate()) { $data->{'shippingVatRate'} = $object->getShippingVatRate(); } - else { - $data->{'shippingVatRate'} = null; - } if (null !== $object->getCustomInfo1()) { $data->{'customInfo1'} = $object->getCustomInfo1(); } - else { - $data->{'customInfo1'} = null; - } if (null !== $object->getCustomInfo2()) { $data->{'customInfo2'} = $object->getCustomInfo2(); } - else { - $data->{'customInfo2'} = null; - } if (null !== $object->getCustomInfo3()) { $data->{'customInfo3'} = $object->getCustomInfo3(); } - else { - $data->{'customInfo3'} = null; - } if (null !== $object->getCustomInfo4()) { $data->{'customInfo4'} = $object->getCustomInfo4(); } - else { - $data->{'customInfo4'} = null; - } if (null !== $object->getDiscountCode()) { $data->{'discountCode'} = $object->getDiscountCode(); } - else { - $data->{'discountCode'} = null; - } if (null !== $object->getAmountPaid()) { $data->{'amountPaid'} = $object->getAmountPaid(); } - else { - $data->{'amountPaid'} = null; - } if (null !== $object->getIsComplete()) { $data->{'isComplete'} = $object->getIsComplete(); } - else { - $data->{'isComplete'} = null; - } if (null !== $object->getCurrencyCode()) { $data->{'currencyCode'} = $object->getCurrencyCode(); } - else { - $data->{'currencyCode'} = null; - } if (null !== $object->getCurrencyExchangeRate()) { $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); } - else { - $data->{'currencyExchangeRate'} = null; - } if (null !== $object->getCurrencyPrecision()) { $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); } - else { - $data->{'currencyPrecision'} = null; - } if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getPaymentReference()) { $data->{'paymentReference'} = $object->getPaymentReference(); } - else { - $data->{'paymentReference'} = null; - } if (null !== $object->getPaymentStatus()) { $data->{'paymentStatus'} = $object->getPaymentStatus(); } - else { - $data->{'paymentStatus'} = null; - } if (null !== $object->getIsRead()) { $data->{'isRead'} = $object->getIsRead(); } - else { - $data->{'isRead'} = null; - } if (null !== $object->getInternalComment()) { $data->{'internalComment'} = $object->getInternalComment(); } - else { - $data->{'internalComment'} = null; - } if (null !== $object->getShippingTrackerType()) { $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); } - else { - $data->{'shippingTrackerType'} = null; - } if (null !== $object->getShippingTrackingNo()) { $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); } - else { - $data->{'shippingTrackingNo'} = null; - } if (null !== $object->getOriginalCustomerEmail()) { $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); } - else { - $data->{'originalCustomerEmail'} = null; - } if (null !== $object->getOriginalCustomerNationalIdNo()) { $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); } - else { - $data->{'originalCustomerNationalIdNo'} = null; - } if (null !== $object->getOriginalCustomerVatNo()) { $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); } - else { - $data->{'originalCustomerVatNo'} = null; - } if (null !== $object->getOriginalCustomerCustomInfo1()) { $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); } - else { - $data->{'originalCustomerCustomInfo1'} = null; - } if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } - else { - $data->{'originalCustomerCustomInfo2'} = null; - } if (null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { @@ -560,15 +302,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'items'} = $values; } - else { - $data->{'items'} = null; - } if (null !== $object->getAddresses()) { $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } - else { - $data->{'addresses'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index 19abd7f8..b66c4f6c 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'current_page') && $data->{'current_page'} !== null) { $object->setCurrentPage($data->{'current_page'}); } - elseif (property_exists($data, 'current_page') && $data->{'current_page'} === null) { - $object->setCurrentPage(null); - } if (property_exists($data, 'per_page') && $data->{'per_page'} !== null) { $object->setPerPage($data->{'per_page'}); } - elseif (property_exists($data, 'per_page') && $data->{'per_page'} === null) { - $object->setPerPage(null); - } if (property_exists($data, 'total') && $data->{'total'} !== null) { $object->setTotal($data->{'total'}); } - elseif (property_exists($data, 'total') && $data->{'total'} === null) { - $object->setTotal(null); - } if (property_exists($data, 'count') && $data->{'count'} !== null) { $object->setCount($data->{'count'}); } - elseif (property_exists($data, 'count') && $data->{'count'} === null) { - $object->setCount(null); - } if (property_exists($data, 'total_pages') && $data->{'total_pages'} !== null) { $object->setTotalPages($data->{'total_pages'}); } - elseif (property_exists($data, 'total_pages') && $data->{'total_pages'} === null) { - $object->setTotalPages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php index 15cf03c9..42bccaf8 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index 72b2c190..33bd7d06 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'title') && $data->{'title'} !== null) { $object->setTitle($data->{'title'}); } - elseif (property_exists($data, 'title') && $data->{'title'} === null) { - $object->setTitle(null); - } if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } - elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { - $object->setShortDescription(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php index 0db4a2cf..e1d34c8a 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php index 94fe633a..ecaf62b1 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index 293a437f..efe7bb6c 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { $object->setPaymentMethodId($data->{'paymentMethodId'}); } - elseif (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} === null) { - $object->setPaymentMethodId(null); - } if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { - $object->setIdCode(null); - } if (property_exists($data, 'active') && $data->{'active'} !== null) { $object->setActive($data->{'active'}); } - elseif (property_exists($data, 'active') && $data->{'active'} === null) { - $object->setActive(null); - } if (property_exists($data, 'fee') && $data->{'fee'} !== null) { $object->setFee($data->{'fee'}); } - elseif (property_exists($data, 'fee') && $data->{'fee'} === null) { - $object->setFee(null); - } if (property_exists($data, 'validForCountries') && $data->{'validForCountries'} !== null) { $object->setValidForCountries($data->{'validForCountries'}); } - elseif (property_exists($data, 'validForCountries') && $data->{'validForCountries'} === null) { - $object->setValidForCountries(null); - } if (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} !== null) { $values = array(); foreach ($data->{'validCountriesSelected'} as $value) { @@ -65,57 +50,30 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setValidCountriesSelected($values); } - elseif (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} === null) { - $object->setValidCountriesSelected(null); - } if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); } - elseif (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} === null) { - $object->setValidForMinItemsSubtotal(null); - } if (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} !== null) { $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'}); } - elseif (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} === null) { - $object->setValidForMaxItemsSubtotal(null); - } if (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} !== null) { $object->setValidForMinWeight($data->{'validForMinWeight'}); } - elseif (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} === null) { - $object->setValidForMinWeight(null); - } if (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} !== null) { $object->setValidForMaxWeight($data->{'validForMaxWeight'}); } - elseif (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} === null) { - $object->setValidForMaxWeight(null); - } if (property_exists($data, 'validForShippingMethods') && $data->{'validForShippingMethods'} !== null) { $object->setValidForShippingMethods($data->{'validForShippingMethods'}); } - elseif (property_exists($data, 'validForShippingMethods') && $data->{'validForShippingMethods'} === null) { - $object->setValidForShippingMethods(null); - } if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { $object->setValidForCustomerType($data->{'validForCustomerType'}); } - elseif (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} === null) { - $object->setValidForCustomerType(null); - } if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } - elseif (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} === null) { - $object->setIsClickAndCollect(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -124,9 +82,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php index dc03612e..e2a9641b 100644 --- a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php index 3e2df5a0..97611b03 100644 --- a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\PricelistModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 149be832..546d8c2c 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -31,45 +31,24 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'isMaster') && $data->{'isMaster'} !== null) { $object->setIsMaster($data->{'isMaster'}); } - elseif (property_exists($data, 'isMaster') && $data->{'isMaster'} === null) { - $object->setIsMaster(null); - } if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { - $object->setIsActive(null); - } if (property_exists($data, 'region') && $data->{'region'} !== null) { $object->setRegion($data->{'region'}); } - elseif (property_exists($data, 'region') && $data->{'region'} === null) { - $object->setRegion(null); - } if (property_exists($data, 'countryCodes') && $data->{'countryCodes'} !== null) { $values = array(); foreach ($data->{'countryCodes'} as $value) { @@ -77,68 +56,32 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setCountryCodes($values); } - elseif (property_exists($data, 'countryCodes') && $data->{'countryCodes'} === null) { - $object->setCountryCodes(null); - } if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { $object->setCurrencyCode($data->{'currencyCode'}); } - elseif (property_exists($data, 'currencyCode') && $data->{'currencyCode'} === null) { - $object->setCurrencyCode(null); - } if (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} !== null) { $object->setParentPricelistId($data->{'parentPricelistId'}); } - elseif (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} === null) { - $object->setParentPricelistId(null); - } if (property_exists($data, 'isCustomerPricelist') && $data->{'isCustomerPricelist'} !== null) { $object->setIsCustomerPricelist($data->{'isCustomerPricelist'}); } - elseif (property_exists($data, 'isCustomerPricelist') && $data->{'isCustomerPricelist'} === null) { - $object->setIsCustomerPricelist(null); - } if (property_exists($data, 'isCountryPricelist') && $data->{'isCountryPricelist'} !== null) { $object->setIsCountryPricelist($data->{'isCountryPricelist'}); } - elseif (property_exists($data, 'isCountryPricelist') && $data->{'isCountryPricelist'} === null) { - $object->setIsCountryPricelist(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } - if (null !== $object->getParentPricelistId()) { - $data->{'parentPricelistId'} = $object->getParentPricelistId(); - } - else { - $data->{'parentPricelistId'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); + $data->{'parentPricelistId'} = $object->getParentPricelistId(); if (null !== $object->getIsCustomerPricelist()) { $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); } - else { - $data->{'isCustomerPricelist'} = null; - } if (null !== $object->getIsCountryPricelist()) { $data->{'isCountryPricelist'} = $object->getIsCountryPricelist(); } - else { - $data->{'isCountryPricelist'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php index 42ebcc3d..9dc003e8 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php index 196993d1..705cb8de 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php index 9b0fe862..b73011cb 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); - } if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } - elseif (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} === null) { - $object->setSpecialPriceExVat(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,7 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } - else { - $data->{'pricelistId'} = null; - } - if (null !== $object->getSpecialPriceExVat()) { - $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); - } - else { - $data->{'specialPriceExVat'} = null; - } + $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php index c21f06a5..cbdf087e 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php index 7eb2f0ea..4b55fb38 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php @@ -31,45 +31,24 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { $object->setPageTitle($data->{'pageTitle'}); } - elseif (property_exists($data, 'pageTitle') && $data->{'pageTitle'} === null) { - $object->setPageTitle(null); - } if (property_exists($data, 'description') && $data->{'description'} !== null) { $object->setDescription($data->{'description'}); } - elseif (property_exists($data, 'description') && $data->{'description'} === null) { - $object->setDescription(null); - } if (property_exists($data, 'bottomDescription') && $data->{'bottomDescription'} !== null) { $object->setBottomDescription($data->{'bottomDescription'}); } - elseif (property_exists($data, 'bottomDescription') && $data->{'bottomDescription'} === null) { - $object->setBottomDescription(null); - } if (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} !== null) { $object->setPageMetaDescription($data->{'pageMetaDescription'}); } - elseif (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} === null) { - $object->setPageMetaDescription(null); - } if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { $object->setPermalink($data->{'permalink'}); } - elseif (property_exists($data, 'permalink') && $data->{'permalink'} === null) { - $object->setPermalink(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -78,45 +57,14 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } - if (null !== $object->getPageTitle()) { - $data->{'pageTitle'} = $object->getPageTitle(); - } - else { - $data->{'pageTitle'} = null; - } - if (null !== $object->getDescription()) { - $data->{'description'} = $object->getDescription(); - } - else { - $data->{'description'} = null; - } - if (null !== $object->getBottomDescription()) { - $data->{'bottomDescription'} = $object->getBottomDescription(); - } - else { - $data->{'bottomDescription'} = null; - } - if (null !== $object->getPageMetaDescription()) { - $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); - } - else { - $data->{'pageMetaDescription'} = null; - } - if (null !== $object->getPermalink()) { - $data->{'permalink'} = $object->getPermalink(); - } - else { - $data->{'permalink'} = null; - } + $data->{'pageTitle'} = $object->getPageTitle(); + $data->{'description'} = $object->getDescription(); + $data->{'bottomDescription'} = $object->getBottomDescription(); + $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); + $data->{'permalink'} = $object->getPermalink(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php index 6561e35c..f3a269fb 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php index e1fdec66..7570eceb 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php index 057f7227..2af5e4cc 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { $object->setCategoryId($data->{'categoryId'}); } - elseif (property_exists($data, 'categoryId') && $data->{'categoryId'} === null) { - $object->setCategoryId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCategoryId()) { $data->{'categoryId'} = $object->getCategoryId(); } - else { - $data->{'categoryId'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php index 751dca0d..293c4e62 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } - elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { - $object->setPagination(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } - else { - $data->{'pagination'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php index f794a51e..39d6b82a 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php @@ -35,15 +35,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta', 'json', $context)); } - elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { - $object->setMeta(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -56,15 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - else { - $data->{'meta'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php index 6fade44d..0144e72b 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 01226dbf..29d18934 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -31,128 +31,58 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { $object->setCategoryId($data->{'categoryId'}); } - elseif (property_exists($data, 'categoryId') && $data->{'categoryId'} === null) { - $object->setCategoryId(null); - } if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { $object->setParentId($data->{'parentId'}); } - elseif (property_exists($data, 'parentId') && $data->{'parentId'} === null) { - $object->setParentId(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'openPage') && $data->{'openPage'} !== null) { $object->setOpenPage($data->{'openPage'}); } - elseif (property_exists($data, 'openPage') && $data->{'openPage'} === null) { - $object->setOpenPage(null); - } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { - $object->setImageFileId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalType') && $data->{'externalType'} !== null) { $object->setExternalType($data->{'externalType'}); } - elseif (property_exists($data, 'externalType') && $data->{'externalType'} === null) { - $object->setExternalType(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'hasChildren') && $data->{'hasChildren'} !== null) { $object->setHasChildren($data->{'hasChildren'}); } - elseif (property_exists($data, 'hasChildren') && $data->{'hasChildren'} === null) { - $object->setHasChildren(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getParentId()) { - $data->{'parentId'} = $object->getParentId(); - } - else { - $data->{'parentId'} = null; - } + $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getOpenPage()) { $data->{'openPage'} = $object->getOpenPage(); } - else { - $data->{'openPage'} = null; - } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } - else { - $data->{'imageFileId'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalType()) { - $data->{'externalType'} = $object->getExternalType(); - } - else { - $data->{'externalType'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'imageFileId'} = $object->getImageFileId(); + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalType'} = $object->getExternalType(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index 566b1590..4f1cd011 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -31,63 +31,33 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { $object->setCategoryId($data->{'categoryId'}); } - elseif (property_exists($data, 'categoryId') && $data->{'categoryId'} === null) { - $object->setCategoryId(null); - } if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { $object->setParentId($data->{'parentId'}); } - elseif (property_exists($data, 'parentId') && $data->{'parentId'} === null) { - $object->setParentId(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'openPage') && $data->{'openPage'} !== null) { $object->setOpenPage($data->{'openPage'}); } - elseif (property_exists($data, 'openPage') && $data->{'openPage'} === null) { - $object->setOpenPage(null); - } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { - $object->setImageFileId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalType') && $data->{'externalType'} !== null) { $object->setExternalType($data->{'externalType'}); } - elseif (property_exists($data, 'externalType') && $data->{'externalType'} === null) { - $object->setExternalType(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'hasChildren') && $data->{'hasChildren'} !== null) { $object->setHasChildren($data->{'hasChildren'}); } - elseif (property_exists($data, 'hasChildren') && $data->{'hasChildren'} === null) { - $object->setHasChildren(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -95,62 +65,25 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getParentId()) { - $data->{'parentId'} = $object->getParentId(); - } - else { - $data->{'parentId'} = null; - } + $data->{'parentId'} = $object->getParentId(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getOpenPage()) { $data->{'openPage'} = $object->getOpenPage(); } - else { - $data->{'openPage'} = null; - } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } - else { - $data->{'imageFileId'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalType()) { - $data->{'externalType'} = $object->getExternalType(); - } - else { - $data->{'externalType'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'imageFileId'} = $object->getImageFileId(); + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalType'} = $object->getExternalType(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -158,9 +91,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php index ca9dedc0..71ff2c3a 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php index 415d88ea..879883dc 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php index 40fd16a7..e8ad0617 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php @@ -31,45 +31,24 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } - elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { - $object->setShortDescription(null); - } if (property_exists($data, 'longDescription') && $data->{'longDescription'} !== null) { $object->setLongDescription($data->{'longDescription'}); } - elseif (property_exists($data, 'longDescription') && $data->{'longDescription'} === null) { - $object->setLongDescription(null); - } if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { $object->setPermalink($data->{'permalink'}); } - elseif (property_exists($data, 'permalink') && $data->{'permalink'} === null) { - $object->setPermalink(null); - } if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { $object->setPageTitle($data->{'pageTitle'}); } - elseif (property_exists($data, 'pageTitle') && $data->{'pageTitle'} === null) { - $object->setPageTitle(null); - } if (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} !== null) { $object->setPageMetaDescription($data->{'pageMetaDescription'}); } - elseif (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} === null) { - $object->setPageMetaDescription(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -78,45 +57,24 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getShortDescription()) { $data->{'shortDescription'} = $object->getShortDescription(); } - else { - $data->{'shortDescription'} = null; - } if (null !== $object->getLongDescription()) { $data->{'longDescription'} = $object->getLongDescription(); } - else { - $data->{'longDescription'} = null; - } if (null !== $object->getPermalink()) { $data->{'permalink'} = $object->getPermalink(); } - else { - $data->{'permalink'} = null; - } if (null !== $object->getPageTitle()) { $data->{'pageTitle'} = $object->getPageTitle(); } - else { - $data->{'pageTitle'} = null; - } if (null !== $object->getPageMetaDescription()) { $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); } - else { - $data->{'pageMetaDescription'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php index 9b6d1409..ed34651a 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } - elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { - $object->setShortDescription(null); - } if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { $object->setPermalink($data->{'permalink'}); } - elseif (property_exists($data, 'permalink') && $data->{'permalink'} === null) { - $object->setPermalink(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,27 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getShortDescription()) { $data->{'shortDescription'} = $object->getShortDescription(); } - else { - $data->{'shortDescription'} = null; - } if (null !== $object->getPermalink()) { $data->{'permalink'} = $object->getPermalink(); } - else { - $data->{'permalink'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php index 51ef2a2d..5f390528 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php index 32af6a16..a464854f 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 449e09b7..837fba58 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -31,62 +31,29 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { - $object->setManufacturerId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } - elseif (property_exists($data, 'url') && $data->{'url'} === null) { - $object->setUrl(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } - if (null !== $object->getUrl()) { - $data->{'url'} = $object->getUrl(); - } - else { - $data->{'url'} = null; - } + $data->{'url'} = $object->getUrl(); return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php index 57ea3df6..e1da9ec1 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php index e0371b74..9b0184c3 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index 99083cb4..59db59cf 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'productMediaFileId') && $data->{'productMediaFileId'} !== null) { $object->setProductMediaFileId($data->{'productMediaFileId'}); } - elseif (property_exists($data, 'productMediaFileId') && $data->{'productMediaFileId'} === null) { - $object->setProductMediaFileId(null); - } if (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} !== null) { $object->setMediaFileId($data->{'mediaFileId'}); } - elseif (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} === null) { - $object->setMediaFileId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,15 +48,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMediaFileId()) { $data->{'mediaFileId'} = $object->getMediaFileId(); } - else { - $data->{'mediaFileId'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php index b99b6800..c765ac64 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php index 046f7018..5ddc2423 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php index 56e805da..2ec6aae7 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'metaDataId') && $data->{'metaDataId'} !== null) { $object->setMetaDataId($data->{'metaDataId'}); } - elseif (property_exists($data, 'metaDataId') && $data->{'metaDataId'} === null) { - $object->setMetaDataId(null); - } if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { $object->setMetaDataTypeId($data->{'metaDataTypeId'}); } - elseif (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} === null) { - $object->setMetaDataTypeId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,27 +48,15 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMetaDataId()) { $data->{'metaDataId'} = $object->getMetaDataId(); } - else { - $data->{'metaDataId'} = null; - } if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } - else { - $data->{'metaDataTypeId'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index 4d60d259..ec38429a 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'metaDataId') && $data->{'metaDataId'} !== null) { $object->setMetaDataId($data->{'metaDataId'}); } - elseif (property_exists($data, 'metaDataId') && $data->{'metaDataId'} === null) { - $object->setMetaDataId(null); - } if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { $object->setMetaDataTypeId($data->{'metaDataTypeId'}); } - elseif (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} === null) { - $object->setMetaDataTypeId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -53,9 +44,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -64,15 +52,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMetaDataTypeId()) { $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); } - else { - $data->{'metaDataTypeId'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -80,9 +62,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php index 27cf2b5c..25365834 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php index c63897cd..a3920f32 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php index acdb493e..9888a7da 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php index f028ce4d..c43c9b98 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index fe0bc90b..d0b11121 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { $object->setMetaDataTypeId($data->{'metaDataTypeId'}); } - elseif (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} === null) { - $object->setMetaDataTypeId(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,9 +42,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php index 653c9aed..e542486a 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php index 12939120..7ca038ae 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php index b87c3a88..83187270 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php index 27ec6295..82d4c723 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'value') && $data->{'value'} !== null) { $object->setValue($data->{'value'}); } - elseif (property_exists($data, 'value') && $data->{'value'} === null) { - $object->setValue(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getValue()) { $data->{'value'} = $object->getValue(); } - else { - $data->{'value'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php index 24144813..746e4b3f 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); } - elseif (property_exists($data, 'pagination') && $data->{'pagination'} === null) { - $object->setPagination(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPagination()) { $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); } - else { - $data->{'pagination'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php index 39553a73..8de7c7b0 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php @@ -35,15 +35,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } if (property_exists($data, 'meta') && $data->{'meta'} !== null) { $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta', 'json', $context)); } - elseif (property_exists($data, 'meta') && $data->{'meta'} === null) { - $object->setMeta(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -56,15 +50,9 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } if (null !== $object->getMeta()) { $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - else { - $data->{'meta'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php index ebeb5d57..4ea895e1 100644 --- a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php index 1d4d3067..e985b36c 100644 --- a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index 470f095a..ef4d7cdd 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -31,39 +31,21 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'productId') && $data->{'productId'} !== null) { $object->setProductId($data->{'productId'}); } - elseif (property_exists($data, 'productId') && $data->{'productId'} === null) { - $object->setProductId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } - elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { - $object->setDefaultVatRate(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { @@ -71,152 +53,74 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVisibilityPricelistIds($values); } - elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { - $object->setVisibilityPricelistIds(null); - } if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } - elseif (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} === null) { - $object->setMoreInfoUrl(null); - } if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { - $object->setManufacturerId(null); - } if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { - $object->setUnitId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } - elseif (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} === null) { - $object->setIsBackInStockWatchable(null); - } if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } - elseif (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} === null) { - $object->setBundleUseManualPrice(null); - } if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } - elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { - $object->setAccounting(null); - } if (property_exists($data, 'hasSeveralVariants') && $data->{'hasSeveralVariants'} !== null) { $object->setHasSeveralVariants($data->{'hasSeveralVariants'}); } - elseif (property_exists($data, 'hasSeveralVariants') && $data->{'hasSeveralVariants'} === null) { - $object->setHasSeveralVariants(null); - } if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } - elseif (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} === null) { - $object->setModifiedAt(null); - } if (property_exists($data, 'variants') && $data->{'variants'} !== null) { $object->setVariants($this->denormalizer->denormalize($data->{'variants'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection', 'json', $context)); } - elseif (property_exists($data, 'variants') && $data->{'variants'} === null) { - $object->setVariants(null); - } if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { $object->setBundledProducts($this->denormalizer->denormalize($data->{'bundledProducts'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection', 'json', $context)); } - elseif (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} === null) { - $object->setBundledProducts(null); - } if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { $object->setMediaFiles($this->denormalizer->denormalize($data->{'mediaFiles'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection', 'json', $context)); } - elseif (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} === null) { - $object->setMediaFiles(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { $object->setVatRates($this->denormalizer->denormalize($data->{'vatRates'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection', 'json', $context)); } - elseif (property_exists($data, 'vatRates') && $data->{'vatRates'} === null) { - $object->setVatRates(null); - } if (property_exists($data, 'categories') && $data->{'categories'} !== null) { $object->setCategories($this->denormalizer->denormalize($data->{'categories'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection', 'json', $context)); } - elseif (property_exists($data, 'categories') && $data->{'categories'} === null) { - $object->setCategories(null); - } if (property_exists($data, 'unit') && $data->{'unit'} !== null) { $object->setUnit($this->denormalizer->denormalize($data->{'unit'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json', $context)); } - elseif (property_exists($data, 'unit') && $data->{'unit'} === null) { - $object->setUnit(null); - } if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { $object->setMetaData($this->denormalizer->denormalize($data->{'metaData'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection', 'json', $context)); } - elseif (property_exists($data, 'metaData') && $data->{'metaData'} === null) { - $object->setMetaData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } - if (null !== $object->getDefaultVatRate()) { - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); - } - else { - $data->{'defaultVatRate'} = null; - } + $data->{'defaultVatRate'} = $object->getDefaultVatRate(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { @@ -224,105 +128,46 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'visibilityPricelistIds'} = $values; } - else { - $data->{'visibilityPricelistIds'} = null; - } if (null !== $object->getMoreInfoUrl()) { $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); } - else { - $data->{'moreInfoUrl'} = null; - } - if (null !== $object->getManufacturerId()) { - $data->{'manufacturerId'} = $object->getManufacturerId(); - } - else { - $data->{'manufacturerId'} = null; - } - if (null !== $object->getUnitId()) { - $data->{'unitId'} = $object->getUnitId(); - } - else { - $data->{'unitId'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } + $data->{'manufacturerId'} = $object->getManufacturerId(); + $data->{'unitId'} = $object->getUnitId(); + $data->{'sortIndex'} = $object->getSortIndex(); if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - else { - $data->{'isBackInStockWatchable'} = null; - } if (null !== $object->getBundleUseManualPrice()) { $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); } - else { - $data->{'bundleUseManualPrice'} = null; - } - if (null !== $object->getAccounting()) { - $data->{'accounting'} = $object->getAccounting(); - } - else { - $data->{'accounting'} = null; - } + $data->{'accounting'} = $object->getAccounting(); if (null !== $object->getVariants()) { $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context); } - else { - $data->{'variants'} = null; - } if (null !== $object->getBundledProducts()) { $data->{'bundledProducts'} = $this->normalizer->normalize($object->getBundledProducts(), 'json', $context); } - else { - $data->{'bundledProducts'} = null; - } if (null !== $object->getMediaFiles()) { $data->{'mediaFiles'} = $this->normalizer->normalize($object->getMediaFiles(), 'json', $context); } - else { - $data->{'mediaFiles'} = null; - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } if (null !== $object->getVatRates()) { $data->{'vatRates'} = $this->normalizer->normalize($object->getVatRates(), 'json', $context); } - else { - $data->{'vatRates'} = null; - } if (null !== $object->getCategories()) { $data->{'categories'} = $this->normalizer->normalize($object->getCategories(), 'json', $context); } - else { - $data->{'categories'} = null; - } if (null !== $object->getUnit()) { $data->{'unit'} = $this->normalizer->normalize($object->getUnit(), 'json', $context); } - else { - $data->{'unit'} = null; - } if (null !== $object->getMetaData()) { $data->{'metaData'} = $this->normalizer->normalize($object->getMetaData(), 'json', $context); } - else { - $data->{'metaData'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index 0c1ed54f..cb470bdd 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } - elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { - $object->setDefaultVatRate(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { @@ -65,57 +50,30 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVisibilityPricelistIds($values); } - elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { - $object->setVisibilityPricelistIds(null); - } if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } - elseif (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} === null) { - $object->setMoreInfoUrl(null); - } if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { - $object->setManufacturerId(null); - } if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { - $object->setUnitId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } - elseif (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} === null) { - $object->setIsBackInStockWatchable(null); - } if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } - elseif (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} === null) { - $object->setBundleUseManualPrice(null); - } if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } - elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { - $object->setAccounting(null); - } if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { $values_1 = array(); foreach ($data->{'mediaFiles'} as $value_1) { @@ -123,9 +81,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setMediaFiles($values_1); } - elseif (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} === null) { - $object->setMediaFiles(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values_2 = array(); foreach ($data->{'languages'} as $value_2) { @@ -133,9 +88,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values_2); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { $values_3 = array(); foreach ($data->{'vatRates'} as $value_3) { @@ -143,9 +95,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVatRates($values_3); } - elseif (property_exists($data, 'vatRates') && $data->{'vatRates'} === null) { - $object->setVatRates(null); - } if (property_exists($data, 'categories') && $data->{'categories'} !== null) { $values_4 = array(); foreach ($data->{'categories'} as $value_4) { @@ -153,9 +102,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setCategories($values_4); } - elseif (property_exists($data, 'categories') && $data->{'categories'} === null) { - $object->setCategories(null); - } if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { $values_5 = array(); foreach ($data->{'metaData'} as $value_5) { @@ -163,44 +109,20 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setMetaData($values_5); } - elseif (property_exists($data, 'metaData') && $data->{'metaData'} === null) { - $object->setMetaData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } - if (null !== $object->getDefaultVatRate()) { - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); - } - else { - $data->{'defaultVatRate'} = null; - } + $data->{'defaultVatRate'} = $object->getDefaultVatRate(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { @@ -211,54 +133,18 @@ public function normalize($object, $format = null, array $context = array()) else { $data->{'visibilityPricelistIds'} = null; } - if (null !== $object->getMoreInfoUrl()) { - $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); - } - else { - $data->{'moreInfoUrl'} = null; - } - if (null !== $object->getManufacturerId()) { - $data->{'manufacturerId'} = $object->getManufacturerId(); - } - else { - $data->{'manufacturerId'} = null; - } - if (null !== $object->getUnitId()) { - $data->{'unitId'} = $object->getUnitId(); - } - else { - $data->{'unitId'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } + $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); + $data->{'manufacturerId'} = $object->getManufacturerId(); + $data->{'unitId'} = $object->getUnitId(); + $data->{'sortIndex'} = $object->getSortIndex(); if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - else { - $data->{'isBackInStockWatchable'} = null; - } - if (null !== $object->getBundleUseManualPrice()) { - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - } - else { - $data->{'bundleUseManualPrice'} = null; - } - if (null !== $object->getAccounting()) { - $data->{'accounting'} = $object->getAccounting(); - } - else { - $data->{'accounting'} = null; - } + $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); + $data->{'accounting'} = $object->getAccounting(); if (null !== $object->getMediaFiles()) { $values_1 = array(); foreach ($object->getMediaFiles() as $value_1) { @@ -266,9 +152,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'mediaFiles'} = $values_1; } - else { - $data->{'mediaFiles'} = null; - } if (null !== $object->getLanguages()) { $values_2 = array(); foreach ($object->getLanguages() as $value_2) { @@ -276,9 +159,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values_2; } - else { - $data->{'languages'} = null; - } if (null !== $object->getVatRates()) { $values_3 = array(); foreach ($object->getVatRates() as $value_3) { @@ -286,9 +166,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'vatRates'} = $values_3; } - else { - $data->{'vatRates'} = null; - } if (null !== $object->getCategories()) { $values_4 = array(); foreach ($object->getCategories() as $value_4) { @@ -296,9 +173,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'categories'} = $values_4; } - else { - $data->{'categories'} = null; - } if (null !== $object->getMetaData()) { $values_5 = array(); foreach ($object->getMetaData() as $value_5) { @@ -306,9 +180,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'metaData'} = $values_5; } - else { - $data->{'metaData'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index 62baf164..e127f78e 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { $object->setCreatedAt($data->{'createdAt'}); } - elseif (property_exists($data, 'createdAt') && $data->{'createdAt'} === null) { - $object->setCreatedAt(null); - } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } - elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { - $object->setDefaultVatRate(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { $values = array(); foreach ($data->{'visibilityPricelistIds'} as $value) { @@ -65,57 +50,30 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVisibilityPricelistIds($values); } - elseif (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} === null) { - $object->setVisibilityPricelistIds(null); - } if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { $object->setMoreInfoUrl($data->{'moreInfoUrl'}); } - elseif (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} === null) { - $object->setMoreInfoUrl(null); - } if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { $object->setManufacturerId($data->{'manufacturerId'}); } - elseif (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} === null) { - $object->setManufacturerId(null); - } if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { - $object->setUnitId(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); } - elseif (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} === null) { - $object->setIsBackInStockWatchable(null); - } if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); } - elseif (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} === null) { - $object->setBundleUseManualPrice(null); - } if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { $object->setAccounting($data->{'accounting'}); } - elseif (property_exists($data, 'accounting') && $data->{'accounting'} === null) { - $object->setAccounting(null); - } if (property_exists($data, 'variants') && $data->{'variants'} !== null) { $values_1 = array(); foreach ($data->{'variants'} as $value_1) { @@ -123,9 +81,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVariants($values_1); } - elseif (property_exists($data, 'variants') && $data->{'variants'} === null) { - $object->setVariants(null); - } if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { $values_2 = array(); foreach ($data->{'bundledProducts'} as $value_2) { @@ -133,9 +88,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setBundledProducts($values_2); } - elseif (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} === null) { - $object->setBundledProducts(null); - } if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { $values_3 = array(); foreach ($data->{'mediaFiles'} as $value_3) { @@ -143,9 +95,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setMediaFiles($values_3); } - elseif (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} === null) { - $object->setMediaFiles(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values_4 = array(); foreach ($data->{'languages'} as $value_4) { @@ -153,9 +102,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values_4); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { $values_5 = array(); foreach ($data->{'vatRates'} as $value_5) { @@ -163,9 +109,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVatRates($values_5); } - elseif (property_exists($data, 'vatRates') && $data->{'vatRates'} === null) { - $object->setVatRates(null); - } if (property_exists($data, 'categories') && $data->{'categories'} !== null) { $values_6 = array(); foreach ($data->{'categories'} as $value_6) { @@ -173,9 +116,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setCategories($values_6); } - elseif (property_exists($data, 'categories') && $data->{'categories'} === null) { - $object->setCategories(null); - } if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { $values_7 = array(); foreach ($data->{'metaData'} as $value_7) { @@ -183,44 +123,20 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setMetaData($values_7); } - elseif (property_exists($data, 'metaData') && $data->{'metaData'} === null) { - $object->setMetaData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getCreatedAt()) { $data->{'createdAt'} = $object->getCreatedAt(); } - else { - $data->{'createdAt'} = null; - } - if (null !== $object->getDefaultVatRate()) { - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); - } - else { - $data->{'defaultVatRate'} = null; - } + $data->{'defaultVatRate'} = $object->getDefaultVatRate(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { @@ -234,51 +150,17 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getMoreInfoUrl()) { $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); } - else { - $data->{'moreInfoUrl'} = null; - } - if (null !== $object->getManufacturerId()) { - $data->{'manufacturerId'} = $object->getManufacturerId(); - } - else { - $data->{'manufacturerId'} = null; - } - if (null !== $object->getUnitId()) { - $data->{'unitId'} = $object->getUnitId(); - } - else { - $data->{'unitId'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } + $data->{'manufacturerId'} = $object->getManufacturerId(); + $data->{'unitId'} = $object->getUnitId(); + $data->{'sortIndex'} = $object->getSortIndex(); if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getIsBackInStockWatchable()) { $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); } - else { - $data->{'isBackInStockWatchable'} = null; - } - if (null !== $object->getBundleUseManualPrice()) { - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - } - else { - $data->{'bundleUseManualPrice'} = null; - } - if (null !== $object->getAccounting()) { - $data->{'accounting'} = $object->getAccounting(); - } - else { - $data->{'accounting'} = null; - } + $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); + $data->{'accounting'} = $object->getAccounting(); if (null !== $object->getVariants()) { $values_1 = array(); foreach ($object->getVariants() as $value_1) { @@ -286,9 +168,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'variants'} = $values_1; } - else { - $data->{'variants'} = null; - } if (null !== $object->getBundledProducts()) { $values_2 = array(); foreach ($object->getBundledProducts() as $value_2) { @@ -306,9 +185,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'mediaFiles'} = $values_3; } - else { - $data->{'mediaFiles'} = null; - } if (null !== $object->getLanguages()) { $values_4 = array(); foreach ($object->getLanguages() as $value_4) { @@ -316,9 +192,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values_4; } - else { - $data->{'languages'} = null; - } if (null !== $object->getVatRates()) { $values_5 = array(); foreach ($object->getVatRates() as $value_5) { @@ -326,9 +199,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'vatRates'} = $values_5; } - else { - $data->{'vatRates'} = null; - } if (null !== $object->getCategories()) { $values_6 = array(); foreach ($object->getCategories() as $value_6) { @@ -336,9 +206,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'categories'} = $values_6; } - else { - $data->{'categories'} = null; - } if (null !== $object->getMetaData()) { $values_7 = array(); foreach ($object->getMetaData() as $value_7) { @@ -346,9 +213,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'metaData'} = $values_7; } - else { - $data->{'metaData'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php index 01bca1a7..5e23ff51 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php index e8167443..4ab14399 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index b23fbd78..7e1b1045 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php index aa375277..686d87a3 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php @@ -31,39 +31,21 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { - $object->setIdCode(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); } - elseif (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} === null) { - $object->setStockoutNewStatusId(null); - } if (property_exists($data, 'productBuyable') && $data->{'productBuyable'} !== null) { $object->setProductBuyable($data->{'productBuyable'}); } - elseif (property_exists($data, 'productBuyable') && $data->{'productBuyable'} === null) { - $object->setProductBuyable(null); - } if (property_exists($data, 'inStock') && $data->{'inStock'} !== null) { $object->setInStock($data->{'inStock'}); } - elseif (property_exists($data, 'inStock') && $data->{'inStock'} === null) { - $object->setInStock(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -71,9 +53,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -82,27 +61,13 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } - if (null !== $object->getStockoutNewStatusId()) { - $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); - } - else { - $data->{'stockoutNewStatusId'} = null; - } + $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); if (null !== $object->getProductBuyable()) { $data->{'productBuyable'} = $object->getProductBuyable(); } - else { - $data->{'productBuyable'} = null; - } if (null !== $object->getInStock()) { $data->{'inStock'} = $object->getInStock(); } - else { - $data->{'inStock'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -110,9 +75,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php index fc5bb538..80a2ce2c 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php index af8f77b7..dcfe88ce 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php @@ -31,45 +31,24 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { - $object->setIdCode(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); } - elseif (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} === null) { - $object->setStockoutNewStatusId(null); - } if (property_exists($data, 'productBuyable') && $data->{'productBuyable'} !== null) { $object->setProductBuyable($data->{'productBuyable'}); } - elseif (property_exists($data, 'productBuyable') && $data->{'productBuyable'} === null) { - $object->setProductBuyable(null); - } if (property_exists($data, 'inStock') && $data->{'inStock'} !== null) { $object->setInStock($data->{'inStock'}); } - elseif (property_exists($data, 'inStock') && $data->{'inStock'} === null) { - $object->setInStock(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -78,33 +57,16 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } - if (null !== $object->getStockoutNewStatusId()) { - $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); - } - else { - $data->{'stockoutNewStatusId'} = null; - } + $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); if (null !== $object->getProductBuyable()) { $data->{'productBuyable'} = $object->getProductBuyable(); } - else { - $data->{'productBuyable'} = null; - } if (null !== $object->getInStock()) { $data->{'inStock'} = $object->getInStock(); } - else { - $data->{'inStock'} = null; - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php index 68c65139..b585b59a 100644 --- a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php index 65ed65ea..4bc0f923 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php index e26723bb..60ebd3e7 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php index 3af18723..02464e25 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { $object->setTagOptionId($data->{'tagOptionId'}); } - elseif (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} === null) { - $object->setTagOptionId(null); - } if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { - $object->setTagId(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagOptionId()) { $data->{'tagOptionId'} = $object->getTagOptionId(); } - else { - $data->{'tagOptionId'} = null; - } if (null !== $object->getTagId()) { $data->{'tagId'} = $object->getTagId(); } - else { - $data->{'tagId'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php index 18980cc5..3d95f46e 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { $object->setTagOptionId($data->{'tagOptionId'}); } - elseif (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} === null) { - $object->setTagOptionId(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getTagOptionId()) { $data->{'tagOptionId'} = $object->getTagOptionId(); } - else { - $data->{'tagOptionId'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php index f37d4edc..36a70f6c 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php index e129a1c2..91a82a96 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index acd901e5..aa858ab4 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { $object->setTagId($data->{'tagId'}); } - elseif (property_exists($data, 'tagId') && $data->{'tagId'} === null) { - $object->setTagId(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -47,9 +41,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -62,9 +53,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php index 9a87f86e..c80a19ef 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'value') && $data->{'value'} !== null) { $object->setValue($data->{'value'}); } - elseif (property_exists($data, 'value') && $data->{'value'} === null) { - $object->setValue(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getValue()) { $data->{'value'} = $object->getValue(); } - else { - $data->{'value'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php index b10a17d1..22daca13 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php index ded90158..b3d9b080 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index 359b6592..f3e0d36a 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { $object->setTagOptionId($data->{'tagOptionId'}); } - elseif (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} === null) { - $object->setTagOptionId(null); - } if (property_exists($data, 'value') && $data->{'value'} !== null) { $object->setValue($data->{'value'}); } - elseif (property_exists($data, 'value') && $data->{'value'} === null) { - $object->setValue(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -53,9 +44,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -64,9 +52,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -74,9 +59,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php index e8d4912a..1f5e9e3d 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -41,9 +38,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -52,9 +46,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -62,9 +53,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php index aa8a3bc6..0b97318b 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -41,9 +38,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -52,9 +46,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -62,9 +53,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php index d3f4ea31..785edf6e 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -41,9 +38,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -52,9 +46,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -62,9 +53,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php index 0ce1ffd6..3ffc7eda 100644 --- a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -47,9 +41,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -58,15 +49,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -74,9 +59,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php index 3dfd277b..11ab7a6b 100644 --- a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -47,9 +41,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -58,15 +49,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -74,9 +59,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php index 08869873..fccba504 100644 --- a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -47,9 +41,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -58,15 +49,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getType()) { $data->{'type'} = $object->getType(); } - else { - $data->{'type'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -74,9 +59,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php index 2a7446df..444d3068 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php index b621ee65..3a14fbf6 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'symbol') && $data->{'symbol'} !== null) { $object->setSymbol($data->{'symbol'}); } - elseif (property_exists($data, 'symbol') && $data->{'symbol'} === null) { - $object->setSymbol(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,21 +45,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getSymbol()) { $data->{'symbol'} = $object->getSymbol(); } - else { - $data->{'symbol'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php index aa6deeaf..6d0cc2c8 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php index c9a80872..ca2be8d0 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index ae6d6ad7..5a2f0b18 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -31,50 +31,25 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { - $object->setUnitId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php index 7780db46..d6907eea 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { $object->setUnitId($data->{'unitId'}); } - elseif (property_exists($data, 'unitId') && $data->{'unitId'} === null) { - $object->setUnitId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -53,26 +44,13 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -80,9 +58,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php index accf5511..b35c9bf6 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php index f288c4ba..92249208 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php index 9ae6144e..35a1cfff 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php index 3934e278..0ddcd00b 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index d40f2694..c8379968 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { $object->setAttributeId($data->{'attributeId'}); } - elseif (property_exists($data, 'attributeId') && $data->{'attributeId'} === null) { - $object->setAttributeId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -60,27 +48,11 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeId()) { $data->{'attributeId'} = $object->getAttributeId(); } - else { - $data->{'attributeId'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index 19ed3d03..a177573f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { $object->setAttributeId($data->{'attributeId'}); } - elseif (property_exists($data, 'attributeId') && $data->{'attributeId'} === null) { - $object->setAttributeId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -53,26 +44,13 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -80,9 +58,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php index ca20af40..e8586369 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php index ce6b5bf3..bd6ec3cb 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php index ebd2bfdc..760e355b 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php index b418451c..9d9cdbab 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index 7cfa563f..a2df9a95 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -31,39 +31,21 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeValueId') && $data->{'attributeValueId'} !== null) { $object->setAttributeValueId($data->{'attributeValueId'}); } - elseif (property_exists($data, 'attributeValueId') && $data->{'attributeValueId'} === null) { - $object->setAttributeValueId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} !== null) { $object->setSkuSuffix($data->{'skuSuffix'}); } - elseif (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} === null) { - $object->setSkuSuffix(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -72,39 +54,17 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeValueId()) { $data->{'attributeValueId'} = $object->getAttributeValueId(); } - else { - $data->{'attributeValueId'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } - else { - $data->{'skuSuffix'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index 0c896911..f9c066dd 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} !== null) { $object->setSkuSuffix($data->{'skuSuffix'}); } - elseif (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} === null) { - $object->setSkuSuffix(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -59,38 +47,19 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getSkuSuffix()) { $data->{'skuSuffix'} = $object->getSkuSuffix(); } - else { - $data->{'skuSuffix'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -98,9 +67,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php index 222eafff..3c7292b7 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index 0eb76647..9dc2664a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php index 566c9dd4..50fd6aab 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -31,75 +31,39 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { - $object->setSku(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { - $object->setIsActive(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { - $object->setStockQuantity(null); - } if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { - $object->setWeightInKg(null); - } if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { - $object->setCostPrice(null); - } if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { - $object->setEan(null); - } if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { - $object->setMpn(null); - } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { - $object->setImageFileId(null); - } if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { @@ -107,9 +71,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValueLinks($values); } - elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { - $object->setAttributeValueLinks(null); - } if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { @@ -117,9 +78,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVolumePricingInheritancePricelistIds($values_1); } - elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { - $object->setVolumePricingInheritancePricelistIds(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -128,75 +86,17 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - else { - $data->{'sku'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - else { - $data->{'isActive'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - else { - $data->{'stockStatusId'} = null; - } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); - } - else { - $data->{'stockQuantity'} = null; - } - if (null !== $object->getWeightInKg()) { - $data->{'weightInKg'} = $object->getWeightInKg(); - } - else { - $data->{'weightInKg'} = null; - } - if (null !== $object->getCostPrice()) { - $data->{'costPrice'} = $object->getCostPrice(); - } - else { - $data->{'costPrice'} = null; - } - if (null !== $object->getEan()) { - $data->{'ean'} = $object->getEan(); - } - else { - $data->{'ean'} = null; - } - if (null !== $object->getMpn()) { - $data->{'mpn'} = $object->getMpn(); - } - else { - $data->{'mpn'} = null; - } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } - else { - $data->{'imageFileId'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php index a1c16efb..ebd46392 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php index b36dba20..ced2863f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index c700d956..792875d2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'priceExVat') && $data->{'priceExVat'} !== null) { $object->setPriceExVat($data->{'priceExVat'}); } - elseif (property_exists($data, 'priceExVat') && $data->{'priceExVat'} === null) { - $object->setPriceExVat(null); - } if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } - elseif (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} === null) { - $object->setSpecialPriceExVat(null); - } if (property_exists($data, 'volumePrices') && $data->{'volumePrices'} !== null) { $values = array(); foreach ($data->{'volumePrices'} as $value) { @@ -65,9 +50,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVolumePrices($values); } - elseif (property_exists($data, 'volumePrices') && $data->{'volumePrices'} === null) { - $object->setVolumePrices(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -76,33 +58,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } - else { - $data->{'pricelistId'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getPriceExVat()) { $data->{'priceExVat'} = $object->getPriceExVat(); } - else { - $data->{'priceExVat'} = null; - } - if (null !== $object->getSpecialPriceExVat()) { - $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); - } - else { - $data->{'specialPriceExVat'} = null; - } + $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); if (null !== $object->getVolumePrices()) { $values = array(); foreach ($object->getVolumePrices() as $value) { @@ -110,9 +71,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'volumePrices'} = $values; } - else { - $data->{'volumePrices'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php index 11417db0..64897647 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php @@ -31,75 +31,39 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { - $object->setSku(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { - $object->setIsActive(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { - $object->setStockQuantity(null); - } if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { - $object->setWeightInKg(null); - } if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { - $object->setCostPrice(null); - } if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { - $object->setEan(null); - } if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { - $object->setMpn(null); - } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { - $object->setImageFileId(null); - } if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { @@ -107,9 +71,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValueLinks($values); } - elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { - $object->setAttributeValueLinks(null); - } if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { @@ -117,9 +78,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVolumePricingInheritancePricelistIds($values_1); } - elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { - $object->setVolumePricingInheritancePricelistIds(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -128,75 +86,17 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - else { - $data->{'sku'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - else { - $data->{'isActive'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - else { - $data->{'stockStatusId'} = null; - } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); - } - else { - $data->{'stockQuantity'} = null; - } - if (null !== $object->getWeightInKg()) { - $data->{'weightInKg'} = $object->getWeightInKg(); - } - else { - $data->{'weightInKg'} = null; - } - if (null !== $object->getCostPrice()) { - $data->{'costPrice'} = $object->getCostPrice(); - } - else { - $data->{'costPrice'} = null; - } - if (null !== $object->getEan()) { - $data->{'ean'} = $object->getEan(); - } - else { - $data->{'ean'} = null; - } - if (null !== $object->getMpn()) { - $data->{'mpn'} = $object->getMpn(); - } - else { - $data->{'mpn'} = null; - } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } - else { - $data->{'imageFileId'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { diff --git a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php index 9539eb0a..aec3032e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php @@ -31,75 +31,39 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { - $object->setSku(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { - $object->setIsActive(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { - $object->setStockQuantity(null); - } if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { - $object->setWeightInKg(null); - } if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { - $object->setCostPrice(null); - } if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { - $object->setEan(null); - } if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { - $object->setMpn(null); - } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { - $object->setImageFileId(null); - } if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { @@ -107,9 +71,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValueLinks($values); } - elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { - $object->setAttributeValueLinks(null); - } if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { @@ -117,9 +78,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVolumePricingInheritancePricelistIds($values_1); } - elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { - $object->setVolumePricingInheritancePricelistIds(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -128,75 +86,17 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - else { - $data->{'sku'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - else { - $data->{'isActive'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - else { - $data->{'stockStatusId'} = null; - } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); - } - else { - $data->{'stockQuantity'} = null; - } - if (null !== $object->getWeightInKg()) { - $data->{'weightInKg'} = $object->getWeightInKg(); - } - else { - $data->{'weightInKg'} = null; - } - if (null !== $object->getCostPrice()) { - $data->{'costPrice'} = $object->getCostPrice(); - } - else { - $data->{'costPrice'} = null; - } - if (null !== $object->getEan()) { - $data->{'ean'} = $object->getEan(); - } - else { - $data->{'ean'} = null; - } - if (null !== $object->getMpn()) { - $data->{'mpn'} = $object->getMpn(); - } - else { - $data->{'mpn'} = null; - } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } - else { - $data->{'imageFileId'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { @@ -204,9 +104,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValueLinks'} = $values; } - else { - $data->{'attributeValueLinks'} = null; - } if (null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { diff --git a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php index e25d0034..60c45479 100644 --- a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php @@ -31,75 +31,39 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sku') && $data->{'sku'} !== null) { $object->setSku($data->{'sku'}); } - elseif (property_exists($data, 'sku') && $data->{'sku'} === null) { - $object->setSku(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { $object->setIsActive($data->{'isActive'}); } - elseif (property_exists($data, 'isActive') && $data->{'isActive'} === null) { - $object->setIsActive(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { - $object->setStockQuantity(null); - } if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { $object->setWeightInKg($data->{'weightInKg'}); } - elseif (property_exists($data, 'weightInKg') && $data->{'weightInKg'} === null) { - $object->setWeightInKg(null); - } if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { $object->setCostPrice($data->{'costPrice'}); } - elseif (property_exists($data, 'costPrice') && $data->{'costPrice'} === null) { - $object->setCostPrice(null); - } if (property_exists($data, 'ean') && $data->{'ean'} !== null) { $object->setEan($data->{'ean'}); } - elseif (property_exists($data, 'ean') && $data->{'ean'} === null) { - $object->setEan(null); - } if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { $object->setMpn($data->{'mpn'}); } - elseif (property_exists($data, 'mpn') && $data->{'mpn'} === null) { - $object->setMpn(null); - } if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { $object->setImageFileId($data->{'imageFileId'}); } - elseif (property_exists($data, 'imageFileId') && $data->{'imageFileId'} === null) { - $object->setImageFileId(null); - } if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { $values = array(); foreach ($data->{'attributeValueLinks'} as $value) { @@ -107,9 +71,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValueLinks($values); } - elseif (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} === null) { - $object->setAttributeValueLinks(null); - } if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { $values_1 = array(); foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { @@ -117,15 +78,9 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setVolumePricingInheritancePricelistIds($values_1); } - elseif (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} === null) { - $object->setVolumePricingInheritancePricelistIds(null); - } if (property_exists($data, 'variantId') && $data->{'variantId'} !== null) { $object->setVariantId($data->{'variantId'}); } - elseif (property_exists($data, 'variantId') && $data->{'variantId'} === null) { - $object->setVariantId(null); - } if (property_exists($data, 'prices') && $data->{'prices'} !== null) { $values_2 = array(); foreach ($data->{'prices'} as $value_2) { @@ -133,9 +88,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setPrices($values_2); } - elseif (property_exists($data, 'prices') && $data->{'prices'} === null) { - $object->setPrices(null); - } if (property_exists($data, 'attributeValues') && $data->{'attributeValues'} !== null) { $values_3 = array(); foreach ($data->{'attributeValues'} as $value_3) { @@ -143,9 +95,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setAttributeValues($values_3); } - elseif (property_exists($data, 'attributeValues') && $data->{'attributeValues'} === null) { - $object->setAttributeValues(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -154,75 +103,17 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - else { - $data->{'sku'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); - } - else { - $data->{'isActive'} = null; - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - else { - $data->{'sortIndex'} = null; - } - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - else { - $data->{'stockStatusId'} = null; - } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); - } - else { - $data->{'stockQuantity'} = null; - } - if (null !== $object->getWeightInKg()) { - $data->{'weightInKg'} = $object->getWeightInKg(); - } - else { - $data->{'weightInKg'} = null; - } - if (null !== $object->getCostPrice()) { - $data->{'costPrice'} = $object->getCostPrice(); - } - else { - $data->{'costPrice'} = null; - } - if (null !== $object->getEan()) { - $data->{'ean'} = $object->getEan(); - } - else { - $data->{'ean'} = null; - } - if (null !== $object->getMpn()) { - $data->{'mpn'} = $object->getMpn(); - } - else { - $data->{'mpn'} = null; - } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); - } - else { - $data->{'imageFileId'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); + $data->{'isActive'} = $object->getIsActive(); + $data->{'sortIndex'} = $object->getSortIndex(); + $data->{'stockStatusId'} = $object->getStockStatusId(); + $data->{'stockQuantity'} = $object->getStockQuantity(); + $data->{'weightInKg'} = $object->getWeightInKg(); + $data->{'costPrice'} = $object->getCostPrice(); + $data->{'ean'} = $object->getEan(); + $data->{'mpn'} = $object->getMpn(); + $data->{'imageFileId'} = $object->getImageFileId(); if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { @@ -230,9 +121,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValueLinks'} = $values; } - else { - $data->{'attributeValueLinks'} = null; - } if (null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { @@ -250,9 +138,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'prices'} = $values_2; } - else { - $data->{'prices'} = null; - } if (null !== $object->getAttributeValues()) { $values_3 = array(); foreach ($object->getAttributeValues() as $value_3) { @@ -260,9 +145,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValues'} = $values_3; } - else { - $data->{'attributeValues'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php index 8d87ef80..62d62c1a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php index f64cdb3c..60cb5eca 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php index 920af1a2..0871db78 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { - $object->setStockQuantity(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } - else { - $data->{'stockStatusId'} = null; - } if (null !== $object->getStockQuantity()) { $data->{'stockQuantity'} = $object->getStockQuantity(); } - else { - $data->{'stockQuantity'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index cf57ea17..a5911ec7 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { $object->setStockLocationId($data->{'stockLocationId'}); } - elseif (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} === null) { - $object->setStockLocationId(null); - } if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { $object->setStockStatusId($data->{'stockStatusId'}); } - elseif (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} === null) { - $object->setStockStatusId(null); - } if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { $object->setStockQuantity($data->{'stockQuantity'}); } - elseif (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} === null) { - $object->setStockQuantity(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -54,15 +45,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getStockStatusId()) { $data->{'stockStatusId'} = $object->getStockStatusId(); } - else { - $data->{'stockStatusId'} = null; - } if (null !== $object->getStockQuantity()) { $data->{'stockQuantity'} = $object->getStockQuantity(); } - else { - $data->{'stockQuantity'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php index 9cc946a4..a62b1ca2 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php index 463f5b82..6c0ff7aa 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php index 3fc0a4db..d0c24ce3 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { $object->setPricelistId($data->{'pricelistId'}); } - elseif (property_exists($data, 'pricelistId') && $data->{'pricelistId'} === null) { - $object->setPricelistId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'priceExVat') && $data->{'priceExVat'} !== null) { $object->setPriceExVat($data->{'priceExVat'}); } - elseif (property_exists($data, 'priceExVat') && $data->{'priceExVat'} === null) { - $object->setPriceExVat(null); - } if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { $object->setQuantity($data->{'quantity'}); } - elseif (property_exists($data, 'quantity') && $data->{'quantity'} === null) { - $object->setQuantity(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -66,33 +51,14 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getPricelistId()) { $data->{'pricelistId'} = $object->getPricelistId(); } - else { - $data->{'pricelistId'} = null; - } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getPriceExVat()) { $data->{'priceExVat'} = $object->getPriceExVat(); } - else { - $data->{'priceExVat'} = null; - } if (null !== $object->getQuantity()) { $data->{'quantity'} = $object->getQuantity(); } - else { - $data->{'quantity'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php index f7cc2025..1fa7f7e1 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php index d98a114d..ae6d3bb1 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php index ea809821..35544ffe 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { $object->setCountryCode($data->{'countryCode'}); } - elseif (property_exists($data, 'countryCode') && $data->{'countryCode'} === null) { - $object->setCountryCode(null); - } if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { $object->setVatRate($data->{'vatRate'}); } - elseif (property_exists($data, 'vatRate') && $data->{'vatRate'} === null) { - $object->setVatRate(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCountryCode()) { $data->{'countryCode'} = $object->getCountryCode(); } - else { - $data->{'countryCode'} = null; - } if (null !== $object->getVatRate()) { $data->{'vatRate'} = $object->getVatRate(); } - else { - $data->{'vatRate'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php index 24aa3b5f..d8fc60db 100644 --- a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { $object->setAttributeId($data->{'attributeId'}); } - elseif (property_exists($data, 'attributeId') && $data->{'attributeId'} === null) { - $object->setAttributeId(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getAttributeId()) { $data->{'attributeId'} = $object->getAttributeId(); } - else { - $data->{'attributeId'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php index e8e1e067..2306facc 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index 8d8a9439..46c3d483 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'title') && $data->{'title'} !== null) { $object->setTitle($data->{'title'}); } - elseif (property_exists($data, 'title') && $data->{'title'} === null) { - $object->setTitle(null); - } if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { $object->setShortDescription($data->{'shortDescription'}); } - elseif (property_exists($data, 'shortDescription') && $data->{'shortDescription'} === null) { - $object->setShortDescription(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php index c4c8a7a3..9d381968 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php index fae87c5b..37e0bf6d 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index 8c7affb2..c1314b4a 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } - elseif (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} === null) { - $object->setShippingMethodId(null); - } if (property_exists($data, 'active') && $data->{'active'} !== null) { $object->setActive($data->{'active'}); } - elseif (property_exists($data, 'active') && $data->{'active'} === null) { - $object->setActive(null); - } if (property_exists($data, 'validForCountries') && $data->{'validForCountries'} !== null) { $object->setValidForCountries($data->{'validForCountries'}); } - elseif (property_exists($data, 'validForCountries') && $data->{'validForCountries'} === null) { - $object->setValidForCountries(null); - } if (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} !== null) { $values = array(); foreach ($data->{'validCountriesSelected'} as $value) { @@ -53,63 +44,33 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setValidCountriesSelected($values); } - elseif (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} === null) { - $object->setValidCountriesSelected(null); - } if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); } - elseif (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} === null) { - $object->setValidForMinItemsSubtotal(null); - } if (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} !== null) { $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'}); } - elseif (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} === null) { - $object->setValidForMaxItemsSubtotal(null); - } if (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} !== null) { $object->setValidForMinWeight($data->{'validForMinWeight'}); } - elseif (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} === null) { - $object->setValidForMinWeight(null); - } if (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} !== null) { $object->setValidForMaxWeight($data->{'validForMaxWeight'}); } - elseif (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} === null) { - $object->setValidForMaxWeight(null); - } if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { $object->setValidForCustomerType($data->{'validForCustomerType'}); } - elseif (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} === null) { - $object->setValidForCustomerType(null); - } if (property_exists($data, 'freeShippingMinItemsSubtotal') && $data->{'freeShippingMinItemsSubtotal'} !== null) { $object->setFreeShippingMinItemsSubtotal($data->{'freeShippingMinItemsSubtotal'}); } - elseif (property_exists($data, 'freeShippingMinItemsSubtotal') && $data->{'freeShippingMinItemsSubtotal'} === null) { - $object->setFreeShippingMinItemsSubtotal(null); - } if (property_exists($data, 'freeShippingMinWeight') && $data->{'freeShippingMinWeight'} !== null) { $object->setFreeShippingMinWeight($data->{'freeShippingMinWeight'}); } - elseif (property_exists($data, 'freeShippingMinWeight') && $data->{'freeShippingMinWeight'} === null) { - $object->setFreeShippingMinWeight(null); - } if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } - elseif (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} === null) { - $object->setIsClickAndCollect(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -118,9 +79,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php index 6aeaf66e..900124e1 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index 498548f2..253c032f 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'type') && $data->{'type'} !== null) { $object->setType($data->{'type'}); } - elseif (property_exists($data, 'type') && $data->{'type'} === null) { - $object->setType(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/ShopItemNormalizer.php b/src/Api/Generated/Normalizer/ShopItemNormalizer.php index dbfc1746..e14f69af 100644 --- a/src/Api/Generated/Normalizer/ShopItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ShopModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index e1db687e..78f03e64 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -31,27 +31,15 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { $object->setIdCode($data->{'idCode'}); } - elseif (property_exists($data, 'idCode') && $data->{'idCode'} === null) { - $object->setIdCode(null); - } if (property_exists($data, 'status') && $data->{'status'} !== null) { $object->setStatus($data->{'status'}); } - elseif (property_exists($data, 'status') && $data->{'status'} === null) { - $object->setStatus(null); - } if (property_exists($data, 'defaultLangCode') && $data->{'defaultLangCode'} !== null) { $object->setDefaultLangCode($data->{'defaultLangCode'}); } - elseif (property_exists($data, 'defaultLangCode') && $data->{'defaultLangCode'} === null) { - $object->setDefaultLangCode(null); - } if (property_exists($data, 'activeLangCodes') && $data->{'activeLangCodes'} !== null) { $values = array(); foreach ($data->{'activeLangCodes'} as $value) { @@ -59,75 +47,39 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setActiveLangCodes($values); } - elseif (property_exists($data, 'activeLangCodes') && $data->{'activeLangCodes'} === null) { - $object->setActiveLangCodes(null); - } if (property_exists($data, 'baseCurrency') && $data->{'baseCurrency'} !== null) { $object->setBaseCurrency($data->{'baseCurrency'}); } - elseif (property_exists($data, 'baseCurrency') && $data->{'baseCurrency'} === null) { - $object->setBaseCurrency(null); - } if (property_exists($data, 'defaultCustomerCountryCode') && $data->{'defaultCustomerCountryCode'} !== null) { $object->setDefaultCustomerCountryCode($data->{'defaultCustomerCountryCode'}); } - elseif (property_exists($data, 'defaultCustomerCountryCode') && $data->{'defaultCustomerCountryCode'} === null) { - $object->setDefaultCustomerCountryCode(null); - } if (property_exists($data, 'generalDefaultVatRate') && $data->{'generalDefaultVatRate'} !== null) { $object->setGeneralDefaultVatRate($data->{'generalDefaultVatRate'}); } - elseif (property_exists($data, 'generalDefaultVatRate') && $data->{'generalDefaultVatRate'} === null) { - $object->setGeneralDefaultVatRate(null); - } if (property_exists($data, 'shopCompanyName') && $data->{'shopCompanyName'} !== null) { $object->setShopCompanyName($data->{'shopCompanyName'}); } - elseif (property_exists($data, 'shopCompanyName') && $data->{'shopCompanyName'} === null) { - $object->setShopCompanyName(null); - } if (property_exists($data, 'shopAddress') && $data->{'shopAddress'} !== null) { $object->setShopAddress($data->{'shopAddress'}); } - elseif (property_exists($data, 'shopAddress') && $data->{'shopAddress'} === null) { - $object->setShopAddress(null); - } if (property_exists($data, 'shopPostalCode') && $data->{'shopPostalCode'} !== null) { $object->setShopPostalCode($data->{'shopPostalCode'}); } - elseif (property_exists($data, 'shopPostalCode') && $data->{'shopPostalCode'} === null) { - $object->setShopPostalCode(null); - } if (property_exists($data, 'shopCity') && $data->{'shopCity'} !== null) { $object->setShopCity($data->{'shopCity'}); } - elseif (property_exists($data, 'shopCity') && $data->{'shopCity'} === null) { - $object->setShopCity(null); - } if (property_exists($data, 'shopOrgNo') && $data->{'shopOrgNo'} !== null) { $object->setShopOrgNo($data->{'shopOrgNo'}); } - elseif (property_exists($data, 'shopOrgNo') && $data->{'shopOrgNo'} === null) { - $object->setShopOrgNo(null); - } if (property_exists($data, 'shopPhoneNo') && $data->{'shopPhoneNo'} !== null) { $object->setShopPhoneNo($data->{'shopPhoneNo'}); } - elseif (property_exists($data, 'shopPhoneNo') && $data->{'shopPhoneNo'} === null) { - $object->setShopPhoneNo(null); - } if (property_exists($data, 'shopVatNo') && $data->{'shopVatNo'} !== null) { $object->setShopVatNo($data->{'shopVatNo'}); } - elseif (property_exists($data, 'shopVatNo') && $data->{'shopVatNo'} === null) { - $object->setShopVatNo(null); - } if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { $object->setShopCountryCode($data->{'shopCountryCode'}); } - elseif (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} === null) { - $object->setShopCountryCode(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php index 5a7182ac..daa3f8f6 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php index 424c669b..859a9af2 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php @@ -31,15 +31,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { $object->setLangCode($data->{'langCode'}); } - elseif (property_exists($data, 'langCode') && $data->{'langCode'} === null) { - $object->setLangCode(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -48,15 +42,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getLangCode()) { $data->{'langCode'} = $object->getLangCode(); } - else { - $data->{'langCode'} = null; - } if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php index d56e2de9..b2e65abe 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php index e4e2abc0..46468f0a 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\StockLocationModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 53f862be..07e7481c 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -31,86 +31,43 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { $object->setStockLocationId($data->{'stockLocationId'}); } - elseif (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} === null) { - $object->setStockLocationId(null); - } if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } - elseif (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} === null) { - $object->setEcommerceStockLocation(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context)); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } - else { - $data->{'ecommerceStockLocation'} = null; - } if (null !== $object->getLanguages()) { $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index eb2d262d..34f292e9 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } - elseif (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} === null) { - $object->setEcommerceStockLocation(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -65,44 +50,22 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } - else { - $data->{'ecommerceStockLocation'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -110,9 +73,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index 2c57bc66..659f4481 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { $object->setExternalId($data->{'externalId'}); } - elseif (property_exists($data, 'externalId') && $data->{'externalId'} === null) { - $object->setExternalId(null); - } if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { $object->setExternalIdType($data->{'externalIdType'}); } - elseif (property_exists($data, 'externalIdType') && $data->{'externalIdType'} === null) { - $object->setExternalIdType(null); - } if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { $object->setVisibility($data->{'visibility'}); } - elseif (property_exists($data, 'visibility') && $data->{'visibility'} === null) { - $object->setVisibility(null); - } if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { $object->setSortIndex($data->{'sortIndex'}); } - elseif (property_exists($data, 'sortIndex') && $data->{'sortIndex'} === null) { - $object->setSortIndex(null); - } if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); } - elseif (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} === null) { - $object->setEcommerceStockLocation(null); - } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $values = array(); foreach ($data->{'languages'} as $value) { @@ -65,44 +50,22 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLanguages($values); } - elseif (property_exists($data, 'languages') && $data->{'languages'} === null) { - $object->setLanguages(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) { $data = new \stdClass(); - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); - } - else { - $data->{'externalId'} = null; - } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); - } - else { - $data->{'externalIdType'} = null; - } + $data->{'externalId'} = $object->getExternalId(); + $data->{'externalIdType'} = $object->getExternalIdType(); if (null !== $object->getVisibility()) { $data->{'visibility'} = $object->getVisibility(); } - else { - $data->{'visibility'} = null; - } if (null !== $object->getSortIndex()) { $data->{'sortIndex'} = $object->getSortIndex(); } - else { - $data->{'sortIndex'} = null; - } if (null !== $object->getEcommerceStockLocation()) { $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); } - else { - $data->{'ecommerceStockLocation'} = null; - } if (null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { @@ -110,9 +73,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'languages'} = $values; } - else { - $data->{'languages'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index 005a82e5..238adf13 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -31,21 +31,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'access_token') && $data->{'access_token'} !== null) { $object->setAccessToken($data->{'access_token'}); } - elseif (property_exists($data, 'access_token') && $data->{'access_token'} === null) { - $object->setAccessToken(null); - } if (property_exists($data, 'scope') && $data->{'scope'} !== null) { $object->setScope($data->{'scope'}); } - elseif (property_exists($data, 'scope') && $data->{'scope'} === null) { - $object->setScope(null); - } if (property_exists($data, 'expires_in') && $data->{'expires_in'} !== null) { $object->setExpiresIn($data->{'expires_in'}); } - elseif (property_exists($data, 'expires_in') && $data->{'expires_in'} === null) { - $object->setExpiresIn(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) diff --git a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php index 5c6d25bd..e895f209 100644 --- a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php index 7aad1336..7075fdbd 100644 --- a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\VatRateModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php index c80a939d..0c281ac5 100644 --- a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { $object->setCountryCode($data->{'countryCode'}); } - elseif (property_exists($data, 'countryCode') && $data->{'countryCode'} === null) { - $object->setCountryCode(null); - } if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { $object->setDefaultVatRate($data->{'defaultVatRate'}); } - elseif (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} === null) { - $object->setDefaultVatRate(null); - } if (property_exists($data, 'fixedOrderPaymentVatRate') && $data->{'fixedOrderPaymentVatRate'} !== null) { $object->setFixedOrderPaymentVatRate($data->{'fixedOrderPaymentVatRate'}); } - elseif (property_exists($data, 'fixedOrderPaymentVatRate') && $data->{'fixedOrderPaymentVatRate'} === null) { - $object->setFixedOrderPaymentVatRate(null); - } if (property_exists($data, 'fixedOrderShippingVatRate') && $data->{'fixedOrderShippingVatRate'} !== null) { $object->setFixedOrderShippingVatRate($data->{'fixedOrderShippingVatRate'}); } - elseif (property_exists($data, 'fixedOrderShippingVatRate') && $data->{'fixedOrderShippingVatRate'} === null) { - $object->setFixedOrderShippingVatRate(null); - } if (property_exists($data, 'fixedOrderDiscountVatRate') && $data->{'fixedOrderDiscountVatRate'} !== null) { $object->setFixedOrderDiscountVatRate($data->{'fixedOrderDiscountVatRate'}); } - elseif (property_exists($data, 'fixedOrderDiscountVatRate') && $data->{'fixedOrderDiscountVatRate'} === null) { - $object->setFixedOrderDiscountVatRate(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -66,33 +51,18 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getCountryCode()) { $data->{'countryCode'} = $object->getCountryCode(); } - else { - $data->{'countryCode'} = null; - } if (null !== $object->getDefaultVatRate()) { $data->{'defaultVatRate'} = $object->getDefaultVatRate(); } - else { - $data->{'defaultVatRate'} = null; - } if (null !== $object->getFixedOrderPaymentVatRate()) { $data->{'fixedOrderPaymentVatRate'} = $object->getFixedOrderPaymentVatRate(); } - else { - $data->{'fixedOrderPaymentVatRate'} = null; - } if (null !== $object->getFixedOrderShippingVatRate()) { $data->{'fixedOrderShippingVatRate'} = $object->getFixedOrderShippingVatRate(); } - else { - $data->{'fixedOrderShippingVatRate'} = null; - } if (null !== $object->getFixedOrderDiscountVatRate()) { $data->{'fixedOrderDiscountVatRate'} = $object->getFixedOrderDiscountVatRate(); } - else { - $data->{'fixedOrderDiscountVatRate'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php index 271253d5..58b682b0 100644 --- a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php @@ -35,9 +35,6 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setData($values); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -50,9 +47,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'data'} = $values; } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php index f918c3b2..92858f8e 100644 --- a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php @@ -31,9 +31,6 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'data') && $data->{'data'} !== null) { $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\WebHookModel', 'json', $context)); } - elseif (property_exists($data, 'data') && $data->{'data'} === null) { - $object->setData(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -42,9 +39,6 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getData()) { $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); } - else { - $data->{'data'} = null; - } return $data; } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index c4c4f86a..4d56120d 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -31,33 +31,18 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'webHookId') && $data->{'webHookId'} !== null) { $object->setWebHookId($data->{'webHookId'}); } - elseif (property_exists($data, 'webHookId') && $data->{'webHookId'} === null) { - $object->setWebHookId(null); - } if (property_exists($data, 'name') && $data->{'name'} !== null) { $object->setName($data->{'name'}); } - elseif (property_exists($data, 'name') && $data->{'name'} === null) { - $object->setName(null); - } if (property_exists($data, 'event') && $data->{'event'} !== null) { $object->setEvent($data->{'event'}); } - elseif (property_exists($data, 'event') && $data->{'event'} === null) { - $object->setEvent(null); - } if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { $object->setStatusId($data->{'statusId'}); } - elseif (property_exists($data, 'statusId') && $data->{'statusId'} === null) { - $object->setStatusId(null); - } if (property_exists($data, 'url') && $data->{'url'} !== null) { $object->setUrl($data->{'url'}); } - elseif (property_exists($data, 'url') && $data->{'url'} === null) { - $object->setUrl(null); - } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -66,27 +51,13 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getName()) { $data->{'name'} = $object->getName(); } - else { - $data->{'name'} = null; - } if (null !== $object->getEvent()) { $data->{'event'} = $object->getEvent(); } - else { - $data->{'event'} = null; - } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); - } - else { - $data->{'statusId'} = null; - } + $data->{'statusId'} = $object->getStatusId(); if (null !== $object->getUrl()) { $data->{'url'} = $object->getUrl(); } - else { - $data->{'url'} = null; - } return $data; } } \ No newline at end of file From 0fb55d3a8a97ad26012dbeff5838dd0e3a1ae9be Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 25 Sep 2020 15:04:28 +0200 Subject: [PATCH 68/87] adds support to recognize request limit error to the error plugin and sleep in incremental steps until the limit is released again --- src/HttpClient/Plugin/ErrorPlugin.php | 32 ++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/HttpClient/Plugin/ErrorPlugin.php b/src/HttpClient/Plugin/ErrorPlugin.php index dd1ca068..e58eac6d 100644 --- a/src/HttpClient/Plugin/ErrorPlugin.php +++ b/src/HttpClient/Plugin/ErrorPlugin.php @@ -42,6 +42,8 @@ */ final class ErrorPlugin implements Plugin { + private const SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_LIMIT_ERROR = 5; + /** * {@inheritdoc} */ @@ -49,8 +51,8 @@ public function handleRequest(RequestInterface $request, callable $next, callabl { $promise = $next($request); - return $promise->then(function (ResponseInterface $response) use ($request) { - return $this->transformResponseToException($request, $response); + return $promise->then(function (ResponseInterface $response) use ($request, $first) { + return $this->transformResponseToException($request, $response, $first); }); } @@ -65,12 +67,23 @@ public function handleRequest(RequestInterface $request, callable $next, callabl * * @return ResponseInterface If status code is not in 4xx or 5xx return response */ - protected function transformResponseToException(RequestInterface $request, ResponseInterface $response) - { + protected function transformResponseToException( + RequestInterface $request, + ResponseInterface $response, + callable $first + ) { if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { $content = \json_decode($response->getBody()->__toString(), true); - throw new ClientErrorException($content['error_description'], $request, $response); + if ($this->isMaxRequestsLimitResponse($content)) { + + // Starweb Shop API SDKs limit is 1000 requests per minute, so we sleep in incremental + // steps of seconds before we restart the request processing chain + sleep(self::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_LIMIT_ERROR); + $first($request); + } else { + throw new ClientErrorException($content['error_description'], $request, $response); + } } if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { @@ -79,4 +92,13 @@ protected function transformResponseToException(RequestInterface $request, Respo return $response; } + + private function isMaxRequestsLimitResponse(array $content): bool + { + if (!array_key_exists('error', $content)) { + return false; + } + + return $content['error'] === 'Too Many Requests'; + } } From 4838d7a5c496eccb895dc097207433909b7222bd Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Fri, 25 Sep 2020 15:22:07 +0200 Subject: [PATCH 69/87] refactor by renaming constant --- src/HttpClient/Plugin/ErrorPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HttpClient/Plugin/ErrorPlugin.php b/src/HttpClient/Plugin/ErrorPlugin.php index e58eac6d..4a604b8b 100644 --- a/src/HttpClient/Plugin/ErrorPlugin.php +++ b/src/HttpClient/Plugin/ErrorPlugin.php @@ -42,7 +42,7 @@ */ final class ErrorPlugin implements Plugin { - private const SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_LIMIT_ERROR = 5; + private const SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR = 5; /** * {@inheritdoc} @@ -79,7 +79,7 @@ protected function transformResponseToException( // Starweb Shop API SDKs limit is 1000 requests per minute, so we sleep in incremental // steps of seconds before we restart the request processing chain - sleep(self::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_LIMIT_ERROR); + sleep(self::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR); $first($request); } else { throw new ClientErrorException($content['error_description'], $request, $response); From 0c5be2fdab4d9c97c760e5642340da7a0ff63c0a Mon Sep 17 00:00:00 2001 From: Timkolm Date: Wed, 14 Apr 2021 10:48:45 +0200 Subject: [PATCH 70/87] Add external id and type to order --- resources/specification/openapi.json | 20 +++++++ src/Api/Generated/Model/OrderModel.php | 54 +++++++++++++++++++ src/Api/Generated/Model/OrderUpdateModel.php | 54 +++++++++++++++++++ .../Normalizer/OrderModelNormalizer.php | 12 +++++ .../Normalizer/OrderUpdateModelNormalizer.php | 12 +++++ 5 files changed, 152 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 9ae4efdc..9b102b3c 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -8771,6 +8771,16 @@ "type": "string", "description": "Custom customer info at the point of order creation" }, + "externalId": { + "type": "string", + "description": "An ID for this order at some other external service f.ex. Specter", + "example": "ABC-123" + }, + "externalIdType": { + "type": "string", + "description": "Name of the external service the externalId belongs to", + "example": "Specter" + }, "items": { "$ref": "#\/components\/schemas\/OrderItemModelCollection" }, @@ -9341,6 +9351,16 @@ "type": "string", "description": "Custom customer info at the point of order creation" }, + "externalId": { + "type": "string", + "description": "An ID for this order at some other external service f.ex. Specter", + "example": "ABC-123" + }, + "externalIdType": { + "type": "string", + "description": "Name of the external service the externalId belongs to", + "example": "Specter" + }, "items": { "type": "array", "description": "A collection of order items", diff --git a/src/Api/Generated/Model/OrderModel.php b/src/Api/Generated/Model/OrderModel.php index f3fa3a98..d132d5ee 100644 --- a/src/Api/Generated/Model/OrderModel.php +++ b/src/Api/Generated/Model/OrderModel.php @@ -304,6 +304,18 @@ class OrderModel * @var string|null */ protected $originalCustomerCustomInfo2; + /** + * An ID for this order at some other external service f.ex. Specter + * + * @var string|null + */ + protected $externalId; + /** + * Name of the external service the externalId belongs to + * + * @var string|null + */ + protected $externalIdType; /** * * @@ -1384,6 +1396,48 @@ public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomIn $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; } + /** + * An ID for this order at some other external service f.ex. Specter + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * An ID for this order at some other external service f.ex. Specter + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Name of the external service the externalId belongs to + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * Name of the external service the externalId belongs to + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * * diff --git a/src/Api/Generated/Model/OrderUpdateModel.php b/src/Api/Generated/Model/OrderUpdateModel.php index 28b15f9b..e1564874 100644 --- a/src/Api/Generated/Model/OrderUpdateModel.php +++ b/src/Api/Generated/Model/OrderUpdateModel.php @@ -298,6 +298,18 @@ class OrderUpdateModel * @var string|null */ protected $originalCustomerCustomInfo2; + /** + * An ID for this order at some other external service f.ex. Specter + * + * @var string|null + */ + protected $externalId; + /** + * Name of the external service the externalId belongs to + * + * @var string|null + */ + protected $externalIdType; /** * A collection of order items * @@ -1339,6 +1351,48 @@ public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomIn $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; } + /** + * An ID for this order at some other external service f.ex. Specter + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * An ID for this order at some other external service f.ex. Specter + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } + /** + * Name of the external service the externalId belongs to + * + * @return string|null + */ + public function getExternalIdType() : ?string + { + return $this->externalIdType; + } + /** + * Name of the external service the externalId belongs to + * + * @param string|null $externalIdType + * + * @return self + */ + public function setExternalIdType(?string $externalIdType) : self + { + $this->externalIdType = $externalIdType; + return $this; + } /** * A collection of order items * diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 3d0d6f2a..4519a72d 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -178,6 +178,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'items') && $data->{'items'} !== null) { $object->setItems($this->denormalizer->denormalize($data->{'items'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json', $context)); } @@ -306,6 +312,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getItems()) { $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context); } diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index e5992ab8..90feda22 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -175,6 +175,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); } + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } + if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { + $object->setExternalIdType($data->{'externalIdType'}); + } if (property_exists($data, 'items') && $data->{'items'} !== null) { $values = array(); foreach ($data->{'items'} as $value) { @@ -295,6 +301,12 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getOriginalCustomerCustomInfo2()) { $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); } + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } if (null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { From c0f37b420d72bc24036c95d2155f948b06263270 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Thu, 6 May 2021 10:19:13 +0200 Subject: [PATCH 71/87] Add externalId to shipping and payment methods of order --- resources/specification/openapi.json | 12 +++++ src/Api/Generated/Model/OrderModel.php | 54 +++++++++++++++++++ .../Normalizer/OrderModelNormalizer.php | 6 +++ 3 files changed, 72 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 9ae4efdc..686ac663 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -8511,6 +8511,18 @@ "example": "2019-11-28T13:38:17+01:00", "readOnly": true }, + "paymentMethodExternalId": { + "type": "string", + "description": "An external id of the payment method", + "example": "Some-external-id", + "readOnly": true + }, + "shippingMethodExternalId": { + "type": "string", + "description": "An external id of the shipping method", + "example": "Some-external-id", + "readOnly": true + }, "baseCurrencyCode": { "type": "string", "description": "The shops base currency code at the point of order creation", diff --git a/src/Api/Generated/Model/OrderModel.php b/src/Api/Generated/Model/OrderModel.php index f3fa3a98..cea9bfff 100644 --- a/src/Api/Generated/Model/OrderModel.php +++ b/src/Api/Generated/Model/OrderModel.php @@ -16,6 +16,18 @@ class OrderModel * @var string|null */ protected $modifiedAt; + /** + * An external id of the payment method + * + * @var string|null + */ + protected $paymentMethodExternalId; + /** + * An external id of the shipping method + * + * @var string|null + */ + protected $shippingMethodExternalId; /** * The shops base currency code at the point of order creation * @@ -376,6 +388,48 @@ public function setModifiedAt(?string $modifiedAt) : self $this->modifiedAt = $modifiedAt; return $this; } + /** + * An external id of the payment method + * + * @return string|null + */ + public function getPaymentMethodExternalId() : ?string + { + return $this->paymentMethodExternalId; + } + /** + * An external id of the payment method + * + * @param string|null $paymentMethodExternalId + * + * @return self + */ + public function setPaymentMethodExternalId(?string $paymentMethodExternalId) : self + { + $this->paymentMethodExternalId = $paymentMethodExternalId; + return $this; + } + /** + * An external id of the shipping method + * + * @return string|null + */ + public function getShippingMethodExternalId() : ?string + { + return $this->shippingMethodExternalId; + } + /** + * An external id of the shipping method + * + * @param string|null $shippingMethodExternalId + * + * @return self + */ + public function setShippingMethodExternalId(?string $shippingMethodExternalId) : self + { + $this->shippingMethodExternalId = $shippingMethodExternalId; + return $this; + } /** * The shops base currency code at the point of order creation * diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 3d0d6f2a..7cbab6aa 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -34,6 +34,12 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { $object->setModifiedAt($data->{'modifiedAt'}); } + if (property_exists($data, 'paymentMethodExternalId') && $data->{'paymentMethodExternalId'} !== null) { + $object->setPaymentMethodExternalId($data->{'paymentMethodExternalId'}); + } + if (property_exists($data, 'shippingMethodExternalId') && $data->{'shippingMethodExternalId'} !== null) { + $object->setShippingMethodExternalId($data->{'shippingMethodExternalId'}); + } if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); } From f3cf1b22a1b940efa14458b171fe01503c925279 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Wed, 19 May 2021 09:52:08 +0200 Subject: [PATCH 72/87] Add externalId fir shipping and payment methods --- resources/specification/openapi.json | 14 ++++++++++ .../Generated/Model/PaymentMethodModel.php | 27 +++++++++++++++++++ .../Generated/Model/ShippingMethodModel.php | 27 +++++++++++++++++++ .../PaymentMethodModelNormalizer.php | 3 +++ .../ShippingMethodModelNormalizer.php | 3 +++ 5 files changed, 74 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 1149d01c..78615205 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -10407,6 +10407,13 @@ "example": false, "description": "Tells whether this method is a \"click and collect\" or not" }, + "externalId": { + "type": "string", + "readOnly": true, + "nullable": true, + "example": "ABC123", + "description": "External id for systems like Specter, Fortnox etc" + }, "languages": { "$ref": "#\/components\/schemas\/PaymentMethodLanguageModelCollection" } @@ -10574,6 +10581,13 @@ "example": false, "description": "Tells whether this method is a \"click and collect\" or not" }, + "externalId": { + "type": "string", + "readOnly": true, + "nullable": true, + "example": "ABC123", + "description": "External id for systems like Specter, Fortnox etc" + }, "languages": { "$ref": "#\/components\/schemas\/ShippingMethodLanguageModelCollection" } diff --git a/src/Api/Generated/Model/PaymentMethodModel.php b/src/Api/Generated/Model/PaymentMethodModel.php index fa2da686..70363de5 100644 --- a/src/Api/Generated/Model/PaymentMethodModel.php +++ b/src/Api/Generated/Model/PaymentMethodModel.php @@ -82,6 +82,12 @@ class PaymentMethodModel * @var bool|null */ protected $isClickAndCollect; + /** + * External id for systems like Specter, Fortnox etc + * + * @var string|null + */ + protected $externalId; /** * * @@ -361,6 +367,27 @@ public function setIsClickAndCollect(?bool $isClickAndCollect) : self $this->isClickAndCollect = $isClickAndCollect; return $this; } + /** + * External id for systems like Specter, Fortnox etc + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * External id for systems like Specter, Fortnox etc + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * * diff --git a/src/Api/Generated/Model/ShippingMethodModel.php b/src/Api/Generated/Model/ShippingMethodModel.php index 4c1724e7..0fe3e51d 100644 --- a/src/Api/Generated/Model/ShippingMethodModel.php +++ b/src/Api/Generated/Model/ShippingMethodModel.php @@ -76,6 +76,12 @@ class ShippingMethodModel * @var bool|null */ protected $isClickAndCollect; + /** + * External id for systems like Specter, Fortnox etc + * + * @var string|null + */ + protected $externalId; /** * * @@ -334,6 +340,27 @@ public function setIsClickAndCollect(?bool $isClickAndCollect) : self $this->isClickAndCollect = $isClickAndCollect; return $this; } + /** + * External id for systems like Specter, Fortnox etc + * + * @return string|null + */ + public function getExternalId() : ?string + { + return $this->externalId; + } + /** + * External id for systems like Specter, Fortnox etc + * + * @param string|null $externalId + * + * @return self + */ + public function setExternalId(?string $externalId) : self + { + $this->externalId = $externalId; + return $this; + } /** * * diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index efe7bb6c..75990612 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -71,6 +71,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection', 'json', $context)); } diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index c1314b4a..099af4d2 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -68,6 +68,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { $object->setIsClickAndCollect($data->{'isClickAndCollect'}); } + if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { + $object->setExternalId($data->{'externalId'}); + } if (property_exists($data, 'languages') && $data->{'languages'} !== null) { $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection', 'json', $context)); } From 2fae0280e88fb3745d9080427d1cf46ab8acbd53 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Thu, 7 Oct 2021 11:01:45 +0200 Subject: [PATCH 73/87] Fix a specific jane-php version The newer versions will change the api requests and make it incompatible with SWS --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 10ca09a9..56144ced 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "symfony/property-info": "^4.1", "symfony/options-resolver": "^4.1", "psr/simple-cache": "^1.0", - "jane-php/jane-php": "^5.2", + "jane-php/jane-php": "5.2.2", "symfony/translation-contracts": "^2.2" }, "require-dev": { From 47d6f7985711a539a83705d24ff7ce8645672dcc Mon Sep 17 00:00:00 2001 From: Timkolm Date: Thu, 7 Oct 2021 11:02:23 +0200 Subject: [PATCH 74/87] Add agent to OrderExternaServiceModel --- resources/specification/openapi.json | 4 +++ .../Model/OrderExternalServiceModel.php | 27 +++++++++++++++++++ .../OrderExternalServiceModelNormalizer.php | 6 +++++ 3 files changed, 37 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 78615205..c7847cb2 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -9750,6 +9750,10 @@ "description": "The external id", "example": "ABC123" }, + "agent": { + "type": "string", + "description": "Agent id for nShift agent if applicable" + }, "readOnly": { "type": "boolean", "description": "Some external services cannot be updated and they have readOnly set to true", diff --git a/src/Api/Generated/Model/OrderExternalServiceModel.php b/src/Api/Generated/Model/OrderExternalServiceModel.php index cfd9f5d5..19930418 100644 --- a/src/Api/Generated/Model/OrderExternalServiceModel.php +++ b/src/Api/Generated/Model/OrderExternalServiceModel.php @@ -16,6 +16,12 @@ class OrderExternalServiceModel * @var string|null */ protected $externalIdValue; + /** + * Agent id for nShift agent if applicable + * + * @var string|null + */ + protected $agent; /** * Some external services cannot be updated and they have readOnly set to true * @@ -64,6 +70,27 @@ public function setExternalIdValue(?string $externalIdValue) : self $this->externalIdValue = $externalIdValue; return $this; } + /** + * Agent id for nShift agent if applicable + * + * @return string|null + */ + public function getAgent() : ?string + { + return $this->agent; + } + /** + * Agent id for nShift agent if applicable + * + * @param string|null $agent + * + * @return self + */ + public function setAgent(?string $agent) : self + { + $this->agent = $agent; + return $this; + } /** * Some external services cannot be updated and they have readOnly set to true * diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index de2d1470..56b36bc0 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -34,6 +34,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { $object->setExternalIdValue($data->{'externalIdValue'}); } + if (property_exists($data, 'agent') && $data->{'agent'} !== null) { + $object->setAgent($data->{'agent'}); + } if (property_exists($data, 'readOnly') && $data->{'readOnly'} !== null) { $object->setReadOnly($data->{'readOnly'}); } @@ -48,6 +51,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getExternalIdValue()) { $data->{'externalIdValue'} = $object->getExternalIdValue(); } + if (null !== $object->getAgent()) { + $data->{'agent'} = $object->getAgent(); + } return $data; } } \ No newline at end of file From c48df0ed4a85fbbc897aa41d3438f2d828861b0d Mon Sep 17 00:00:00 2001 From: Timkolm Date: Thu, 28 Oct 2021 15:19:56 +0200 Subject: [PATCH 75/87] Make variant patch object not nullable --- resources/specification/openapi.json | 31 +++--------- .../Model/ProductVariantPatchRequestModel.php | 4 +- ...ductVariantPatchRequestModelNormalizer.php | 50 ++++++++++++------- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index c7847cb2..bcf0d166 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12231,37 +12231,29 @@ "externalId": { "type": "string", "maxLength": 40, - "default": "", "example": "101", - "description": "The external id of this pricelist", - "nullable": true + "description": "The external id of this pricelist" }, "externalIdType": { "type": "string", "description": "The system name the externalId belongs to.", "maxLength": 20, - "example": "ERP system", - "nullable": true + "example": "ERP system" }, "isActive": { "type": "boolean", - "default": true, - "description": "Is this variant active? Only active variants are visible to customers", - "nullable": true + "description": "Is this variant active? Only active variants are visible to customers" }, "sortIndex": { "type": "integer", - "description": "The sort index of this variant.", - "nullable": true + "description": "The sort index of this variant." }, "stockStatusId": { "type": "integer", - "nullable": true, "description": "The ID of the variants stock status. Available stock statuses can be fetched using the \/product-stock-statuses endpoint" }, "stockQuantity": { "type": "integer", - "nullable": true, "maximum": 100000000, "minimum": -100000000, "description": "The current stock quantity for this variant" @@ -12269,7 +12261,6 @@ "weightInKg": { "type": "number", "format": "float", - "nullable": true, "minimum": 0, "description": "The variants weight in KG", "example": 0.15 @@ -12277,24 +12268,20 @@ "costPrice": { "type": "string", "minimum": 0, - "nullable": true, "description": "The cost for this variant. Used for statistic and never displayed to customers" }, "ean": { "type": "string", "maxLength": 20, - "description": "European article no", - "nullable": true + "description": "European article no" }, "mpn": { "type": "string", "maxLength": 40, - "description": "Manufacturer part no", - "nullable": true + "description": "Manufacturer part no" }, "imageFileId": { "type": "integer", - "nullable": true, "description": "The ID of this variant main image. Available media files can be fetched using the \/media-files endpoint" }, "attributeValueLinks": { @@ -12304,8 +12291,7 @@ "type": "integer", "minimum": 1, "description": "The ID of the attribute value" - }, - "nullable": true + } }, "volumePricingInheritancePricelistIds": { "type": "array", @@ -12314,8 +12300,7 @@ "type": "integer", "minimum": 1, "description": "The ID of the attribute value" - }, - "nullable": true + } } } }, diff --git a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php index 2e73d795..ca73f6b2 100644 --- a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php @@ -15,7 +15,7 @@ class ProductVariantPatchRequestModel * * @var string|null */ - protected $externalId = ''; + protected $externalId; /** * The system name the externalId belongs to. * @@ -27,7 +27,7 @@ class ProductVariantPatchRequestModel * * @var bool|null */ - protected $isActive = true; + protected $isActive; /** * The sort index of this variant. * diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php index 50fd6aab..7930c7ef 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -86,17 +86,39 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSku()) { $data->{'sku'} = $object->getSku(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); + if (null !== $object->getExternalId()) { + $data->{'externalId'} = $object->getExternalId(); + } + if (null !== $object->getExternalIdType()) { + $data->{'externalIdType'} = $object->getExternalIdType(); + } + if (null !== $object->getIsActive()) { + $data->{'isActive'} = $object->getIsActive(); + } + if (null !== $object->getSortIndex()) { + $data->{'sortIndex'} = $object->getSortIndex(); + } + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + if (null !== $object->getStockQuantity()) { + $data->{'stockQuantity'} = $object->getStockQuantity(); + } + if (null !== $object->getWeightInKg()) { + $data->{'weightInKg'} = $object->getWeightInKg(); + } + if (null !== $object->getCostPrice()) { + $data->{'costPrice'} = $object->getCostPrice(); + } + if (null !== $object->getEan()) { + $data->{'ean'} = $object->getEan(); + } + if (null !== $object->getMpn()) { + $data->{'mpn'} = $object->getMpn(); + } + if (null !== $object->getImageFileId()) { + $data->{'imageFileId'} = $object->getImageFileId(); + } if (null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { @@ -104,9 +126,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'attributeValueLinks'} = $values; } - else { - $data->{'attributeValueLinks'} = null; - } if (null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { @@ -114,9 +133,6 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'volumePricingInheritancePricelistIds'} = $values_1; } - else { - $data->{'volumePricingInheritancePricelistIds'} = null; - } return $data; } } \ No newline at end of file From e781de366f0c59489c893a794593712417809e15 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Wed, 19 Jan 2022 13:28:33 +0100 Subject: [PATCH 76/87] Add stockLocationId to Order model --- resources/specification/openapi.json | 5 ++++ src/Api/Generated/Model/OrderModel.php | 27 +++++++++++++++++++ .../Normalizer/OrderModelNormalizer.php | 6 +++++ 3 files changed, 38 insertions(+) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index bcf0d166..db499df3 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -8606,6 +8606,11 @@ "example": false, "default": true }, + "stockLocationId": { + "type": "integer", + "description": "Id of stock location this order was made for", + "example": 1 + }, "shippingMethodId": { "type": "integer", "description": "The ID of the orders shipping method", diff --git a/src/Api/Generated/Model/OrderModel.php b/src/Api/Generated/Model/OrderModel.php index ff5688fb..2f0031fc 100644 --- a/src/Api/Generated/Model/OrderModel.php +++ b/src/Api/Generated/Model/OrderModel.php @@ -112,6 +112,12 @@ class OrderModel * @var bool|null */ protected $sendEmailsOnStatusChange = true; + /** + * Id of stock location this order was made for + * + * @var int|null + */ + protected $stockLocationId; /** * The ID of the orders shipping method * @@ -736,6 +742,27 @@ public function setSendEmailsOnStatusChange(?bool $sendEmailsOnStatusChange) : s $this->sendEmailsOnStatusChange = $sendEmailsOnStatusChange; return $this; } + /** + * Id of stock location this order was made for + * + * @return int|null + */ + public function getStockLocationId() : ?int + { + return $this->stockLocationId; + } + /** + * Id of stock location this order was made for + * + * @param int|null $stockLocationId + * + * @return self + */ + public function setStockLocationId(?int $stockLocationId) : self + { + $this->stockLocationId = $stockLocationId; + return $this; + } /** * The ID of the orders shipping method * diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index 1787d597..ad1cfbc0 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -82,6 +82,9 @@ public function denormalize($data, $class, $format = null, array $context = arra if (property_exists($data, 'sendEmailsOnStatusChange') && $data->{'sendEmailsOnStatusChange'} !== null) { $object->setSendEmailsOnStatusChange($data->{'sendEmailsOnStatusChange'}); } + if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { + $object->setStockLocationId($data->{'stockLocationId'}); + } if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { $object->setShippingMethodId($data->{'shippingMethodId'}); } @@ -228,6 +231,9 @@ public function normalize($object, $format = null, array $context = array()) if (null !== $object->getSendEmailsOnStatusChange()) { $data->{'sendEmailsOnStatusChange'} = $object->getSendEmailsOnStatusChange(); } + if (null !== $object->getStockLocationId()) { + $data->{'stockLocationId'} = $object->getStockLocationId(); + } if (null !== $object->getShippingMethodId()) { $data->{'shippingMethodId'} = $object->getShippingMethodId(); } From ebfb2952b469188b8b9af8473621540211466539 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Mon, 28 Feb 2022 13:11:10 +0100 Subject: [PATCH 77/87] Use collection instead of array for volumePrices value --- resources/specification/openapi.json | 6 +----- .../Generated/Model/ProductVariantPriceModel.php | 16 ++++++++-------- .../ProductVariantPriceModelNormalizer.php | 12 ++---------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index db499df3..6006adb0 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -12909,11 +12909,7 @@ "description": "The special price excluding vat (a discounted price)" }, "volumePrices": { - "type": "array", - "description": "A collection of volume prices", - "items": { - "$ref": "#\/components\/schemas\/ProductVariantVolumePriceModel" - } + "$ref": "#\/components\/schemas\/ProductVariantVolumePriceModelCollection" } }, "required": [ diff --git a/src/Api/Generated/Model/ProductVariantPriceModel.php b/src/Api/Generated/Model/ProductVariantPriceModel.php index 1f268fb8..84c4a855 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModel.php +++ b/src/Api/Generated/Model/ProductVariantPriceModel.php @@ -35,9 +35,9 @@ class ProductVariantPriceModel */ protected $specialPriceExVat; /** - * A collection of volume prices + * * - * @var ProductVariantVolumePriceModel[]|null + * @var ProductVariantVolumePriceModelCollection|null */ protected $volumePrices; /** @@ -146,22 +146,22 @@ public function setSpecialPriceExVat(?float $specialPriceExVat) : self return $this; } /** - * A collection of volume prices + * * - * @return ProductVariantVolumePriceModel[]|null + * @return ProductVariantVolumePriceModelCollection|null */ - public function getVolumePrices() : ?array + public function getVolumePrices() : ?ProductVariantVolumePriceModelCollection { return $this->volumePrices; } /** - * A collection of volume prices + * * - * @param ProductVariantVolumePriceModel[]|null $volumePrices + * @param ProductVariantVolumePriceModelCollection|null $volumePrices * * @return self */ - public function setVolumePrices(?array $volumePrices) : self + public function setVolumePrices(?ProductVariantVolumePriceModelCollection $volumePrices) : self { $this->volumePrices = $volumePrices; return $this; diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index 792875d2..ec56a0d4 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -44,11 +44,7 @@ public function denormalize($data, $class, $format = null, array $context = arra $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); } if (property_exists($data, 'volumePrices') && $data->{'volumePrices'} !== null) { - $values = array(); - foreach ($data->{'volumePrices'} as $value) { - $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context); - } - $object->setVolumePrices($values); + $object->setVolumePrices($this->denormalizer->denormalize($data->{'volumePrices'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection', 'json', $context)); } return $object; } @@ -65,11 +61,7 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); if (null !== $object->getVolumePrices()) { - $values = array(); - foreach ($object->getVolumePrices() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data->{'volumePrices'} = $values; + $data->{'volumePrices'} = $this->normalizer->normalize($object->getVolumePrices(), 'json', $context); } return $data; } From 6bbc379cd66757e614958e67659491d7117d495c Mon Sep 17 00:00:00 2001 From: Timkolm Date: Thu, 16 Mar 2023 17:05:48 +0100 Subject: [PATCH 78/87] Fix if empty contents --- src/HttpClient/Plugin/ErrorPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpClient/Plugin/ErrorPlugin.php b/src/HttpClient/Plugin/ErrorPlugin.php index 4a604b8b..d904e3c4 100644 --- a/src/HttpClient/Plugin/ErrorPlugin.php +++ b/src/HttpClient/Plugin/ErrorPlugin.php @@ -75,7 +75,7 @@ protected function transformResponseToException( if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { $content = \json_decode($response->getBody()->__toString(), true); - if ($this->isMaxRequestsLimitResponse($content)) { + if (is_array($content) && $this->isMaxRequestsLimitResponse($content)) { // Starweb Shop API SDKs limit is 1000 requests per minute, so we sleep in incremental // steps of seconds before we restart the request processing chain From 902ce84ad992e3979dc99f805c9394fd30e2abb5 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Fri, 17 Mar 2023 08:49:03 +0100 Subject: [PATCH 79/87] Make more error protection and throw more info --- src/Api/Authentication/TokenManager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Api/Authentication/TokenManager.php b/src/Api/Authentication/TokenManager.php index 6b4ee361..9921efcb 100644 --- a/src/Api/Authentication/TokenManager.php +++ b/src/Api/Authentication/TokenManager.php @@ -2,6 +2,7 @@ namespace Starweb\Api\Authentication; +use Http\Client\Common\Exception\ClientErrorException; use Http\Client\Common\Exception\ServerErrorException; use Http\Client\HttpClient; use Http\Message\MessageFactory; @@ -72,7 +73,12 @@ public function requestToken(): TokenInterface $response = $this->client->sendRequest($request); - $responseData = json_decode($response->getBody()->__toString(), true); + $responseJson = $response->getBody()->__toString(); + $responseData = json_decode($responseJson, true); + if (!is_array($responseData)) { + $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; + throw new ClientErrorException($errorMessage, $request, $response); + } if (404 === $response->getStatusCode()) { throw new InvalidBaseUriException(sprintf('invalid base uri "%s"', $this->baseUri), $request, $response); From 35bb79f84d06fd65afaa51dac40bb23a7326cca3 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Fri, 17 Mar 2023 09:25:32 +0100 Subject: [PATCH 80/87] Update order of exceptions --- src/Api/Authentication/TokenManager.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Api/Authentication/TokenManager.php b/src/Api/Authentication/TokenManager.php index 9921efcb..be83707d 100644 --- a/src/Api/Authentication/TokenManager.php +++ b/src/Api/Authentication/TokenManager.php @@ -75,10 +75,6 @@ public function requestToken(): TokenInterface $responseJson = $response->getBody()->__toString(); $responseData = json_decode($responseJson, true); - if (!is_array($responseData)) { - $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; - throw new ClientErrorException($errorMessage, $request, $response); - } if (404 === $response->getStatusCode()) { throw new InvalidBaseUriException(sprintf('invalid base uri "%s"', $this->baseUri), $request, $response); @@ -88,6 +84,11 @@ public function requestToken(): TokenInterface throw new ServerErrorException('server error', $request, $response); } + if (!is_array($responseData)) { + $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; + throw new ClientErrorException($errorMessage, $request, $response); + } + if (400 === $response->getStatusCode() && $responseData['error'] === 'invalid_client') { throw new InvalidCredentialsException($responseData['error_description'], $request, $response); } From 07c85863faf33054e2b51caa4d5ba4b13626bf80 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Fri, 17 Mar 2023 10:20:58 +0100 Subject: [PATCH 81/87] Treat malformed responses --- src/HttpClient/Plugin/ErrorPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpClient/Plugin/ErrorPlugin.php b/src/HttpClient/Plugin/ErrorPlugin.php index d904e3c4..1bff9f3a 100644 --- a/src/HttpClient/Plugin/ErrorPlugin.php +++ b/src/HttpClient/Plugin/ErrorPlugin.php @@ -82,7 +82,7 @@ protected function transformResponseToException( sleep(self::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR); $first($request); } else { - throw new ClientErrorException($content['error_description'], $request, $response); + throw new ClientErrorException($content['error_description'] ?? 'Malformed resposne from server.', $request, $response); } } From d20ec3020412999196d21d9cd1ee08fd13f04909 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Fri, 17 Mar 2023 14:29:35 +0100 Subject: [PATCH 82/87] Add more response handling to the token manager --- src/Api/Authentication/TokenManager.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Api/Authentication/TokenManager.php b/src/Api/Authentication/TokenManager.php index be83707d..29873feb 100644 --- a/src/Api/Authentication/TokenManager.php +++ b/src/Api/Authentication/TokenManager.php @@ -93,6 +93,11 @@ public function requestToken(): TokenInterface throw new InvalidCredentialsException($responseData['error_description'], $request, $response); } + if (!isset($responseData['access_token'])) { + $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; + throw new ClientErrorException($errorMessage, $request, $response); + } + return new AccessToken($responseData['access_token'], $responseData['expires_in']); } From 289a83aadd4c6cabc0fd8f60604916caef9f8119 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Mon, 20 Mar 2023 07:50:44 +0100 Subject: [PATCH 83/87] Add Too many requests treatment --- src/Api/Authentication/TokenManager.php | 49 +++++++++++++++---------- src/HttpClient/Plugin/ErrorPlugin.php | 2 +- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/Api/Authentication/TokenManager.php b/src/Api/Authentication/TokenManager.php index 29873feb..b8b6f7f7 100644 --- a/src/Api/Authentication/TokenManager.php +++ b/src/Api/Authentication/TokenManager.php @@ -9,6 +9,7 @@ use Http\Message\RequestFactory; use Starweb\Exception\InvalidBaseUriException; use Starweb\Exception\InvalidCredentialsException; +use Starweb\HttpClient\Plugin\ErrorPlugin; class TokenManager { @@ -71,31 +72,41 @@ public function requestToken(): TokenInterface http_build_query($parameters) ); - $response = $this->client->sendRequest($request); + $success = false; + while (!$success) { + $response = $this->client->sendRequest($request); - $responseJson = $response->getBody()->__toString(); - $responseData = json_decode($responseJson, true); + $responseJson = $response->getBody()->__toString(); + $responseData = json_decode($responseJson, true); - if (404 === $response->getStatusCode()) { - throw new InvalidBaseUriException(sprintf('invalid base uri "%s"', $this->baseUri), $request, $response); - } + if (404 === $response->getStatusCode()) { + throw new InvalidBaseUriException(sprintf('invalid base uri "%s"', $this->baseUri), $request, $response); + } - if (500 === $response->getStatusCode()) { - throw new ServerErrorException('server error', $request, $response); - } + if (500 === $response->getStatusCode()) { + throw new ServerErrorException('server error', $request, $response); + } - if (!is_array($responseData)) { - $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; - throw new ClientErrorException($errorMessage, $request, $response); - } + if (!is_array($responseData)) { + $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; + throw new ClientErrorException($errorMessage, $request, $response); + } - if (400 === $response->getStatusCode() && $responseData['error'] === 'invalid_client') { - throw new InvalidCredentialsException($responseData['error_description'], $request, $response); - } + if (400 === $response->getStatusCode() && $responseData['error'] === 'invalid_client') { + throw new InvalidCredentialsException($responseData['error_description'], $request, $response); + } + + if (!isset($responseData['access_token'])) { + if (isset($responseData['error']) && $responseData['error'] === 'Too Many Requests') { + sleep(ErrorPlugin::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR); + continue; + } + + $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; + throw new ClientErrorException($errorMessage, $request, $response); + } - if (!isset($responseData['access_token'])) { - $errorMessage = 'Malformed response. [responseJson]: ' . $responseJson; - throw new ClientErrorException($errorMessage, $request, $response); + $success = true; } return new AccessToken($responseData['access_token'], $responseData['expires_in']); diff --git a/src/HttpClient/Plugin/ErrorPlugin.php b/src/HttpClient/Plugin/ErrorPlugin.php index 1bff9f3a..11a1067f 100644 --- a/src/HttpClient/Plugin/ErrorPlugin.php +++ b/src/HttpClient/Plugin/ErrorPlugin.php @@ -42,7 +42,7 @@ */ final class ErrorPlugin implements Plugin { - private const SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR = 5; + public const SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR = 5; /** * {@inheritdoc} From c93fabcf0823b12097771cbbe394ff94e6034cad Mon Sep 17 00:00:00 2001 From: Timkolm Date: Mon, 20 Mar 2023 07:58:10 +0100 Subject: [PATCH 84/87] Add retry counter --- src/Api/Authentication/TokenManager.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Api/Authentication/TokenManager.php b/src/Api/Authentication/TokenManager.php index b8b6f7f7..17f920e4 100644 --- a/src/Api/Authentication/TokenManager.php +++ b/src/Api/Authentication/TokenManager.php @@ -13,6 +13,8 @@ class TokenManager { + private const MAX_RETRIES = 25; + /** * @var HttpClient */ @@ -73,6 +75,8 @@ public function requestToken(): TokenInterface ); $success = false; + $tries = 1; + while (!$success) { $response = $this->client->sendRequest($request); @@ -98,7 +102,12 @@ public function requestToken(): TokenInterface if (!isset($responseData['access_token'])) { if (isset($responseData['error']) && $responseData['error'] === 'Too Many Requests') { + if ($tries > self::MAX_RETRIES) { + $errorMessage = sprintf("'Too many requests' reached %d re-tries", self::MAX_RETRIES); + throw new ClientErrorException($errorMessage, $request, $response); + } sleep(ErrorPlugin::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR); + $tries++; continue; } From 0e331d54cb2db365242a4c6e318678e5f61b14c5 Mon Sep 17 00:00:00 2001 From: Timkolm Date: Fri, 28 Apr 2023 16:42:00 +0200 Subject: [PATCH 85/87] Add patch method to stock updates --- resources/specification/openapi.json | 55 +++++++++++++++- src/Api/Generated/Client.php | 18 +++++ .../Endpoint/PatchProductVariantStock.php | 66 +++++++++++++++++++ ...ProductVariantStockBadRequestException.php | 17 +++++ ...chProductVariantStockNotFoundException.php | 17 +++++ .../ProductVariantStockPatchRequestModel.php | 61 +++++++++++++++++ .../Normalizer/NormalizerFactory.php | 1 + ...ariantStockPatchRequestModelNormalizer.php | 50 ++++++++++++++ 8 files changed, 284 insertions(+), 1 deletion(-) create mode 100644 src/Api/Generated/Endpoint/PatchProductVariantStock.php create mode 100644 src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php create mode 100644 src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php create mode 100644 src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php create mode 100644 src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php diff --git a/resources/specification/openapi.json b/resources/specification/openapi.json index 6006adb0..f894482e 100644 --- a/resources/specification/openapi.json +++ b/resources/specification/openapi.json @@ -7841,7 +7841,7 @@ }, "put": { "operationId": "putProductVariantStock", - "summary": "Update a product variant stock", + "summary": "Update or create a product variant stock", "description": "Update or set the stock for a product variant at a stock location. \n Retrieves the updated `ProductVariantStock` object", "responses": { "200": { @@ -7876,6 +7876,43 @@ "Product Variant Stocks" ] }, + "patch": { + "operationId": "patchProductVariantStock", + "summary": "Update a product variant stock", + "description": "Update the stock for a product variant at a stock location. \n Retrieves the updated `ProductVariantStock` object", + "responses": { + "200": { + "description": "The updated stock is returned", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductVariantStockModelItem" + } + } + } + }, + "400": { + "$ref": "#\/components\/responses\/BadRequest" + }, + "404": { + "$ref": "#\/components\/responses\/NotFound" + } + }, + "requestBody": { + "description": "Stock data", + "required": true, + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/ProductVariantStockPatchRequestModel" + } + } + } + }, + "tags": [ + "Product Variant Stocks" + ] + }, "parameters": [ { "name": "productId", @@ -14132,6 +14169,22 @@ "stockQuantity" ] }, + "ProductVariantStockPatchRequestModel": { + "properties": { + "stockStatusId": { + "type": "integer", + "description": "The stock status id. If you do not provide this value, the stock status will be changed according to the status settings, otherwise the status will be overriden by the new value, no further status actions will be applied. See [product stock statuses](#tag\/Product-Stock-Statuses)" + }, + "stockQuantity": { + "type": "number", + "format": "float", + "minimum": -100000000, + "maximum": 100000000, + "description": "stock quantity", + "example": 768 + } + } + }, "ProductBundleProductPriceModelItem": { "properties": { "data": { diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 5c37bfcc..4843c50d 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -2933,6 +2933,24 @@ public function getProductVariantStock(int $productId, int $variantId, int $stoc return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductVariantStock($productId, $variantId, $stockLocationId), $fetch); } /** + * Update the stock for a product variant at a stock location. + Retrieves the updated `ProductVariantStock` object + * + * @param int $productId The product id + * @param int $variantId The products variants id + * @param int $stockLocationId The stock location id + * @param \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Starweb\Api\Generated\Exception\PatchProductVariantStockBadRequestException + * @throws \Starweb\Api\Generated\Exception\PatchProductVariantStockNotFoundException + * + * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem|\Psr\Http\Message\ResponseInterface + */ + public function patchProductVariantStock(int $productId, int $variantId, int $stockLocationId, \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + { + return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductVariantStock($productId, $variantId, $stockLocationId, $requestBody), $fetch); + } + /** * Update or set the stock for a product variant at a stock location. Retrieves the updated `ProductVariantStock` object * diff --git a/src/Api/Generated/Endpoint/PatchProductVariantStock.php b/src/Api/Generated/Endpoint/PatchProductVariantStock.php new file mode 100644 index 00000000..cfa95f73 --- /dev/null +++ b/src/Api/Generated/Endpoint/PatchProductVariantStock.php @@ -0,0 +1,66 @@ +productId = $productId; + $this->variantId = $variantId; + $this->stockLocationId = $stockLocationId; + $this->body = $requestBody; + } + use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + public function getMethod() : string + { + return 'PATCH'; + } + public function getUri() : string + { + return str_replace(array('{productId}', '{variantId}', '{stockLocationId}'), array($this->productId, $this->variantId, $this->stockLocationId), '/products/{productId}/variants/{variantId}/stocks/{stockLocationId}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array + { + if ($this->body instanceof \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel) { + return array(array('Content-Type' => array('application/json')), $serializer->serialize($this->body, 'json')); + } + return array(array(), null); + } + public function getExtraHeaders() : array + { + return array('Accept' => array('application/json')); + } + /** + * {@inheritdoc} + * + * @throws \Starweb\Api\Generated\Exception\PatchProductVariantStockBadRequestException + * @throws \Starweb\Api\Generated\Exception\PatchProductVariantStockNotFoundException + * + * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem + */ + protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem', 'json'); + } + if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\PatchProductVariantStockBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { + throw new \Starweb\Api\Generated\Exception\PatchProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + } + } +} \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php b/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php new file mode 100644 index 00000000..46287dcc --- /dev/null +++ b/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php b/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php new file mode 100644 index 00000000..01895e8d --- /dev/null +++ b/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php @@ -0,0 +1,17 @@ +errorModel = $errorModel; + } + public function getErrorModel() + { + return $this->errorModel; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php new file mode 100644 index 00000000..5dca357f --- /dev/null +++ b/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php @@ -0,0 +1,61 @@ +stockStatusId; + } + /** + * The stock status id. If you do not provide this value, the stock status will be changed according to the status settings, otherwise the status will be overriden by the new value, no further status actions will be applied. See [product stock statuses](#tag/Product-Stock-Statuses) + * + * @param int|null $stockStatusId + * + * @return self + */ + public function setStockStatusId(?int $stockStatusId) : self + { + $this->stockStatusId = $stockStatusId; + return $this; + } + /** + * stock quantity + * + * @return float|null + */ + public function getStockQuantity() : ?float + { + return $this->stockQuantity; + } + /** + * stock quantity + * + * @param float|null $stockQuantity + * + * @return self + */ + public function setStockQuantity(?float $stockQuantity) : self + { + $this->stockQuantity = $stockQuantity; + return $this; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php index 9fd19e15..1d7e01c9 100644 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ b/src/Api/Generated/Normalizer/NormalizerFactory.php @@ -184,6 +184,7 @@ public static function create() $normalizers[] = new ProductVariantStockModelCollectionNormalizer(); $normalizers[] = new ProductVariantStockResponseModelNormalizer(); $normalizers[] = new ProductVariantStockPutRequestModelNormalizer(); + $normalizers[] = new ProductVariantStockPatchRequestModelNormalizer(); $normalizers[] = new ProductBundleProductPriceModelItemNormalizer(); $normalizers[] = new ProductBundleProductPriceModelCollectionNormalizer(); $normalizers[] = new ProductBundleProductPriceModelNormalizer(); diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php new file mode 100644 index 00000000..ebf02c88 --- /dev/null +++ b/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php @@ -0,0 +1,50 @@ +{'stockStatusId'} !== null) { + $object->setStockStatusId($data->{'stockStatusId'}); + } + if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { + $object->setStockQuantity($data->{'stockQuantity'}); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getStockStatusId()) { + $data->{'stockStatusId'} = $object->getStockStatusId(); + } + if (null !== $object->getStockQuantity()) { + $data->{'stockQuantity'} = $object->getStockQuantity(); + } + return $data; + } +} \ No newline at end of file From ed4e974d0049b3ef6403744a1503e88617c377aa Mon Sep 17 00:00:00 2001 From: Igor Pereginets Date: Tue, 29 Aug 2023 15:44:35 +0300 Subject: [PATCH 86/87] STA-20365 PHP 8.2 upgrade Upgrade all packages to support PHP 8.2 Regenerated all API based on OpenAPI3. Fixed tests. --- composer.json | 22 +- src/Api/Client.php | 14 +- src/Api/Generated/Client.php | 859 +++++++++--------- .../Generated/Endpoint/AddCommentToOrder.php | 22 +- .../Generated/Endpoint/AddTagToCustomer.php | 22 +- .../Generated/Endpoint/CreateAttribute.php | 22 +- src/Api/Generated/Endpoint/CreateCustomer.php | 22 +- .../Generated/Endpoint/CreateMediaFile.php | 25 +- src/Api/Generated/Endpoint/CreateOrder.php | 22 +- .../Endpoint/CreateOrderExternalService.php | 22 +- .../Generated/Endpoint/CreateOrderItem.php | 22 +- .../Generated/Endpoint/CreateOrderStatus.php | 22 +- .../Generated/Endpoint/CreatePricelist.php | 22 +- src/Api/Generated/Endpoint/CreateProduct.php | 22 +- ...eateProductBundleProductPricelistPrice.php | 22 +- .../Endpoint/CreateProductBundledProduct.php | 22 +- .../Endpoint/CreateProductCategory.php | 22 +- .../Endpoint/CreateProductManufacturer.php | 22 +- .../Endpoint/CreateProductMetaDataType.php | 22 +- .../Endpoint/CreateProductStockStatus.php | 22 +- .../Generated/Endpoint/CreateProductTag.php | 22 +- .../Endpoint/CreateProductTagLink.php | 22 +- .../Endpoint/CreateProductTagOption.php | 26 +- .../Generated/Endpoint/CreateProductUnit.php | 22 +- .../Endpoint/CreateProductVariant.php | 22 +- .../CreateProductVariantPricelistPrice.php | 24 +- ...eateProductVariantPricelistVolumePrice.php | 22 +- .../Endpoint/CreateProductVatRate.php | 22 +- .../Endpoint/CreateProductsCategoryLink.php | 22 +- .../Endpoint/CreateProductsLanguage.php | 22 +- .../Endpoint/CreateProductsMediaFileLink.php | 22 +- .../Endpoint/CreateProductsMetaData.php | 22 +- .../CreateProductsVariantsAttributeValues.php | 22 +- .../Endpoint/CreateStockLocation.php | 26 +- src/Api/Generated/Endpoint/CreateWebHook.php | 22 +- .../Generated/Endpoint/DeleteAttribute.php | 16 +- .../Endpoint/DeleteAttributeValue.php | 16 +- src/Api/Generated/Endpoint/DeleteCustomer.php | 16 +- .../Generated/Endpoint/DeleteMediaFile.php | 16 +- src/Api/Generated/Endpoint/DeleteOrder.php | 16 +- .../Generated/Endpoint/DeleteOrderAddress.php | 16 +- .../Endpoint/DeleteOrderExternalService.php | 16 +- .../Generated/Endpoint/DeleteOrderItem.php | 16 +- .../Generated/Endpoint/DeleteOrderStatus.php | 20 +- .../Generated/Endpoint/DeletePricelist.php | 20 +- src/Api/Generated/Endpoint/DeleteProduct.php | 16 +- ...teProductBundledProductsPricelistPrice.php | 16 +- .../Endpoint/DeleteProductCategory.php | 16 +- .../Endpoint/DeleteProductManufacturer.php | 16 +- .../Endpoint/DeleteProductMetaDataType.php | 16 +- .../Endpoint/DeleteProductStockStatus.php | 16 +- .../Generated/Endpoint/DeleteProductTag.php | 16 +- .../Endpoint/DeleteProductTagLink.php | 16 +- .../Endpoint/DeleteProductTagOption.php | 20 +- .../Generated/Endpoint/DeleteProductUnit.php | 16 +- .../Endpoint/DeleteProductVariantStocks.php | 16 +- .../Endpoint/DeleteProductsBundledProduct.php | 16 +- .../Endpoint/DeleteProductsCategoryLink.php | 16 +- .../Endpoint/DeleteProductsLanguage.php | 16 +- .../Endpoint/DeleteProductsMediaFileLink.php | 16 +- .../Endpoint/DeleteProductsMetaData.php | 16 +- .../Endpoint/DeleteProductsVariant.php | 16 +- .../DeleteProductsVariantsPricelistPrice.php | 18 +- ...teProductsVariantsPricelistVolumePrice.php | 16 +- .../Endpoint/DeleteProductsVatRate.php | 16 +- .../Endpoint/DeleteStockLocation.php | 20 +- src/Api/Generated/Endpoint/DeleteWebHook.php | 16 +- .../Endpoint/GenerateFetchAccessToken.php | 22 +- src/Api/Generated/Endpoint/GetCurrencies.php | 14 +- src/Api/Generated/Endpoint/GetCurrency.php | 18 +- src/Api/Generated/Endpoint/GetCustomer.php | 20 +- .../Generated/Endpoint/GetCustomerAddress.php | 18 +- .../Endpoint/GetCustomerExternalService.php | 18 +- .../Endpoint/GetCustomerExternalServices.php | 14 +- .../Generated/Endpoint/GetCustomerGroups.php | 14 +- src/Api/Generated/Endpoint/GetCustomerTag.php | 18 +- .../Generated/Endpoint/GetCustomerTags.php | 14 +- .../Generated/Endpoint/GetCustomersTag.php | 18 +- .../Generated/Endpoint/GetCustomersTags.php | 14 +- src/Api/Generated/Endpoint/GetMediaFile.php | 18 +- src/Api/Generated/Endpoint/GetMediaFiles.php | 16 +- src/Api/Generated/Endpoint/GetOrder.php | 20 +- .../Generated/Endpoint/GetOrderAddress.php | 18 +- .../Generated/Endpoint/GetOrderComment.php | 18 +- .../Generated/Endpoint/GetOrderComments.php | 14 +- .../Endpoint/GetOrderExternalService.php | 18 +- .../Endpoint/GetOrderExternalServices.php | 14 +- src/Api/Generated/Endpoint/GetOrderItem.php | 20 +- src/Api/Generated/Endpoint/GetOrderItems.php | 14 +- src/Api/Generated/Endpoint/GetOrderStatus.php | 18 +- .../Generated/Endpoint/GetOrderStatuses.php | 14 +- .../Generated/Endpoint/GetPaymentMethod.php | 18 +- .../Generated/Endpoint/GetPaymentMethods.php | 14 +- src/Api/Generated/Endpoint/GetPricelist.php | 18 +- src/Api/Generated/Endpoint/GetPricelists.php | 14 +- src/Api/Generated/Endpoint/GetProduct.php | 20 +- ...etProductBundledProductsPricelistPrice.php | 18 +- .../Generated/Endpoint/GetProductCategory.php | 20 +- .../Endpoint/GetProductManufacturer.php | 18 +- .../Endpoint/GetProductMetaDataType.php | 18 +- .../Endpoint/GetProductStockStatus.php | 18 +- .../Generated/Endpoint/GetProductTagLink.php | 18 +- .../Endpoint/GetProductTagOptions.php | 18 +- src/Api/Generated/Endpoint/GetProductUnit.php | 18 +- .../Endpoint/GetProductVariantStock.php | 18 +- .../Endpoint/GetProductsAttribute.php | 18 +- .../Endpoint/GetProductsBundledProducts.php | 20 +- .../Endpoint/GetProductsCategoryLink.php | 18 +- .../Endpoint/GetProductsLanguage.php | 18 +- .../Endpoint/GetProductsMediaFileLink.php | 18 +- .../Endpoint/GetProductsMetaData.php | 18 +- src/Api/Generated/Endpoint/GetProductsTag.php | 18 +- .../Endpoint/GetProductsTagOptions.php | 14 +- .../Generated/Endpoint/GetProductsTags.php | 14 +- .../Generated/Endpoint/GetProductsVariant.php | 20 +- .../Endpoint/GetProductsVariantsAttribute.php | 18 +- .../GetProductsVariantsAttributeValue.php | 20 +- .../GetProductsVariantsPricelistPrice.php | 20 +- ...etProductsVariantsPricelistVolumePrice.php | 18 +- .../Generated/Endpoint/GetProductsVatRate.php | 18 +- .../Generated/Endpoint/GetShippingMethod.php | 18 +- .../Generated/Endpoint/GetShippingMethods.php | 14 +- .../Endpoint/GetShippingTrackingTypes.php | 14 +- src/Api/Generated/Endpoint/GetShop.php | 18 +- .../Generated/Endpoint/GetStockLocation.php | 18 +- src/Api/Generated/Endpoint/GetVatRate.php | 18 +- src/Api/Generated/Endpoint/GetWebHook.php | 18 +- src/Api/Generated/Endpoint/GetWebHooks.php | 18 +- src/Api/Generated/Endpoint/ListCustomers.php | 32 +- .../Generated/Endpoint/ListOrderAddresses.php | 14 +- src/Api/Generated/Endpoint/ListOrders.php | 40 +- ...tProductBundledProductsPricelistPrices.php | 18 +- .../Endpoint/ListProductCategories.php | 28 +- .../Endpoint/ListProductManufacturers.php | 18 +- .../Endpoint/ListProductMetaDataTypes.php | 18 +- .../Endpoint/ListProductStockStatses.php | 18 +- .../Endpoint/ListProductTagLinks.php | 18 +- .../Generated/Endpoint/ListProductUnits.php | 18 +- src/Api/Generated/Endpoint/ListProducts.php | 34 +- .../Endpoint/ListProductsAttributes.php | 18 +- .../Endpoint/ListProductsBundledProducts.php | 22 +- .../Endpoint/ListProductsCategoryLinks.php | 18 +- .../Endpoint/ListProductsLanguages.php | 18 +- .../Endpoint/ListProductsMediaFileLinks.php | 18 +- .../Endpoint/ListProductsMetaData.php | 18 +- .../Endpoint/ListProductsVariants.php | 22 +- .../ListProductsVariantsAttributeValues.php | 20 +- .../ListProductsVariantsAttributes.php | 18 +- .../ListProductsVariantsPricelistPrices.php | 20 +- ...tProductsVariantsPricelistVolumePrices.php | 18 +- .../Endpoint/ListProductsVariantsStocks.php | 18 +- .../Endpoint/ListProductsVatRates.php | 18 +- .../Generated/Endpoint/ListStockLocations.php | 18 +- src/Api/Generated/Endpoint/ListVatRates.php | 18 +- src/Api/Generated/Endpoint/PatchAttribute.php | 22 +- .../Endpoint/PatchCommentToOrder.php | 22 +- src/Api/Generated/Endpoint/PatchCustomer.php | 26 +- .../Endpoint/PatchCustomerAddress.php | 26 +- src/Api/Generated/Endpoint/PatchMediaFile.php | 29 +- src/Api/Generated/Endpoint/PatchOrder.php | 26 +- .../Generated/Endpoint/PatchOrderAddress.php | 26 +- .../Endpoint/PatchOrderExternalService.php | 26 +- src/Api/Generated/Endpoint/PatchOrderItem.php | 26 +- .../Generated/Endpoint/PatchOrderStatus.php | 30 +- src/Api/Generated/Endpoint/PatchPricelist.php | 26 +- src/Api/Generated/Endpoint/PatchProduct.php | 26 +- ...chProductBundledProductsPricelistPrice.php | 26 +- .../Endpoint/PatchProductCategory.php | 26 +- .../Endpoint/PatchProductManufacturer.php | 22 +- .../Endpoint/PatchProductMetaDataType.php | 26 +- .../Endpoint/PatchProductStockStatus.php | 26 +- .../Generated/Endpoint/PatchProductTag.php | 26 +- .../Endpoint/PatchProductTagOption.php | 30 +- .../Generated/Endpoint/PatchProductUnit.php | 22 +- .../Endpoint/PatchProductVariantStock.php | 26 +- .../Endpoint/PatchProductsBundledProduct.php | 26 +- .../Endpoint/PatchProductsCategoryLink.php | 26 +- .../Endpoint/PatchProductsLanguage.php | 26 +- .../Endpoint/PatchProductsMediaFileLink.php | 26 +- .../Endpoint/PatchProductsMetaData.php | 26 +- .../Endpoint/PatchProductsVariant.php | 26 +- .../PatchProductsVariantsAttributeValues.php | 22 +- .../PatchProductsVariantsPricelistPrice.php | 28 +- ...chProductsVariantsPricelistVolumePrice.php | 26 +- .../Endpoint/PatchProductsVatRate.php | 26 +- .../Generated/Endpoint/PatchStockLocation.php | 30 +- src/Api/Generated/Endpoint/PatchWebHook.php | 26 +- src/Api/Generated/Endpoint/PutAttribute.php | 22 +- src/Api/Generated/Endpoint/PutCustomer.php | 26 +- .../Generated/Endpoint/PutCustomerAddress.php | 26 +- src/Api/Generated/Endpoint/PutMediaFile.php | 29 +- src/Api/Generated/Endpoint/PutOrder.php | 26 +- .../Generated/Endpoint/PutOrderAddress.php | 26 +- .../Endpoint/PutOrderExternalService.php | 26 +- src/Api/Generated/Endpoint/PutOrderItem.php | 26 +- src/Api/Generated/Endpoint/PutOrderStatus.php | 30 +- src/Api/Generated/Endpoint/PutPricelist.php | 26 +- src/Api/Generated/Endpoint/PutProduct.php | 26 +- ...utProductBundledProductsPricelistPrice.php | 26 +- .../Generated/Endpoint/PutProductCategory.php | 26 +- .../Endpoint/PutProductManufacturer.php | 22 +- .../Endpoint/PutProductMetaDataType.php | 26 +- .../Endpoint/PutProductStockStatus.php | 26 +- src/Api/Generated/Endpoint/PutProductTag.php | 26 +- .../Endpoint/PutProductTagOption.php | 30 +- src/Api/Generated/Endpoint/PutProductUnit.php | 22 +- .../Endpoint/PutProductVariantStock.php | 26 +- .../Endpoint/PutProductsBundledProduct.php | 26 +- .../Endpoint/PutProductsCategoryLink.php | 26 +- .../Endpoint/PutProductsLanguage.php | 26 +- .../Endpoint/PutProductsMediaFileLink.php | 26 +- .../Endpoint/PutProductsMetaData.php | 26 +- .../Generated/Endpoint/PutProductsVariant.php | 26 +- .../PutProductsVariantsAttributeValues.php | 22 +- .../PutProductsVariantsPricelistPrice.php | 28 +- ...utProductsVariantsPricelistVolumePrice.php | 26 +- .../Generated/Endpoint/PutProductsVatRate.php | 26 +- .../Generated/Endpoint/PutStockLocation.php | 30 +- src/Api/Generated/Endpoint/PutWebHook.php | 26 +- .../Endpoint/RemoveAddressFromCustomer.php | 20 +- .../Endpoint/RemoveCommentFromOrder.php | 16 +- .../Endpoint/RemoveTagFromCustomer.php | 16 +- .../Endpoint/UpdateCommentToOrder.php | 22 +- .../AddCommentToOrderBadRequestException.php | 20 +- .../AddTagToCustomerBadRequestException.php | 20 +- .../Exception/BadRequestException.php | 11 + .../CreateAttributeBadRequestException.php | 20 +- .../CreateCustomerBadRequestException.php | 20 +- .../CreateMediaFileBadRequestException.php | 20 +- .../CreateOrderBadRequestException.php | 20 +- ...rderExternalServiceBadRequestException.php | 20 +- .../CreateOrderItemBadRequestException.php | 20 +- .../CreateOrderStatusBadRequestException.php | 20 +- .../CreatePricelistBadRequestException.php | 20 +- .../CreateProductBadRequestException.php | 20 +- ...oductPricelistPriceBadRequestException.php | 20 +- ...oductBundledProductBadRequestException.php | 20 +- ...eateProductCategoryBadRequestException.php | 20 +- ...ProductManufacturerBadRequestException.php | 20 +- ...ProductMetaDataTypeBadRequestException.php | 20 +- ...eProductStockStatusBadRequestException.php | 20 +- .../CreateProductTagBadRequestException.php | 20 +- ...reateProductTagLinkBadRequestException.php | 20 +- ...ateProductTagOptionBadRequestException.php | 20 +- ...ductTagOptionMethodNotAllowedException.php | 20 +- .../CreateProductUnitBadRequestException.php | 20 +- ...reateProductVariantBadRequestException.php | 20 +- ...riantPricelistPriceBadRequestException.php | 20 +- ...ricelistVolumePriceBadRequestException.php | 20 +- ...reateProductVatRateBadRequestException.php | 20 +- ...roductsCategoryLinkBadRequestException.php | 20 +- ...ateProductsLanguageBadRequestException.php | 20 +- ...oductsMediaFileLinkBadRequestException.php | 20 +- ...ateProductsMetaDataBadRequestException.php | 20 +- ...antsAttributeValuesBadRequestException.php | 20 +- ...CreateStockLocationBadRequestException.php | 20 +- .../CreateStockLocationForbiddenException.php | 20 +- .../CreateWebHookBadRequestException.php | 20 +- .../DeleteAttributeNotFoundException.php | 20 +- .../DeleteAttributeValueNotFoundException.php | 20 +- .../DeleteCustomerNotFoundException.php | 20 +- .../DeleteMediaFileNotFoundException.php | 20 +- .../DeleteOrderAddressNotFoundException.php | 20 +- ...eOrderExternalServiceNotFoundException.php | 20 +- .../DeleteOrderItemNotFoundException.php | 20 +- .../DeleteOrderNotFoundException.php | 20 +- .../DeleteOrderStatusForbiddenException.php | 20 +- .../DeleteOrderStatusNotFoundException.php | 20 +- .../DeletePricelistForbiddenException.php | 20 +- .../DeletePricelistNotFoundException.php | 20 +- ...roductsPricelistPriceNotFoundException.php | 20 +- ...DeleteProductCategoryNotFoundException.php | 20 +- ...teProductManufacturerNotFoundException.php | 20 +- ...teProductMetaDataTypeNotFoundException.php | 20 +- .../DeleteProductNotFoundException.php | 20 +- ...eteProductStockStatusNotFoundException.php | 20 +- .../DeleteProductTagLinkNotFoundException.php | 20 +- .../DeleteProductTagNotFoundException.php | 20 +- ...ductTagOptionMethodNotAllowedException.php | 20 +- ...eleteProductTagOptionNotFoundException.php | 20 +- .../DeleteProductUnitNotFoundException.php | 20 +- ...eProductVariantStocksNotFoundException.php | 20 +- ...roductsBundledProductNotFoundException.php | 20 +- ...eProductsCategoryLinkNotFoundException.php | 20 +- ...eleteProductsLanguageNotFoundException.php | 20 +- ...ProductsMediaFileLinkNotFoundException.php | 20 +- ...eleteProductsMetaDataNotFoundException.php | 20 +- ...DeleteProductsVariantNotFoundException.php | 20 +- ...ariantsPricelistPriceNotFoundException.php | 20 +- ...sPricelistVolumePriceNotFoundException.php | 20 +- ...DeleteProductsVatRateNotFoundException.php | 20 +- .../DeleteStockLocationForbiddenException.php | 20 +- .../DeleteStockLocationNotFoundException.php | 20 +- .../DeleteWebHookNotFoundException.php | 20 +- .../Exception/ForbiddenException.php | 11 + ...ateFetchAccessTokenBadRequestException.php | 20 +- .../GetCurrencyNotFoundException.php | 20 +- .../GetCustomerAddressNotFoundException.php | 20 +- ...stomerExternalServiceNotFoundException.php | 20 +- .../GetCustomerNotFoundException.php | 20 +- .../GetCustomerTagNotFoundException.php | 20 +- .../GetCustomersTagNotFoundException.php | 20 +- .../GetMediaFileNotFoundException.php | 20 +- .../GetOrderAddressNotFoundException.php | 20 +- .../GetOrderCommentNotFoundException.php | 20 +- ...tOrderExternalServiceNotFoundException.php | 20 +- .../GetOrderItemNotFoundException.php | 20 +- .../Exception/GetOrderNotFoundException.php | 20 +- .../GetOrderStatusNotFoundException.php | 20 +- .../GetPaymentMethodNotFoundException.php | 20 +- .../GetPricelistNotFoundException.php | 20 +- ...roductsPricelistPriceNotFoundException.php | 20 +- .../GetProductCategoryNotFoundException.php | 20 +- ...etProductManufacturerNotFoundException.php | 20 +- ...etProductMetaDataTypeNotFoundException.php | 20 +- .../Exception/GetProductNotFoundException.php | 20 +- ...GetProductStockStatusNotFoundException.php | 20 +- .../GetProductTagLinkNotFoundException.php | 20 +- .../GetProductTagOptionsNotFoundException.php | 20 +- .../GetProductUnitNotFoundException.php | 20 +- ...etProductVariantStockNotFoundException.php | 20 +- .../GetProductsAttributeNotFoundException.php | 20 +- ...oductsBundledProductsNotFoundException.php | 20 +- ...tProductsCategoryLinkNotFoundException.php | 20 +- .../GetProductsLanguageNotFoundException.php | 20 +- ...ProductsMediaFileLinkNotFoundException.php | 20 +- .../GetProductsMetaDataNotFoundException.php | 20 +- .../GetProductsTagNotFoundException.php | 20 +- .../GetProductsVariantNotFoundException.php | 20 +- ...uctsVariantsAttributeNotFoundException.php | 20 +- ...ariantsAttributeValueNotFoundException.php | 20 +- ...ariantsPricelistPriceNotFoundException.php | 20 +- ...sPricelistVolumePriceNotFoundException.php | 20 +- .../GetProductsVatRateNotFoundException.php | 20 +- .../GetShippingMethodNotFoundException.php | 20 +- .../Exception/GetShopNotFoundException.php | 20 +- .../GetStockLocationNotFoundException.php | 20 +- .../Exception/GetVatRateNotFoundException.php | 20 +- .../Exception/GetWebHookNotFoundException.php | 20 +- .../ListCustomersBadRequestException.php | 20 +- .../ListOrdersBadRequestException.php | 20 +- ...uctsPricelistPricesBadRequestException.php | 20 +- ...stProductCategoriesBadRequestException.php | 20 +- ...roductManufacturersBadRequestException.php | 20 +- ...roductMetaDataTypesBadRequestException.php | 20 +- ...ProductStockStatsesBadRequestException.php | 20 +- ...ListProductTagLinksBadRequestException.php | 20 +- .../ListProductUnitsBadRequestException.php | 20 +- ...istProductsAttributesNotFoundException.php | 20 +- .../ListProductsBadRequestException.php | 20 +- ...uctsBundledProductsBadRequestException.php | 20 +- ...oductsCategoryLinksBadRequestException.php | 20 +- ...stProductsLanguagesBadRequestException.php | 20 +- ...ductsMediaFileLinksBadRequestException.php | 20 +- ...istProductsMetaDataBadRequestException.php | 20 +- ...antsAttributeValuesBadRequestException.php | 20 +- ...sVariantsAttributesBadRequestException.php | 20 +- ...istProductsVariantsBadRequestException.php | 20 +- ...antsPricelistPricesBadRequestException.php | 20 +- ...icelistVolumePricesBadRequestException.php | 20 +- ...ductsVariantsStocksBadRequestException.php | 20 +- ...istProductsVatRatesBadRequestException.php | 20 +- .../ListStockLocationsBadRequestException.php | 20 +- .../ListVatRatesBadRequestException.php | 20 +- .../Exception/MethodNotAllowedException.php | 11 + .../Generated/Exception/NotFoundException.php | 11 + .../PatchAttributeBadRequestException.php | 20 +- ...PatchCommentToOrderBadRequestException.php | 20 +- ...atchCustomerAddressBadRequestException.php | 20 +- .../PatchCustomerAddressNotFoundException.php | 20 +- .../PatchCustomerBadRequestException.php | 20 +- .../PatchCustomerNotFoundException.php | 20 +- .../PatchMediaFileBadRequestException.php | 20 +- .../PatchMediaFileNotFoundException.php | 20 +- .../PatchOrderAddressBadRequestException.php | 20 +- .../PatchOrderAddressNotFoundException.php | 20 +- .../PatchOrderBadRequestException.php | 20 +- ...rderExternalServiceBadRequestException.php | 20 +- ...hOrderExternalServiceNotFoundException.php | 20 +- .../PatchOrderItemBadRequestException.php | 20 +- .../PatchOrderItemNotFoundException.php | 20 +- .../Exception/PatchOrderNotFoundException.php | 20 +- .../PatchOrderStatusBadRequestException.php | 20 +- .../PatchOrderStatusForbiddenException.php | 20 +- .../PatchOrderStatusNotFoundException.php | 20 +- .../PatchPricelistBadRequestException.php | 20 +- .../PatchPricelistNotFoundException.php | 20 +- .../PatchProductBadRequestException.php | 20 +- ...ductsPricelistPriceBadRequestException.php | 20 +- ...roductsPricelistPriceNotFoundException.php | 20 +- ...atchProductCategoryBadRequestException.php | 20 +- .../PatchProductCategoryNotFoundException.php | 20 +- ...chProductManufacturerNotFoundException.php | 20 +- ...ProductMetaDataTypeBadRequestException.php | 20 +- ...chProductMetaDataTypeNotFoundException.php | 20 +- .../PatchProductNotFoundException.php | 20 +- ...hProductStockStatusBadRequestException.php | 20 +- ...tchProductStockStatusNotFoundException.php | 20 +- .../PatchProductTagBadRequestException.php | 20 +- .../PatchProductTagNotFoundException.php | 20 +- ...tchProductTagOptionBadRequestException.php | 20 +- ...ductTagOptionMethodNotAllowedException.php | 20 +- ...PatchProductTagOptionNotFoundException.php | 20 +- .../PatchProductUnitNotFoundException.php | 20 +- ...ProductVariantStockBadRequestException.php | 20 +- ...chProductVariantStockNotFoundException.php | 20 +- ...ductsBundledProductBadRequestException.php | 20 +- ...roductsBundledProductNotFoundException.php | 20 +- ...roductsCategoryLinkBadRequestException.php | 20 +- ...hProductsCategoryLinkNotFoundException.php | 20 +- ...tchProductsLanguageBadRequestException.php | 20 +- ...PatchProductsLanguageNotFoundException.php | 20 +- ...oductsMediaFileLinkBadRequestException.php | 20 +- ...ProductsMediaFileLinkNotFoundException.php | 20 +- ...tchProductsMetaDataBadRequestException.php | 20 +- ...PatchProductsMetaDataNotFoundException.php | 20 +- ...atchProductsVariantBadRequestException.php | 20 +- .../PatchProductsVariantNotFoundException.php | 20 +- ...antsAttributeValuesBadRequestException.php | 20 +- ...iantsPricelistPriceBadRequestException.php | 20 +- ...ariantsPricelistPriceNotFoundException.php | 20 +- ...ricelistVolumePriceBadRequestException.php | 20 +- ...sPricelistVolumePriceNotFoundException.php | 20 +- ...atchProductsVatRateBadRequestException.php | 20 +- .../PatchProductsVatRateNotFoundException.php | 20 +- .../PatchStockLocationBadRequestException.php | 20 +- .../PatchStockLocationForbiddenException.php | 20 +- .../PatchStockLocationNotFoundException.php | 20 +- .../PatchWebHookBadRequestException.php | 20 +- .../PatchWebHookNotFoundException.php | 20 +- .../PutAttributeBadRequestException.php | 20 +- .../PutCustomerAddressBadRequestException.php | 20 +- .../PutCustomerAddressNotFoundException.php | 20 +- .../PutCustomerBadRequestException.php | 20 +- .../PutCustomerNotFoundException.php | 20 +- .../PutMediaFileBadRequestException.php | 20 +- .../PutMediaFileNotFoundException.php | 20 +- .../PutOrderAddressBadRequestException.php | 20 +- .../PutOrderAddressNotFoundException.php | 20 +- .../Exception/PutOrderBadRequestException.php | 20 +- ...rderExternalServiceBadRequestException.php | 20 +- ...tOrderExternalServiceNotFoundException.php | 20 +- .../PutOrderItemBadRequestException.php | 20 +- .../PutOrderItemNotFoundException.php | 20 +- .../Exception/PutOrderNotFoundException.php | 20 +- .../PutOrderStatusBadRequestException.php | 20 +- .../PutOrderStatusForbiddenException.php | 20 +- .../PutOrderStatusNotFoundException.php | 20 +- .../PutPricelistBadRequestException.php | 20 +- .../PutPricelistNotFoundException.php | 20 +- .../PutProductBadRequestException.php | 20 +- ...ductsPricelistPriceBadRequestException.php | 20 +- ...roductsPricelistPriceNotFoundException.php | 20 +- .../PutProductCategoryBadRequestException.php | 20 +- .../PutProductCategoryNotFoundException.php | 20 +- ...utProductManufacturerNotFoundException.php | 20 +- ...ProductMetaDataTypeBadRequestException.php | 20 +- ...utProductMetaDataTypeNotFoundException.php | 20 +- .../Exception/PutProductNotFoundException.php | 20 +- ...tProductStockStatusBadRequestException.php | 20 +- ...PutProductStockStatusNotFoundException.php | 20 +- .../PutProductTagBadRequestException.php | 20 +- .../PutProductTagNotFoundException.php | 20 +- ...PutProductTagOptionBadRequestException.php | 20 +- ...ductTagOptionMethodNotAllowedException.php | 20 +- .../PutProductTagOptionNotFoundException.php | 20 +- .../PutProductUnitNotFoundException.php | 20 +- ...ProductVariantStockBadRequestException.php | 20 +- ...utProductVariantStockNotFoundException.php | 20 +- ...ductsBundledProductBadRequestException.php | 20 +- ...roductsBundledProductNotFoundException.php | 20 +- ...roductsCategoryLinkBadRequestException.php | 20 +- ...tProductsCategoryLinkNotFoundException.php | 20 +- ...PutProductsLanguageBadRequestException.php | 20 +- .../PutProductsLanguageNotFoundException.php | 20 +- ...oductsMediaFileLinkBadRequestException.php | 20 +- ...ProductsMediaFileLinkNotFoundException.php | 20 +- ...PutProductsMetaDataBadRequestException.php | 20 +- .../PutProductsMetaDataNotFoundException.php | 20 +- .../PutProductsVariantBadRequestException.php | 20 +- .../PutProductsVariantNotFoundException.php | 20 +- ...antsAttributeValuesBadRequestException.php | 20 +- ...iantsPricelistPriceBadRequestException.php | 20 +- ...ariantsPricelistPriceNotFoundException.php | 20 +- ...ricelistVolumePriceBadRequestException.php | 20 +- ...sPricelistVolumePriceNotFoundException.php | 20 +- .../PutProductsVatRateBadRequestException.php | 20 +- .../PutProductsVatRateNotFoundException.php | 20 +- .../PutStockLocationBadRequestException.php | 20 +- .../PutStockLocationForbiddenException.php | 20 +- .../PutStockLocationNotFoundException.php | 20 +- .../PutWebHookBadRequestException.php | 20 +- .../Exception/PutWebHookNotFoundException.php | 20 +- ...eAddressFromCustomerForbiddenException.php | 20 +- ...veAddressFromCustomerNotFoundException.php | 20 +- ...emoveCommentFromOrderNotFoundException.php | 20 +- ...RemoveTagFromCustomerNotFoundException.php | 20 +- ...pdateCommentToOrderBadRequestException.php | 20 +- src/Api/Generated/Model/AddressModel.php | 23 +- src/Api/Generated/Model/AddressModelItem.php | 11 +- .../Generated/Model/BundledProductsModel.php | 16 +- .../Model/BundledProductsModelCollection.php | 11 +- .../Model/BundledProductsModelItem.php | 11 +- .../Generated/Model/ClientCredentialModel.php | 13 +- .../Generated/Model/CurrencyCollection.php | 11 +- src/Api/Generated/Model/CurrencyModel.php | 13 +- src/Api/Generated/Model/CurrencyModelItem.php | 11 +- .../Generated/Model/CustomerAddedTagModel.php | 12 +- .../Model/CustomerAddedTagModelCollection.php | 11 +- .../Model/CustomerAddedTagModelItem.php | 11 +- .../CustomerAddressesModelCollection.php | 11 +- .../CustomerAddressesModelCollectionData.php | 12 +- .../Model/CustomerAddressesModelItem.php | 11 +- .../Generated/Model/CustomerCreatedModel.php | 24 +- .../Model/CustomerCreatedModelItem.php | 11 +- .../Model/CustomerExternalServicesModel.php | 12 +- ...ustomerExternalServicesModelCollection.php | 11 +- .../CustomerExternalServicesModelItem.php | 11 +- src/Api/Generated/Model/CustomerModel.php | 24 +- .../Model/CustomerModelCollection.php | 12 +- .../Model/CustomerModelCollectionMeta.php | 11 +- src/Api/Generated/Model/CustomerModelItem.php | 11 +- src/Api/Generated/Model/CustomerTagModel.php | 12 +- .../Model/CustomerTagModelCollection.php | 11 +- .../Generated/Model/CustomerTagModelItem.php | 11 +- .../Generated/Model/CustomerUpdateModel.php | 23 +- .../Model/CustomerUpdateModelAddresses.php | 12 +- src/Api/Generated/Model/ErrorModel.php | 12 +- src/Api/Generated/Model/MediaFileModel.php | 19 +- .../Model/MediaFileModelCollection.php | 12 +- .../Model/MediaFileModelCollectionMeta.php | 11 +- .../Generated/Model/MediaFileModelItem.php | 11 +- .../Generated/Model/MediaFileUploadModel.php | 11 +- .../Model/OrderAddressCollection.php | 11 +- src/Api/Generated/Model/OrderAddressModel.php | 16 +- src/Api/Generated/Model/OrderCommentModel.php | 14 +- .../Model/OrderCommentModelCollection.php | 11 +- .../Generated/Model/OrderCommentModelItem.php | 11 +- .../Model/OrderExternalServiceModel.php | 14 +- .../OrderExternalServiceModelCollection.php | 11 +- .../Model/OrderExternalServicesModelItem.php | 11 +- .../Model/OrderItemBundledModelItem.php | 11 +- .../OrderItemBundledModelItemBundledItems.php | 11 +- src/Api/Generated/Model/OrderItemModel.php | 20 +- .../Model/OrderItemModelCollection.php | 11 +- .../OrderItemModelCollectionDataItem.php | 21 +- .../Generated/Model/OrderItemModelItem.php | 11 +- src/Api/Generated/Model/OrderModel.php | 70 +- .../Generated/Model/OrderModelCollection.php | 12 +- .../Model/OrderModelCollectionMeta.php | 11 +- src/Api/Generated/Model/OrderModelItem.php | 11 +- src/Api/Generated/Model/OrderPutModel.php | 61 +- .../Model/OrderStatusLanguageModel.php | 12 +- .../OrderStatusLanguageModelCollection.php | 11 +- src/Api/Generated/Model/OrderStatusModel.php | 14 +- .../Model/OrderStatusModelCollection.php | 11 +- .../Generated/Model/OrderStatusModelItem.php | 11 +- src/Api/Generated/Model/OrderUpdateModel.php | 63 +- src/Api/Generated/Model/PaginationModel.php | 15 +- .../Model/PaymentMethodLanguageModel.php | 14 +- .../PaymentMethodLanguageModelCollection.php | 11 +- .../Generated/Model/PaymentMethodModel.php | 25 +- .../Model/PaymentMethodModelCollection.php | 11 +- .../Model/PaymentMethodModelItem.php | 11 +- src/Api/Generated/Model/PricelistModel.php | 22 +- .../Model/PricelistModelCollection.php | 11 +- .../Generated/Model/PricelistModelItem.php | 11 +- .../Model/ProductBundleProductPriceModel.php | 12 +- ...oductBundleProductPriceModelCollection.php | 11 +- .../ProductBundleProductPriceModelItem.php | 11 +- .../Model/ProductCategoryLanguagesModel.php | 17 +- ...roductCategoryLanguagesModelCollection.php | 11 +- .../Model/ProductCategoryLinkModel.php | 12 +- .../ProductCategoryLinkModelCollection.php | 11 +- .../Model/ProductCategoryLinkModelItem.php | 11 +- .../Generated/Model/ProductCategoryModel.php | 21 +- .../Model/ProductCategoryModelCollection.php | 12 +- .../ProductCategoryModelCollectionMeta.php | 11 +- .../Model/ProductCategoryModelItem.php | 11 +- .../Model/ProductCategoryModelUpdatable.php | 21 +- .../Generated/Model/ProductLanguageModel.php | 17 +- .../Model/ProductLanguageModelCollection.php | 11 +- .../Model/ProductLanguageModelItem.php | 11 +- .../Model/ProductLanguageSlimModel.php | 14 +- .../Model/ProductManufacturerModel.php | 15 +- .../ProductManufacturerModelCollection.php | 11 +- .../Model/ProductManufacturerModelItem.php | 11 +- .../Model/ProductMediaFileLinkModel.php | 14 +- .../ProductMediaFileLinkModelCollection.php | 11 +- .../Model/ProductMediaFileLinkModelItem.php | 11 +- .../Generated/Model/ProductMetaDataModel.php | 14 +- .../Model/ProductMetaDataModelCollection.php | 11 +- .../Model/ProductMetaDataModelItem.php | 11 +- .../Model/ProductMetaDataModelUpdatable.php | 14 +- .../ProductMetaDataTypeLanguageModel.php | 12 +- ...uctMetaDataTypeLanguageModelCollection.php | 11 +- .../Model/ProductMetaDataTypeModel.php | 12 +- .../ProductMetaDataTypeModelCollection.php | 11 +- .../Model/ProductMetaDataTypeModelItem.php | 11 +- .../ProductMetaDataTypeModelUpdatable.php | 11 +- .../Model/ProductMetaLanguageDataModel.php | 12 +- ...ProductMetaLanguageDataModelCollection.php | 11 +- .../ProductMetaLanguageDataModelItem.php | 11 +- src/Api/Generated/Model/ProductModel.php | 35 +- .../Model/ProductModelCollection.php | 12 +- .../Model/ProductModelCollectionMeta.php | 11 +- src/Api/Generated/Model/ProductModelItem.php | 11 +- .../Generated/Model/ProductModelLanguages.php | 11 +- .../Generated/Model/ProductModelPatchable.php | 29 +- .../Generated/Model/ProductModelUpdatable.php | 31 +- .../Model/ProductStockStatusLanguageModel.php | 12 +- .../ProductStockStatusModelCollection.php | 11 +- .../Model/ProductStockStatusModelItem.php | 11 +- .../Model/ProductStockStatusRequestModel.php | 17 +- .../Model/ProductStockStatusResponseModel.php | 17 +- ...oductStockStatusResponseModelLanguages.php | 11 +- .../Model/ProductTagLanguageModel.php | 12 +- .../Generated/Model/ProductTagLinkModel.php | 12 +- .../Model/ProductTagLinkModelCollection.php | 11 +- .../Model/ProductTagLinkModelItem.php | 11 +- .../Model/ProductTagLinkPostRequestModel.php | 11 +- src/Api/Generated/Model/ProductTagModel.php | 13 +- .../Model/ProductTagModelCollection.php | 11 +- .../Generated/Model/ProductTagModelItem.php | 11 +- .../Model/ProductTagOptionLanguageModel.php | 12 +- .../Generated/Model/ProductTagOptionModel.php | 14 +- .../Model/ProductTagOptionModelCollection.php | 11 +- .../Model/ProductTagOptionModelItem.php | 11 +- .../ProductTagOptionPatchRequestModel.php | 12 +- .../ProductTagOptionPostRequestModel.php | 12 +- .../Model/ProductTagOptionPutRequestModel.php | 12 +- .../Model/ProductTagPatchRequestModel.php | 13 +- .../Model/ProductTagPostRequestModel.php | 13 +- .../Model/ProductTagPutRequestModel.php | 13 +- .../Model/ProductUnitLanguageModel.php | 13 +- .../ProductUnitLanguageModelCollection.php | 11 +- src/Api/Generated/Model/ProductUnitModel.php | 14 +- .../Model/ProductUnitModelCollection.php | 11 +- .../Generated/Model/ProductUnitModelItem.php | 11 +- .../Model/ProductUnitModelUpdatable.php | 14 +- .../ProductVariantAttributeLanguageModel.php | 12 +- .../Model/ProductVariantAttributeModel.php | 14 +- ...ProductVariantAttributeModelCollection.php | 11 +- .../ProductVariantAttributeModelItem.php | 11 +- .../ProductVariantAttributeModelLanguages.php | 11 +- .../ProductVariantAttributeModelUpdatable.php | 14 +- ...ductVariantAttributeValueLanguageModel.php | 12 +- .../ProductVariantAttributeValueModel.php | 16 +- ...ctVariantAttributeValueModelCollection.php | 11 +- .../ProductVariantAttributeValueModelItem.php | 11 +- ...uctVariantAttributeValueModelLanguages.php | 11 +- ...uctVariantAttributeValueModelUpdatable.php | 15 +- .../Model/ProductVariantModelCollection.php | 11 +- .../Model/ProductVariantModelItem.php | 11 +- .../Model/ProductVariantPatchRequestModel.php | 24 +- .../Model/ProductVariantPriceModel.php | 16 +- .../ProductVariantPriceModelCollection.php | 11 +- .../Model/ProductVariantPriceModelItem.php | 11 +- .../Model/ProductVariantPutRequestModel.php | 24 +- .../Model/ProductVariantRequestModel.php | 24 +- .../Model/ProductVariantResponseModel.php | 27 +- .../ProductVariantStockModelCollection.php | 11 +- .../Model/ProductVariantStockModelItem.php | 11 +- .../ProductVariantStockPatchRequestModel.php | 12 +- .../ProductVariantStockPutRequestModel.php | 12 +- .../ProductVariantStockResponseModel.php | 13 +- .../Model/ProductVariantVolumePriceModel.php | 15 +- ...oductVariantVolumePriceModelCollection.php | 11 +- .../ProductVariantVolumePriceModelItem.php | 11 +- .../Generated/Model/ProductVatRateModel.php | 12 +- .../Model/ProductVatRateModelCollection.php | 11 +- .../Model/ProductVatRateModelItem.php | 11 +- .../Model/ProductsAttributesModelItem.php | 11 +- .../Model/ShippingMethodLanguageModel.php | 14 +- .../ShippingMethodLanguageModelCollection.php | 11 +- .../Generated/Model/ShippingMethodModel.php | 24 +- .../Model/ShippingMethodModelCollection.php | 11 +- .../Model/ShippingMethodModelItem.php | 11 +- .../Model/ShippingTrackingTypeModel.php | 12 +- .../ShippingTrackingTypeModelCollection.php | 11 +- src/Api/Generated/Model/ShopItem.php | 11 +- src/Api/Generated/Model/ShopModel.php | 26 +- .../Model/StockLocationLanguagesModel.php | 12 +- .../StockLocationLanguagesModelCollection.php | 11 +- .../Generated/Model/StockLocationModel.php | 17 +- .../Model/StockLocationModelCollection.php | 11 +- .../Model/StockLocationModelItem.php | 11 +- .../Model/StockLocationPostRequestModel.php | 16 +- .../Model/StockLocationPutRequestModel.php | 16 +- src/Api/Generated/Model/TokenModel.php | 13 +- src/Api/Generated/Model/VatRateModel.php | 15 +- .../Model/VatRateModelCollection.php | 11 +- src/Api/Generated/Model/VatRateModelItem.php | 11 +- src/Api/Generated/Model/WebHookModel.php | 15 +- .../Model/WebHookModelCollection.php | 11 +- src/Api/Generated/Model/WebHookModelItem.php | 11 +- .../Normalizer/AddressModelItemNormalizer.php | 54 +- .../Normalizer/AddressModelNormalizer.php | 198 ++-- ...ndledProductsModelCollectionNormalizer.php | 54 +- .../BundledProductsModelItemNormalizer.php | 54 +- .../BundledProductsModelNormalizer.php | 112 ++- .../ClientCredentialModelNormalizer.php | 78 +- .../CurrencyCollectionNormalizer.php | 54 +- .../CurrencyModelItemNormalizer.php | 54 +- .../Normalizer/CurrencyModelNormalizer.php | 77 +- ...tomerAddedTagModelCollectionNormalizer.php | 54 +- .../CustomerAddedTagModelItemNormalizer.php | 54 +- .../CustomerAddedTagModelNormalizer.php | 62 +- ...AddressesModelCollectionDataNormalizer.php | 66 +- ...omerAddressesModelCollectionNormalizer.php | 54 +- .../CustomerAddressesModelItemNormalizer.php | 54 +- .../CustomerCreatedModelItemNormalizer.php | 54 +- .../CustomerCreatedModelNormalizer.php | 190 +++- ...ernalServicesModelCollectionNormalizer.php | 54 +- ...merExternalServicesModelItemNormalizer.php | 54 +- ...ustomerExternalServicesModelNormalizer.php | 66 +- .../CustomerModelCollectionMetaNormalizer.php | 54 +- .../CustomerModelCollectionNormalizer.php | 66 +- .../CustomerModelItemNormalizer.php | 54 +- .../Normalizer/CustomerModelNormalizer.php | 190 +++- .../CustomerTagModelCollectionNormalizer.php | 54 +- .../CustomerTagModelItemNormalizer.php | 54 +- .../Normalizer/CustomerTagModelNormalizer.php | 58 +- ...CustomerUpdateModelAddressesNormalizer.php | 66 +- .../CustomerUpdateModelNormalizer.php | 190 ++-- .../Normalizer/ErrorModelNormalizer.php | 58 +- .../Normalizer/JaneObjectNormalizer.php | 62 ++ ...MediaFileModelCollectionMetaNormalizer.php | 54 +- .../MediaFileModelCollectionNormalizer.php | 66 +- .../MediaFileModelItemNormalizer.php | 54 +- .../Normalizer/MediaFileModelNormalizer.php | 114 ++- .../MediaFileUploadModelNormalizer.php | 54 +- .../Normalizer/NormalizerFactory.php | 211 ----- .../OrderAddressCollectionNormalizer.php | 54 +- .../OrderAddressModelNormalizer.php | 114 ++- .../OrderCommentModelCollectionNormalizer.php | 54 +- .../OrderCommentModelItemNormalizer.php | 54 +- .../OrderCommentModelNormalizer.php | 86 +- ...ternalServiceModelCollectionNormalizer.php | 54 +- .../OrderExternalServiceModelNormalizer.php | 86 +- ...derExternalServicesModelItemNormalizer.php | 54 +- ...BundledModelItemBundledItemsNormalizer.php | 54 +- .../OrderItemBundledModelItemNormalizer.php | 54 +- ...rItemModelCollectionDataItemNormalizer.php | 179 +++- .../OrderItemModelCollectionNormalizer.php | 54 +- .../OrderItemModelItemNormalizer.php | 54 +- .../Normalizer/OrderItemModelNormalizer.php | 167 +++- .../OrderModelCollectionMetaNormalizer.php | 54 +- .../OrderModelCollectionNormalizer.php | 66 +- .../Normalizer/OrderModelItemNormalizer.php | 54 +- .../Normalizer/OrderModelNormalizer.php | 740 ++++++++++----- .../Normalizer/OrderPutModelNormalizer.php | 640 +++++++++---- ...tatusLanguageModelCollectionNormalizer.php | 54 +- .../OrderStatusLanguageModelNormalizer.php | 66 +- .../OrderStatusModelCollectionNormalizer.php | 54 +- .../OrderStatusModelItemNormalizer.php | 54 +- .../Normalizer/OrderStatusModelNormalizer.php | 82 +- .../Normalizer/OrderUpdateModelNormalizer.php | 664 ++++++++++---- .../Normalizer/PaginationModelNormalizer.php | 82 +- ...ethodLanguageModelCollectionNormalizer.php | 54 +- .../PaymentMethodLanguageModelNormalizer.php | 74 +- ...PaymentMethodModelCollectionNormalizer.php | 54 +- .../PaymentMethodModelItemNormalizer.php | 54 +- .../PaymentMethodModelNormalizer.php | 181 +++- .../PricelistModelCollectionNormalizer.php | 54 +- .../PricelistModelItemNormalizer.php | 54 +- .../Normalizer/PricelistModelNormalizer.php | 158 +++- ...eProductPriceModelCollectionNormalizer.php | 54 +- ...tBundleProductPriceModelItemNormalizer.php | 54 +- ...oductBundleProductPriceModelNormalizer.php | 67 +- ...goryLanguagesModelCollectionNormalizer.php | 54 +- ...roductCategoryLanguagesModelNormalizer.php | 130 ++- ...tCategoryLinkModelCollectionNormalizer.php | 54 +- ...ProductCategoryLinkModelItemNormalizer.php | 54 +- .../ProductCategoryLinkModelNormalizer.php | 66 +- ...tCategoryModelCollectionMetaNormalizer.php | 54 +- ...oductCategoryModelCollectionNormalizer.php | 66 +- .../ProductCategoryModelItemNormalizer.php | 54 +- .../ProductCategoryModelNormalizer.php | 166 +++- ...roductCategoryModelUpdatableNormalizer.php | 172 +++- ...oductLanguageModelCollectionNormalizer.php | 54 +- .../ProductLanguageModelItemNormalizer.php | 54 +- .../ProductLanguageModelNormalizer.php | 124 ++- .../ProductLanguageSlimModelNormalizer.php | 88 +- ...tManufacturerModelCollectionNormalizer.php | 54 +- ...ProductManufacturerModelItemNormalizer.php | 54 +- .../ProductManufacturerModelNormalizer.php | 96 +- ...MediaFileLinkModelCollectionNormalizer.php | 54 +- ...roductMediaFileLinkModelItemNormalizer.php | 54 +- .../ProductMediaFileLinkModelNormalizer.php | 80 +- ...oductMetaDataModelCollectionNormalizer.php | 54 +- .../ProductMetaDataModelItemNormalizer.php | 54 +- .../ProductMetaDataModelNormalizer.php | 90 +- ...roductMetaDataModelUpdatableNormalizer.php | 86 +- ...aTypeLanguageModelCollectionNormalizer.php | 54 +- ...uctMetaDataTypeLanguageModelNormalizer.php | 66 +- ...tMetaDataTypeModelCollectionNormalizer.php | 54 +- ...ProductMetaDataTypeModelItemNormalizer.php | 54 +- .../ProductMetaDataTypeModelNormalizer.php | 62 +- ...ctMetaDataTypeModelUpdatableNormalizer.php | 54 +- ...aLanguageDataModelCollectionNormalizer.php | 54 +- ...uctMetaLanguageDataModelItemNormalizer.php | 54 +- ...ProductMetaLanguageDataModelNormalizer.php | 66 +- .../ProductModelCollectionMetaNormalizer.php | 54 +- .../ProductModelCollectionNormalizer.php | 66 +- .../Normalizer/ProductModelItemNormalizer.php | 54 +- .../ProductModelLanguagesNormalizer.php | 54 +- .../Normalizer/ProductModelNormalizer.php | 330 +++++-- .../ProductModelPatchableNormalizer.php | 271 ++++-- .../ProductModelUpdatableNormalizer.php | 298 ++++-- ...ductStockStatusLanguageModelNormalizer.php | 66 +- ...ctStockStatusModelCollectionNormalizer.php | 54 +- .../ProductStockStatusModelItemNormalizer.php | 54 +- ...oductStockStatusRequestModelNormalizer.php | 118 ++- ...StatusResponseModelLanguagesNormalizer.php | 54 +- ...ductStockStatusResponseModelNormalizer.php | 118 ++- .../ProductTagLanguageModelNormalizer.php | 64 +- ...roductTagLinkModelCollectionNormalizer.php | 54 +- .../ProductTagLinkModelItemNormalizer.php | 54 +- .../ProductTagLinkModelNormalizer.php | 66 +- ...oductTagLinkPostRequestModelNormalizer.php | 52 +- .../ProductTagModelCollectionNormalizer.php | 54 +- .../ProductTagModelItemNormalizer.php | 54 +- .../Normalizer/ProductTagModelNormalizer.php | 70 +- ...roductTagOptionLanguageModelNormalizer.php | 64 +- ...ductTagOptionModelCollectionNormalizer.php | 54 +- .../ProductTagOptionModelItemNormalizer.php | 54 +- .../ProductTagOptionModelNormalizer.php | 82 +- ...ctTagOptionPatchRequestModelNormalizer.php | 70 +- ...uctTagOptionPostRequestModelNormalizer.php | 70 +- ...ductTagOptionPutRequestModelNormalizer.php | 70 +- .../ProductTagPatchRequestModelNormalizer.php | 80 +- .../ProductTagPostRequestModelNormalizer.php | 80 +- .../ProductTagPutRequestModelNormalizer.php | 80 +- ...tUnitLanguageModelCollectionNormalizer.php | 54 +- .../ProductUnitLanguageModelNormalizer.php | 78 +- .../ProductUnitModelCollectionNormalizer.php | 54 +- .../ProductUnitModelItemNormalizer.php | 54 +- .../Normalizer/ProductUnitModelNormalizer.php | 86 +- .../ProductUnitModelUpdatableNormalizer.php | 86 +- ...ariantAttributeLanguageModelNormalizer.php | 66 +- ...iantAttributeModelCollectionNormalizer.php | 54 +- ...uctVariantAttributeModelItemNormalizer.php | 54 +- ...riantAttributeModelLanguagesNormalizer.php | 54 +- ...ProductVariantAttributeModelNormalizer.php | 90 +- ...riantAttributeModelUpdatableNormalizer.php | 86 +- ...tAttributeValueLanguageModelNormalizer.php | 66 +- ...ttributeValueModelCollectionNormalizer.php | 54 +- ...riantAttributeValueModelItemNormalizer.php | 54 +- ...AttributeValueModelLanguagesNormalizer.php | 54 +- ...ctVariantAttributeValueModelNormalizer.php | 114 ++- ...AttributeValueModelUpdatableNormalizer.php | 102 ++- ...roductVariantModelCollectionNormalizer.php | 54 +- .../ProductVariantModelItemNormalizer.php | 54 +- ...ductVariantPatchRequestModelNormalizer.php | 213 +++-- ...tVariantPriceModelCollectionNormalizer.php | 54 +- ...ProductVariantPriceModelItemNormalizer.php | 54 +- .../ProductVariantPriceModelNormalizer.php | 118 ++- ...roductVariantPutRequestModelNormalizer.php | 221 +++-- .../ProductVariantRequestModelNormalizer.php | 220 +++-- .../ProductVariantResponseModelNormalizer.php | 254 ++++-- ...tVariantStockModelCollectionNormalizer.php | 54 +- ...ProductVariantStockModelItemNormalizer.php | 54 +- ...ariantStockPatchRequestModelNormalizer.php | 69 +- ...tVariantStockPutRequestModelNormalizer.php | 67 +- ...uctVariantStockResponseModelNormalizer.php | 77 +- ...ntVolumePriceModelCollectionNormalizer.php | 54 +- ...tVariantVolumePriceModelItemNormalizer.php | 54 +- ...oductVariantVolumePriceModelNormalizer.php | 106 ++- ...roductVatRateModelCollectionNormalizer.php | 54 +- .../ProductVatRateModelItemNormalizer.php | 54 +- .../ProductVatRateModelNormalizer.php | 69 +- .../ProductsAttributesModelItemNormalizer.php | 54 +- ...ethodLanguageModelCollectionNormalizer.php | 54 +- .../ShippingMethodLanguageModelNormalizer.php | 74 +- ...hippingMethodModelCollectionNormalizer.php | 54 +- .../ShippingMethodModelItemNormalizer.php | 54 +- .../ShippingMethodModelNormalizer.php | 176 +++- ...gTrackingTypeModelCollectionNormalizer.php | 54 +- .../ShippingTrackingTypeModelNormalizer.php | 58 +- .../Normalizer/ShopItemNormalizer.php | 54 +- .../Normalizer/ShopModelNormalizer.php | 173 +++- ...tionLanguagesModelCollectionNormalizer.php | 54 +- .../StockLocationLanguagesModelNormalizer.php | 64 +- ...StockLocationModelCollectionNormalizer.php | 54 +- .../StockLocationModelItemNormalizer.php | 54 +- .../StockLocationModelNormalizer.php | 122 ++- ...tockLocationPostRequestModelNormalizer.php | 114 ++- ...StockLocationPutRequestModelNormalizer.php | 114 ++- .../Normalizer/TokenModelNormalizer.php | 66 +- .../VatRateModelCollectionNormalizer.php | 54 +- .../Normalizer/VatRateModelItemNormalizer.php | 54 +- .../Normalizer/VatRateModelNormalizer.php | 114 ++- .../WebHookModelCollectionNormalizer.php | 54 +- .../Normalizer/WebHookModelItemNormalizer.php | 54 +- .../Normalizer/WebHookModelNormalizer.php | 98 +- .../Generated/Runtime/Client/BaseEndpoint.php | 66 ++ src/Api/Generated/Runtime/Client/Client.php | 82 ++ .../Runtime/Client/CustomQueryResolver.php | 9 + src/Api/Generated/Runtime/Client/Endpoint.php | 42 + .../Runtime/Client/EndpointTrait.php | 15 + .../Runtime/Normalizer/CheckArray.php | 13 + .../Normalizer/ReferenceNormalizer.php | 25 + .../Normalizer/ValidationException.php | 19 + .../Runtime/Normalizer/ValidatorTrait.php | 16 + src/Exception/InvalidCredentialsException.php | 4 +- ...AuthenticationAttemptsReachedException.php | 4 +- src/HttpClient/Plugin/BaseUriPlugin.php | 2 +- src/HttpClient/Plugin/ErrorPlugin.php | 2 +- .../Api/Authentication/AccessTokenTest.php | 6 +- .../Authentication/ClientCredentialsTest.php | 4 +- .../TokenFileSystemCacheTest.php | 3 - tests/unit/Api/ClientTest.php | 20 +- .../Endpoint/MediaFileEndpointTraitTest.php | 4 +- .../Api/Model/MediaFileUploadModelTest.php | 2 +- tests/unit/HttpClient/BuilderTest.php | 1 - 916 files changed, 24250 insertions(+), 7612 deletions(-) create mode 100644 src/Api/Generated/Exception/BadRequestException.php create mode 100644 src/Api/Generated/Exception/ForbiddenException.php create mode 100644 src/Api/Generated/Exception/MethodNotAllowedException.php create mode 100644 src/Api/Generated/Exception/NotFoundException.php create mode 100644 src/Api/Generated/Normalizer/JaneObjectNormalizer.php delete mode 100644 src/Api/Generated/Normalizer/NormalizerFactory.php create mode 100644 src/Api/Generated/Runtime/Client/BaseEndpoint.php create mode 100644 src/Api/Generated/Runtime/Client/Client.php create mode 100644 src/Api/Generated/Runtime/Client/CustomQueryResolver.php create mode 100644 src/Api/Generated/Runtime/Client/Endpoint.php create mode 100644 src/Api/Generated/Runtime/Client/EndpointTrait.php create mode 100644 src/Api/Generated/Runtime/Normalizer/CheckArray.php create mode 100644 src/Api/Generated/Runtime/Normalizer/ReferenceNormalizer.php create mode 100644 src/Api/Generated/Runtime/Normalizer/ValidationException.php create mode 100644 src/Api/Generated/Runtime/Normalizer/ValidatorTrait.php diff --git a/composer.json b/composer.json index 56144ced..54b3ee8f 100644 --- a/composer.json +++ b/composer.json @@ -13,30 +13,31 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=7.2", + "php": "^8.2", "ext-json": "*", "psr/http-message": "^1.0", "psr/cache": "^1.0", - "php-http/httplug": "^1.1", + "php-http/httplug": "^2.4", "php-http/message": "^1.6", "php-http/discovery": "^1.4", - "php-http/client-common": "^1.7", + "php-http/client-common": "^2.7", "php-http/cache-plugin": "^1.5", "php-http/client-implementation": "^1.0", "php-http/multipart-stream-builder": "^1.0", "psr/http-message-implementation": "^1.0", "symfony/cache": "^4.1", - "symfony/serializer": "^4.1", + "symfony/serializer": "^5.3", "symfony/property-access": "^4.1", - "symfony/property-info": "^4.1", + "symfony/property-info": "^5.4", "symfony/options-resolver": "^4.1", "psr/simple-cache": "^1.0", - "jane-php/jane-php": "5.2.2", - "symfony/translation-contracts": "^2.2" + "jane-php/jane-php": "^7.5", + "http-interop/http-factory-guzzle": "^1.2" }, "require-dev": { + "roave/security-advisories": "dev-latest", "phpunit/phpunit": "^8.1", - "php-http/guzzle6-adapter": "^1.0", + "php-http/guzzle6-adapter": "^2.0", "guzzlehttp/psr7": "^1.4", "php-http/mock-client": "^1.1", "squizlabs/php_codesniffer": "^3.3" @@ -53,5 +54,10 @@ "phpunit-coverage-html": "vendor/bin/phpunit --stop-on-error --stop-on-failure --coverage-html ${baseDir}resources/test-coverage", "phpunit-coverage-text": "vendor/bin/phpunit --stop-on-error --stop-on-failure --coverage-text", "phpcs": "vendor/bin/phpcs src --standard=resources/code-sniffer-standards/php-standard.xml --ignore=src/Api/Generated" + }, + "config": { + "allow-plugins": { + "php-http/discovery": true + } } } diff --git a/src/Api/Client.php b/src/Api/Client.php index 3ee25647..3947d010 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -12,35 +12,35 @@ class Client extends GeneratedClient { public function createMediaFile( - GeneratedMediaFileUploadModel $requestBody, + ?GeneratedMediaFileUploadModel $requestBody = null, string $fetch = GeneratedClient::FETCH_OBJECT ) { $this->checkCustomMediaFileUploadModelInstance($requestBody); - return $this->executePsr7Endpoint(new CreateMediaFile($requestBody), $fetch); + return $this->executeEndpoint(new CreateMediaFile($requestBody), $fetch); } public function putMediaFile( int $mediaFileId, - GeneratedMediaFileUploadModel $requestBody, + ?GeneratedMediaFileUploadModel $requestBody = null, string $fetch = GeneratedClient::FETCH_OBJECT ) { $this->checkCustomMediaFileUploadModelInstance($requestBody); - return $this->executePsr7Endpoint(new PutMediaFile($mediaFileId, $requestBody), $fetch); + return $this->executeEndpoint(new PutMediaFile($mediaFileId, $requestBody), $fetch); } public function patchMediaFile( int $mediaFileId, - GeneratedMediaFileUploadModel $requestBody, + ?GeneratedMediaFileUploadModel $requestBody = null, string $fetch = GeneratedClient::FETCH_OBJECT ) { $this->checkCustomMediaFileUploadModelInstance($requestBody); - return $this->executePsr7Endpoint(new PatchMediaFile($mediaFileId, $requestBody), $fetch); + return $this->executeEndpoint(new PatchMediaFile($mediaFileId, $requestBody), $fetch); } - private function checkCustomMediaFileUploadModelInstance(GeneratedMediaFileUploadModel $requestBody): void + private function checkCustomMediaFileUploadModelInstance(?GeneratedMediaFileUploadModel $requestBody): void { if (!$requestBody instanceof MediaFileUploadModel) { throw new \LogicException( diff --git a/src/Api/Generated/Client.php b/src/Api/Generated/Client.php index 4843c50d..f9f8a012 100644 --- a/src/Api/Generated/Client.php +++ b/src/Api/Generated/Client.php @@ -2,20 +2,20 @@ namespace Starweb\Api\Generated; -class Client extends \Jane\OpenApiRuntime\Client\Psr7HttplugClient +class Client extends \Starweb\Api\Generated\Runtime\Client\Client { /** * Create a token. Retrieves the create `Token` object. * - * @param \Starweb\Api\Generated\Model\ClientCredentialModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\GenerateFetchAccessTokenBadRequestException * * @return null|\Starweb\Api\Generated\Model\TokenModel|\Psr\Http\Message\ResponseInterface */ - public function generateFetchAccessToken(\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function generateFetchAccessToken(?\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GenerateFetchAccessToken($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GenerateFetchAccessToken($requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -24,7 +24,7 @@ public function generateFetchAccessToken(\Starweb\Api\Generated\Model\ClientCred */ public function getCurrencies(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCurrencies(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCurrencies(), $fetch); } /** * Retrieves the details of a currency @@ -37,7 +37,7 @@ public function getCurrencies(string $fetch = self::FETCH_OBJECT) */ public function getCurrency(string $currencyCode, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCurrency($currencyCode), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCurrency($currencyCode), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -46,7 +46,7 @@ public function getCurrency(string $currencyCode, string $fetch = self::FETCH_OB */ public function getCustomersTags(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomersTags(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomersTags(), $fetch); } /** * Retrieves a `Tag` object @@ -59,7 +59,7 @@ public function getCustomersTags(string $fetch = self::FETCH_OBJECT) */ public function getCustomersTag(int $tagId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomersTag($tagId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomersTag($tagId), $fetch); } /** * Returns a list of customers @@ -80,20 +80,20 @@ public function getCustomersTag(int $tagId, string $fetch = self::FETCH_OBJECT) */ public function listCustomers(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListCustomers($queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListCustomers($queryParameters), $fetch); } /** * Creates a `Customer` object * - * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateCustomerBadRequestException * * @return null|\Starweb\Api\Generated\Model\CustomerCreatedModelItem|\Psr\Http\Message\ResponseInterface */ - public function createCustomer(\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createCustomer(?\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateCustomer($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateCustomer($requestBody), $fetch); } /** * Delete a customer permanently! @@ -106,7 +106,7 @@ public function createCustomer(\Starweb\Api\Generated\Model\CustomerUpdateModel */ public function deleteCustomer(int $customerId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteCustomer($customerId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteCustomer($customerId), $fetch); } /** * Retrieves a `Customer` object @@ -122,37 +122,37 @@ public function deleteCustomer(int $customerId, string $fetch = self::FETCH_OBJE */ public function getCustomer(int $customerId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomer($customerId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomer($customerId, $queryParameters), $fetch); } /** * Updates a customer. Retrieves the updated `Customer` object * * @param int $customerId The customers id - * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchCustomerBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchCustomerNotFoundException * * @return null|\Starweb\Api\Generated\Model\CustomerModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchCustomer(int $customerId, \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchCustomer(int $customerId, ?\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchCustomer($customerId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchCustomer($customerId, $requestBody), $fetch); } /** * Updates a customer. Retrieves the updated `Customer` object * * @param int $customerId The customers id - * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutCustomerBadRequestException * @throws \Starweb\Api\Generated\Exception\PutCustomerNotFoundException * * @return null|\Starweb\Api\Generated\Model\CustomerModelItem|\Psr\Http\Message\ResponseInterface */ - public function putCustomer(int $customerId, \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putCustomer(int $customerId, ?\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutCustomer($customerId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutCustomer($customerId, $requestBody), $fetch); } /** * Returns a list of external services for a customer @@ -164,7 +164,7 @@ public function putCustomer(int $customerId, \Starweb\Api\Generated\Model\Custom */ public function getCustomerExternalServices(int $customerId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerExternalServices($customerId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerExternalServices($customerId), $fetch); } /** * Retrieves a `CustomerExternalService` object @@ -178,7 +178,7 @@ public function getCustomerExternalServices(int $customerId, string $fetch = sel */ public function getCustomerExternalService(int $customerId, string $serviceName, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerExternalService($customerId, $serviceName), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerExternalService($customerId, $serviceName), $fetch); } /** * Returns a list of customer tags @@ -190,21 +190,21 @@ public function getCustomerExternalService(int $customerId, string $serviceName, */ public function getCustomerTags(int $customerId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerTags($customerId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerTags($customerId), $fetch); } /** * Add a tag to a customer. Retrieves the created `CustomerTag` object * * @param int $customerId The customers id - * @param \Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\AddTagToCustomerBadRequestException * * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelItem|\Psr\Http\Message\ResponseInterface */ - public function addTagToCustomer(int $customerId, \Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function addTagToCustomer(int $customerId, ?\Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\AddTagToCustomer($customerId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\AddTagToCustomer($customerId, $requestBody), $fetch); } /** * Deletes a customer tag permanently. @@ -218,7 +218,7 @@ public function addTagToCustomer(int $customerId, \Starweb\Api\Generated\Model\C */ public function removeTagFromCustomer(int $customerId, int $tagId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\RemoveTagFromCustomer($customerId, $tagId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\RemoveTagFromCustomer($customerId, $tagId), $fetch); } /** * Retrieves a `CustomerTag` object @@ -232,7 +232,7 @@ public function removeTagFromCustomer(int $customerId, int $tagId, string $fetch */ public function getCustomerTag(int $customerId, int $tagId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerTag($customerId, $tagId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerTag($customerId, $tagId), $fetch); } /** * Returns a list of addresses for a customer @@ -244,7 +244,7 @@ public function getCustomerTag(int $customerId, int $tagId, string $fetch = self */ public function getCustomerGroups(int $customerId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerGroups($customerId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerGroups($customerId), $fetch); } /** * Delete a customer address permanently. @@ -259,7 +259,7 @@ public function getCustomerGroups(int $customerId, string $fetch = self::FETCH_O */ public function removeAddressFromCustomer(int $customerId, string $addressType, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\RemoveAddressFromCustomer($customerId, $addressType), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\RemoveAddressFromCustomer($customerId, $addressType), $fetch); } /** * Retrieves a `CustomerAddress` object @@ -273,39 +273,39 @@ public function removeAddressFromCustomer(int $customerId, string $addressType, */ public function getCustomerAddress(int $customerId, string $addressType, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerAddress($customerId, $addressType), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetCustomerAddress($customerId, $addressType), $fetch); } /** * Updates a customer address. Retrieves the updated `CustomerAddress` object * * @param int $customerId The customers id * @param string $addressType The customer address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchCustomerAddressBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchCustomerAddressNotFoundException * * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchCustomerAddress(int $customerId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchCustomerAddress(int $customerId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchCustomerAddress($customerId, $addressType, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchCustomerAddress($customerId, $addressType, $requestBody), $fetch); } /** * Updates a customer address. Retrieves the updated `CustomerAddress` object * * @param int $customerId The customers id * @param string $addressType The customer address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutCustomerAddressBadRequestException * @throws \Starweb\Api\Generated\Exception\PutCustomerAddressNotFoundException * * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem|\Psr\Http\Message\ResponseInterface */ - public function putCustomerAddress(int $customerId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putCustomerAddress(int $customerId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutCustomerAddress($customerId, $addressType, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutCustomerAddress($customerId, $addressType, $requestBody), $fetch); } /** * Returns a list of media file‚ @@ -319,20 +319,20 @@ public function putCustomerAddress(int $customerId, string $addressType, \Starwe */ public function getMediaFiles(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetMediaFiles($queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetMediaFiles($queryParameters), $fetch); } /** * Creates a new `Media File` object * - * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody + * @param null|\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateMediaFileBadRequestException * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface */ - public function createMediaFile(\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createMediaFile(?\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateMediaFile($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateMediaFile($requestBody), $fetch); } /** * Delete a media file permanently. @@ -345,7 +345,7 @@ public function createMediaFile(\Starweb\Api\Generated\Model\MediaFileUploadMode */ public function deleteMediaFile(int $mediaFileId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteMediaFile($mediaFileId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteMediaFile($mediaFileId), $fetch); } /** * Retrieve a `MediaFile` object @@ -358,37 +358,37 @@ public function deleteMediaFile(int $mediaFileId, string $fetch = self::FETCH_OB */ public function getMediaFile(int $mediaFileId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetMediaFile($mediaFileId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetMediaFile($mediaFileId), $fetch); } /** * Updates a media file. Retrieves the updated `MediaFile` object * * @param int $mediaFileId The media files id - * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody + * @param null|\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchMediaFileBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchMediaFileNotFoundException * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchMediaFile(int $mediaFileId, \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchMediaFile(int $mediaFileId, ?\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchMediaFile($mediaFileId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchMediaFile($mediaFileId, $requestBody), $fetch); } /** * Updates a media file. Retrieves the updated `MediaFile` object * * @param int $mediaFileId The media files id - * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody + * @param null|\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutMediaFileBadRequestException * @throws \Starweb\Api\Generated\Exception\PutMediaFileNotFoundException * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem|\Psr\Http\Message\ResponseInterface */ - public function putMediaFile(int $mediaFileId, \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putMediaFile(int $mediaFileId, ?\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutMediaFile($mediaFileId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutMediaFile($mediaFileId, $requestBody), $fetch); } /** * Returns a list of orders. @@ -413,20 +413,20 @@ public function putMediaFile(int $mediaFileId, \Starweb\Api\Generated\Model\Medi */ public function listOrders(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListOrders($queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListOrders($queryParameters), $fetch); } /** * Create an order. Retrieves the create `Order` object * - * @param \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateOrderBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface */ - public function createOrder(\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createOrder(?\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrder($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateOrder($requestBody), $fetch); } /** * Delete an order permanently @@ -439,7 +439,7 @@ public function createOrder(\Starweb\Api\Generated\Model\OrderUpdateModel $reque */ public function deleteOrder(int $orderId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrder($orderId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrder($orderId), $fetch); } /** * Retrieve an `Order` object @@ -455,37 +455,37 @@ public function deleteOrder(int $orderId, string $fetch = self::FETCH_OBJECT) */ public function getOrder(int $orderId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrder($orderId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrder($orderId, $queryParameters), $fetch); } /** * Updates an order. Retrieves the updated `Order` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchOrderBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchOrderNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchOrder(int $orderId, \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchOrder(int $orderId, ?\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrder($orderId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchOrder($orderId, $requestBody), $fetch); } /** * Updates an order. Retrieves the updated `Order` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderPutModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderPutModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutOrderBadRequestException * @throws \Starweb\Api\Generated\Exception\PutOrderNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderModelItem|\Psr\Http\Message\ResponseInterface */ - public function putOrder(int $orderId, \Starweb\Api\Generated\Model\OrderPutModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putOrder(int $orderId, ?\Starweb\Api\Generated\Model\OrderPutModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrder($orderId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutOrder($orderId, $requestBody), $fetch); } /** * Returns a list o order addresses @@ -497,7 +497,7 @@ public function putOrder(int $orderId, \Starweb\Api\Generated\Model\OrderPutMode */ public function listOrderAddresses(int $orderId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListOrderAddresses($orderId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListOrderAddresses($orderId), $fetch); } /** * Delete an order address permanently. @@ -511,7 +511,7 @@ public function listOrderAddresses(int $orderId, string $fetch = self::FETCH_OBJ */ public function deleteOrderAddress(int $orderId, string $addressType, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderAddress($orderId, $addressType), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderAddress($orderId, $addressType), $fetch); } /** * Retrieves the `OrderAddress` object @@ -525,39 +525,39 @@ public function deleteOrderAddress(int $orderId, string $addressType, string $fe */ public function getOrderAddress(int $orderId, string $addressType, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderAddress($orderId, $addressType), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderAddress($orderId, $addressType), $fetch); } /** * Updates an order adress. Retrieves the updated `OrderAddress` object * * @param int $orderId The orders id * @param string $addressType The order address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchOrderAddressBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchOrderAddressNotFoundException * * @return null|\Starweb\Api\Generated\Model\AddressModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchOrderAddress(int $orderId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchOrderAddress(int $orderId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderAddress($orderId, $addressType, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderAddress($orderId, $addressType, $requestBody), $fetch); } /** * Updates an order adress. Retrieves the updated `OrderAddress` object * * @param int $orderId The orders id * @param string $addressType The order address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutOrderAddressBadRequestException * @throws \Starweb\Api\Generated\Exception\PutOrderAddressNotFoundException * * @return null|\Starweb\Api\Generated\Model\AddressModelItem|\Psr\Http\Message\ResponseInterface */ - public function putOrderAddress(int $orderId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putOrderAddress(int $orderId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderAddress($orderId, $addressType, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutOrderAddress($orderId, $addressType, $requestBody), $fetch); } /** * Returns a list of order comments. @@ -569,21 +569,21 @@ public function putOrderAddress(int $orderId, string $addressType, \Starweb\Api\ */ public function getOrderComments(int $orderId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderComments($orderId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderComments($orderId), $fetch); } /** * Add a comment to an order. Retrieves the created `OrderComment` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderCommentModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\AddCommentToOrderBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface */ - public function addCommentToOrder(int $orderId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function addCommentToOrder(int $orderId, ?\Starweb\Api\Generated\Model\OrderCommentModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\AddCommentToOrder($orderId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\AddCommentToOrder($orderId, $requestBody), $fetch); } /** * Deletes an order comment permanently. @@ -597,7 +597,7 @@ public function addCommentToOrder(int $orderId, \Starweb\Api\Generated\Model\Ord */ public function removeCommentFromOrder(int $orderId, int $commentId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\RemoveCommentFromOrder($orderId, $commentId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\RemoveCommentFromOrder($orderId, $commentId), $fetch); } /** * Retrieves the `OrderComment` object @@ -611,37 +611,37 @@ public function removeCommentFromOrder(int $orderId, int $commentId, string $fet */ public function getOrderComment(int $orderId, int $commentId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderComment($orderId, $commentId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderComment($orderId, $commentId), $fetch); } /** * Update a comment for an order. Retrieves the created `OrderComment` object * * @param int $orderId The orders id * @param int $commentId The order comments id - * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderCommentModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchCommentToOrderBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchCommentToOrder(int $orderId, int $commentId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchCommentToOrder(int $orderId, int $commentId, ?\Starweb\Api\Generated\Model\OrderCommentModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchCommentToOrder($orderId, $commentId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchCommentToOrder($orderId, $commentId, $requestBody), $fetch); } /** * Update a comment for an order. Retrieves the created `OrderComment` object * * @param int $orderId The orders id * @param int $commentId The order comments id - * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderCommentModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\UpdateCommentToOrderBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem|\Psr\Http\Message\ResponseInterface */ - public function updateCommentToOrder(int $orderId, int $commentId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function updateCommentToOrder(int $orderId, int $commentId, ?\Starweb\Api\Generated\Model\OrderCommentModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\UpdateCommentToOrder($orderId, $commentId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\UpdateCommentToOrder($orderId, $commentId, $requestBody), $fetch); } /** * Returns a list of order external services. @@ -653,22 +653,22 @@ public function updateCommentToOrder(int $orderId, int $commentId, \Starweb\Api\ */ public function getOrderExternalServices(int $orderId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderExternalServices($orderId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderExternalServices($orderId), $fetch); } /** * Create an order external service. Retrieves the created `OrderExternalService` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateOrderExternalServiceBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface */ - public function createOrderExternalService(int $orderId, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createOrderExternalService(int $orderId, ?\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderExternalService($orderId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderExternalService($orderId, $requestBody), $fetch); } /** * Deletes an order external service permanently @@ -682,7 +682,7 @@ public function createOrderExternalService(int $orderId, \Starweb\Api\Generated\ */ public function deleteOrderExternalService(int $orderId, string $serviceName, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderExternalService($orderId, $serviceName), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderExternalService($orderId, $serviceName), $fetch); } /** * Retrieves the `OrderExternalService` object @@ -696,7 +696,7 @@ public function deleteOrderExternalService(int $orderId, string $serviceName, st */ public function getOrderExternalService(int $orderId, string $serviceName, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderExternalService($orderId, $serviceName), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderExternalService($orderId, $serviceName), $fetch); } /** * Updates an order external service. @@ -704,16 +704,16 @@ public function getOrderExternalService(int $orderId, string $serviceName, strin * * @param int $orderId The orders id * @param string $serviceName The service name - * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchOrderExternalServiceBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchOrderExternalServiceNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchOrderExternalService(int $orderId, string $serviceName, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchOrderExternalService(int $orderId, string $serviceName, ?\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderExternalService($orderId, $serviceName, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderExternalService($orderId, $serviceName, $requestBody), $fetch); } /** * Updates an order external service. @@ -721,16 +721,16 @@ public function patchOrderExternalService(int $orderId, string $serviceName, \St * * @param int $orderId The orders id * @param string $serviceName The service name - * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutOrderExternalServiceBadRequestException * @throws \Starweb\Api\Generated\Exception\PutOrderExternalServiceNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem|\Psr\Http\Message\ResponseInterface */ - public function putOrderExternalService(int $orderId, string $serviceName, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putOrderExternalService(int $orderId, string $serviceName, ?\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderExternalService($orderId, $serviceName, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutOrderExternalService($orderId, $serviceName, $requestBody), $fetch); } /** * Returns a list of order items @@ -742,21 +742,21 @@ public function putOrderExternalService(int $orderId, string $serviceName, \Star */ public function getOrderItems(int $orderId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItems($orderId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItems($orderId), $fetch); } /** * Create an order item. Retrieves the create `OrderItem` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderItemModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateOrderItemBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface */ - public function createOrderItem(int $orderId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createOrderItem(int $orderId, ?\Starweb\Api\Generated\Model\OrderItemModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderItem($orderId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderItem($orderId, $requestBody), $fetch); } /** * Delete the order item permanently. @@ -770,7 +770,7 @@ public function createOrderItem(int $orderId, \Starweb\Api\Generated\Model\Order */ public function deleteOrderItem(int $orderId, int $orderItemId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderItem($orderId, $orderItemId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderItem($orderId, $orderItemId), $fetch); } /** * Retrieves the `OrderItem` object @@ -787,39 +787,39 @@ public function deleteOrderItem(int $orderId, int $orderItemId, string $fetch = */ public function getOrderItem(int $orderId, int $orderItemId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItem($orderId, $orderItemId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderItem($orderId, $orderItemId, $queryParameters), $fetch); } /** * Updates an order item. Retrieves the updated `OrderItem` object * * @param int $orderId The orders id * @param int $orderItemId The order item id - * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderItemModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchOrderItemBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchOrderItemNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchOrderItem(int $orderId, int $orderItemId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchOrderItem(int $orderId, int $orderItemId, ?\Starweb\Api\Generated\Model\OrderItemModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderItem($orderId, $orderItemId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderItem($orderId, $orderItemId, $requestBody), $fetch); } /** * Updates an order item. Retrieves the updated `OrderItem` object * * @param int $orderId The orders id * @param int $orderItemId The order item id - * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderItemModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutOrderItemBadRequestException * @throws \Starweb\Api\Generated\Exception\PutOrderItemNotFoundException * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem|\Psr\Http\Message\ResponseInterface */ - public function putOrderItem(int $orderId, int $orderItemId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putOrderItem(int $orderId, int $orderItemId, ?\Starweb\Api\Generated\Model\OrderItemModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderItem($orderId, $orderItemId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutOrderItem($orderId, $orderItemId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -828,20 +828,20 @@ public function putOrderItem(int $orderId, int $orderItemId, \Starweb\Api\Genera */ public function getOrderStatuses(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderStatuses(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderStatuses(), $fetch); } /** * Create an order status. Retrieves the created `OrderStatus` object * - * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderStatusModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateOrderStatusBadRequestException * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function createOrderStatus(\Starweb\Api\Generated\Model\OrderStatusModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createOrderStatus(?\Starweb\Api\Generated\Model\OrderStatusModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderStatus($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateOrderStatus($requestBody), $fetch); } /** * Deletes an order status. Retrieves the updated `OrderItem` object. @@ -856,7 +856,7 @@ public function createOrderStatus(\Starweb\Api\Generated\Model\OrderStatusModel */ public function deleteOrderStatus(int $orderStatusId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderStatus($orderStatusId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteOrderStatus($orderStatusId), $fetch); } /** * Retrieves the `OrderStatus` object @@ -869,14 +869,14 @@ public function deleteOrderStatus(int $orderStatusId, string $fetch = self::FETC */ public function getOrderStatus(int $orderStatusId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetOrderStatus($orderStatusId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetOrderStatus($orderStatusId), $fetch); } /** * Updates an order status. Retrieves the updated `Orderstatus` object. NB! You are not allowed to update standard order statuses (all statuses with an idCode set) * * @param int $orderStatusId The order status id - * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderStatusModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchOrderStatusBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchOrderStatusForbiddenException @@ -884,16 +884,16 @@ public function getOrderStatus(int $orderStatusId, string $fetch = self::FETCH_O * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchOrderStatus(int $orderStatusId, \Starweb\Api\Generated\Model\OrderStatusModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchOrderStatus(int $orderStatusId, ?\Starweb\Api\Generated\Model\OrderStatusModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderStatus($orderStatusId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchOrderStatus($orderStatusId, $requestBody), $fetch); } /** * Updates an order status. Retrieves the updated `Orderstatus` object. NB! You are not allowed to update standard order statuses (all statuses with an idCode set) * * @param int $orderStatusId The order status id - * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderStatusModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutOrderStatusBadRequestException * @throws \Starweb\Api\Generated\Exception\PutOrderStatusForbiddenException @@ -901,9 +901,9 @@ public function patchOrderStatus(int $orderStatusId, \Starweb\Api\Generated\Mode * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function putOrderStatus(int $orderStatusId, \Starweb\Api\Generated\Model\OrderStatusModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putOrderStatus(int $orderStatusId, ?\Starweb\Api\Generated\Model\OrderStatusModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutOrderStatus($orderStatusId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutOrderStatus($orderStatusId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -912,7 +912,7 @@ public function putOrderStatus(int $orderStatusId, \Starweb\Api\Generated\Model\ */ public function getPaymentMethods(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPaymentMethods(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetPaymentMethods(), $fetch); } /** * Retrieves a `PaymentMethod` object @@ -925,7 +925,7 @@ public function getPaymentMethods(string $fetch = self::FETCH_OBJECT) */ public function getPaymentMethod(int $paymentMethodId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPaymentMethod($paymentMethodId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetPaymentMethod($paymentMethodId), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -934,20 +934,20 @@ public function getPaymentMethod(int $paymentMethodId, string $fetch = self::FET */ public function getPricelists(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPricelists(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetPricelists(), $fetch); } /** * Create a pricelist. Retrieves the created `Pricelist` object * - * @param mixed $requestBody + * @param null|mixed $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreatePricelistBadRequestException * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface */ - public function createPricelist($requestBody, string $fetch = self::FETCH_OBJECT) + public function createPricelist($requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreatePricelist($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreatePricelist($requestBody), $fetch); } /** * Delete a pricelist permanently. The master pricelist can not be deleted and will return an error `403` @@ -961,7 +961,7 @@ public function createPricelist($requestBody, string $fetch = self::FETCH_OBJECT */ public function deletePricelist(int $pricelistId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeletePricelist($pricelistId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeletePricelist($pricelistId), $fetch); } /** * Retrieves a `Pricelist` object @@ -974,37 +974,37 @@ public function deletePricelist(int $pricelistId, string $fetch = self::FETCH_OB */ public function getPricelist(int $pricelistId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetPricelist($pricelistId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetPricelist($pricelistId), $fetch); } /** * Update a pricelist. Retrieves the updated `Pricelist` object * * @param int $pricelistId The pricelist id - * @param mixed $requestBody + * @param null|mixed $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchPricelistBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchPricelistNotFoundException * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchPricelist(int $pricelistId, $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchPricelist(int $pricelistId, $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchPricelist($pricelistId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchPricelist($pricelistId, $requestBody), $fetch); } /** * Update a pricelist. Retrieves the updated `Pricelist` object * * @param int $pricelistId The pricelist id - * @param mixed $requestBody + * @param null|mixed $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutPricelistBadRequestException * @throws \Starweb\Api\Generated\Exception\PutPricelistNotFoundException * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem|\Psr\Http\Message\ResponseInterface */ - public function putPricelist(int $pricelistId, $requestBody, string $fetch = self::FETCH_OBJECT) + public function putPricelist(int $pricelistId, $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutPricelist($pricelistId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutPricelist($pricelistId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1014,7 +1014,7 @@ public function putPricelist(int $pricelistId, $requestBody, string $fetch = sel */ public function listVatRates(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListVatRates(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListVatRates(), $fetch); } /** * Retrieves the `VatRate` object. @@ -1027,7 +1027,7 @@ public function listVatRates(string $fetch = self::FETCH_OBJECT) */ public function getVatRate(string $countryCode, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetVatRate($countryCode), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetVatRate($countryCode), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1037,21 +1037,21 @@ public function getVatRate(string $countryCode, string $fetch = self::FETCH_OBJE */ public function listProductsVariantsAttributes(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsAttributes(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsAttributes(), $fetch); } /** * Creates a product variant attribute. Retrieves the created `ProductVariantAttribute` object. * - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateAttributeBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface */ - public function createAttribute(\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createAttribute(?\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateAttribute($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateAttribute($requestBody), $fetch); } /** * Deletes the product variant attribute permanently. @@ -1064,7 +1064,7 @@ public function createAttribute(\Starweb\Api\Generated\Model\ProductVariantAttri */ public function deleteAttribute(int $attributeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteAttribute($attributeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteAttribute($attributeId), $fetch); } /** * Retrieves the `ProductVariantAttribute` object. @@ -1077,37 +1077,37 @@ public function deleteAttribute(int $attributeId, string $fetch = self::FETCH_OB */ public function getProductsVariantsAttribute(int $attributeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsAttribute($attributeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsAttribute($attributeId), $fetch); } /** * Updates a product variant attribute. Retrieves the updated `ProductVariantAttribute` object. * * @param int $attributeId The attribute value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchAttributeBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchAttribute(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchAttribute(int $attributeId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchAttribute($attributeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchAttribute($attributeId, $requestBody), $fetch); } /** * Updates a product variant attribute. Retrieves the updated `ProductVariantAttribute` object. * * @param int $attributeId The attribute value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutAttributeBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem|\Psr\Http\Message\ResponseInterface */ - public function putAttribute(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putAttribute(int $attributeId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutAttribute($attributeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutAttribute($attributeId, $requestBody), $fetch); } /** * Returns a list of product variant attribute values. @@ -1123,22 +1123,22 @@ public function putAttribute(int $attributeId, \Starweb\Api\Generated\Model\Prod */ public function listProductsVariantsAttributeValues(int $attributeId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsAttributeValues($attributeId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsAttributeValues($attributeId, $queryParameters), $fetch); } /** * Creates a product variant attribute value. Retrieves the created `ProductVariantAttributeValue` object. * * @param int $attributeId The attribute id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductsVariantsAttributeValues(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductsVariantsAttributeValues(int $attributeId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsVariantsAttributeValues($attributeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsVariantsAttributeValues($attributeId, $requestBody), $fetch); } /** * Delete a product variant attribute value permanently. @@ -1152,7 +1152,7 @@ public function createProductsVariantsAttributeValues(int $attributeId, \Starweb */ public function deleteAttributeValue(int $attributeId, int $attributeValueId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteAttributeValue($attributeId, $attributeValueId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteAttributeValue($attributeId, $attributeValueId), $fetch); } /** * Retrieves the `ProductVariantAttributeValue` object. @@ -1169,7 +1169,7 @@ public function deleteAttributeValue(int $attributeId, int $attributeValueId, st */ public function getProductsVariantsAttributeValue(int $attributeId, int $attributeValueId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsAttributeValue($attributeId, $attributeValueId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsAttributeValue($attributeId, $attributeValueId, $queryParameters), $fetch); } /** * Updates a product variant attribute value. @@ -1177,15 +1177,15 @@ public function getProductsVariantsAttributeValue(int $attributeId, int $attribu * * @param int $attributeId The attribute id * @param int $attributeValueId The attribe value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsAttributeValues($attributeId, $attributeValueId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsAttributeValues($attributeId, $attributeValueId, $requestBody), $fetch); } /** * Updates a product variant attribute value. @@ -1193,15 +1193,15 @@ public function patchProductsVariantsAttributeValues(int $attributeId, int $attr * * @param int $attributeId The attribute id * @param int $attributeValueId The attribe value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsVariantsAttributeValues(int $attributeId, int $attributeValueId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsAttributeValues($attributeId, $attributeValueId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsAttributeValues($attributeId, $attributeValueId, $requestBody), $fetch); } /** * Returns a list of product categories @@ -1220,20 +1220,20 @@ public function putProductsVariantsAttributeValues(int $attributeId, int $attrib */ public function listProductCategories(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductCategories($queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductCategories($queryParameters), $fetch); } /** * Create a product category. Retrieves the created `ProductCategory` object * - * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductCategoryBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductCategory(\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductCategory(?\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductCategory($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductCategory($requestBody), $fetch); } /** * Delete a product category permanently @@ -1246,7 +1246,7 @@ public function createProductCategory(\Starweb\Api\Generated\Model\ProductCatego */ public function deleteProductCategory(int $categoryId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductCategory($categoryId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductCategory($categoryId), $fetch); } /** * Retrieves a `ProductCategory` object @@ -1262,37 +1262,37 @@ public function deleteProductCategory(int $categoryId, string $fetch = self::FET */ public function getProductCategory(int $categoryId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductCategory($categoryId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductCategory($categoryId, $queryParameters), $fetch); } /** * Update a product category. Retrieves the updated `ProductCategory` object * * @param int $categoryId The product category id - * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductCategoryBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductCategoryNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductCategory(int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductCategory(int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductCategory($categoryId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductCategory($categoryId, $requestBody), $fetch); } /** * Update a product category. Retrieves the updated `ProductCategory` object * * @param int $categoryId The product category id - * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductCategoryBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductCategoryNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductCategory(int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductCategory(int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductCategory($categoryId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductCategory($categoryId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1302,20 +1302,20 @@ public function putProductCategory(int $categoryId, \Starweb\Api\Generated\Model */ public function listProductManufacturers(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductManufacturers(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductManufacturers(), $fetch); } /** * Creates a product manufacturer. * - * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductManufacturerBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductManufacturer(\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductManufacturer(?\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturer($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturer($requestBody), $fetch); } /** * Deletes the `ProductManufacturer` object. @@ -1328,7 +1328,7 @@ public function createProductManufacturer(\Starweb\Api\Generated\Model\ProductMa */ public function deleteProductManufacturer(int $manufacturerId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductManufacturer($manufacturerId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductManufacturer($manufacturerId), $fetch); } /** * Retrieves the `ProductManufacturer` object. @@ -1341,35 +1341,35 @@ public function deleteProductManufacturer(int $manufacturerId, string $fetch = s */ public function getProductManufacturer(int $manufacturerId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductManufacturer($manufacturerId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductManufacturer($manufacturerId), $fetch); } /** * Updates the `ProductManufacturer` object. * * @param int $manufacturerId The manufacturers id - * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductManufacturerNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductManufacturer(int $manufacturerId, \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductManufacturer(int $manufacturerId, ?\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductManufacturer($manufacturerId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductManufacturer($manufacturerId, $requestBody), $fetch); } /** * Updates the `ProductManufacturer` object. * * @param int $manufacturerId The manufacturers id - * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductManufacturerNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductManufacturer(int $manufacturerId, \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductManufacturer(int $manufacturerId, ?\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductManufacturer($manufacturerId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductManufacturer($manufacturerId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1379,20 +1379,20 @@ public function putProductManufacturer(int $manufacturerId, \Starweb\Api\Generat */ public function listProductUnits(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductUnits(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductUnits(), $fetch); } /** * Creates a product unit. * - * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductUnit(\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductUnit(?\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductUnit($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductUnit($requestBody), $fetch); } /** * Deletes the `ProductUnit` object. @@ -1405,7 +1405,7 @@ public function createProductUnit(\Starweb\Api\Generated\Model\ProductUnitModelU */ public function deleteProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductUnit($unitId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductUnit($unitId), $fetch); } /** * Retrieves the `ProductUnit` object. @@ -1418,35 +1418,35 @@ public function deleteProductUnit(int $unitId, string $fetch = self::FETCH_OBJEC */ public function getProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductUnit($unitId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductUnit($unitId), $fetch); } /** * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductUnit(int $unitId, ?\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductUnit($unitId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductUnit($unitId, $requestBody), $fetch); } /** * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductUnit(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductUnit(int $unitId, ?\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductUnit($unitId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductUnit($unitId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1456,20 +1456,20 @@ public function putProductUnit(int $unitId, \Starweb\Api\Generated\Model\Product */ public function listProductMetaDataTypes(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductMetaDataTypes(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductMetaDataTypes(), $fetch); } /** * Create a product meta data type. Retrieves the created `ProductMetaDataType` object * - * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductMetaDataTypeBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductMetaDataType(\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductMetaDataType(?\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductMetaDataType($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductMetaDataType($requestBody), $fetch); } /** * Delete a product meta data type permanently @@ -1482,7 +1482,7 @@ public function createProductMetaDataType(\Starweb\Api\Generated\Model\ProductMe */ public function deleteProductMetaDataType(int $metaDataTypeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductMetaDataType($metaDataTypeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductMetaDataType($metaDataTypeId), $fetch); } /** * Retrieves the `ProductMetaDataType` object. @@ -1495,37 +1495,37 @@ public function deleteProductMetaDataType(int $metaDataTypeId, string $fetch = s */ public function getProductMetaDataType(int $metaDataTypeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductMetaDataType($metaDataTypeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductMetaDataType($metaDataTypeId), $fetch); } /** * Update a product meta data type. Retrieves the updated `ProductMetaDataType` object * * @param int $metaDataTypeId The meta data types id - * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductMetaDataType(int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductMetaDataType(int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductMetaDataType($metaDataTypeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductMetaDataType($metaDataTypeId, $requestBody), $fetch); } /** * Update a product meta data type. Retrieves the updated `ProductMetaDataType` object * * @param int $metaDataTypeId The meta data types id - * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductMetaDataTypeBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductMetaDataTypeNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductMetaDataType(int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductMetaDataType(int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductMetaDataType($metaDataTypeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductMetaDataType($metaDataTypeId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1535,20 +1535,20 @@ public function putProductMetaDataType(int $metaDataTypeId, \Starweb\Api\Generat */ public function listProductStockStatses(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductStockStatses(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductStockStatses(), $fetch); } /** * Create a product stock status. Retrieves the created `ProductStockStatus` object. * - * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductStockStatusBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductStockStatus(\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductStockStatus(?\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductStockStatus($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductStockStatus($requestBody), $fetch); } /** * Deletes a product stock status permanently. @@ -1561,7 +1561,7 @@ public function createProductStockStatus(\Starweb\Api\Generated\Model\ProductSto */ public function deleteProductStockStatus(int $stockStatusId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductStockStatus($stockStatusId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductStockStatus($stockStatusId), $fetch); } /** * Retrieves the `ProductStockStatus` object. @@ -1574,37 +1574,37 @@ public function deleteProductStockStatus(int $stockStatusId, string $fetch = sel */ public function getProductStockStatus(int $stockStatusId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductStockStatus($stockStatusId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductStockStatus($stockStatusId), $fetch); } /** * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductStockStatusBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductStockStatusNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductStockStatus(int $stockStatusId, ?\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductStockStatus($stockStatusId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductStockStatus($stockStatusId, $requestBody), $fetch); } /** * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductStockStatusBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductStockStatusNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductStockStatus(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductStockStatus(int $stockStatusId, ?\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductStockStatus($stockStatusId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductStockStatus($stockStatusId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1613,20 +1613,20 @@ public function putProductStockStatus(int $stockStatusId, \Starweb\Api\Generated */ public function getProductsTags(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTags(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTags(), $fetch); } /** * Creates a `ProductTag` object * - * @param \Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductTagBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductTag(\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductTag(?\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTag($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTag($requestBody), $fetch); } /** * Delete a product tag permanently @@ -1639,7 +1639,7 @@ public function createProductTag(\Starweb\Api\Generated\Model\ProductTagPostRequ */ public function deleteProductTag(int $productTagId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTag($productTagId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTag($productTagId), $fetch); } /** * Retrieves a `Tag` object @@ -1652,37 +1652,37 @@ public function deleteProductTag(int $productTagId, string $fetch = self::FETCH_ */ public function getProductsTag(int $productTagId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTag($productTagId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTag($productTagId), $fetch); } /** * Partially updates a product tag. Retrieves the updated `ProductTag` object * * @param int $productTagId The product tag id - * @param \Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductTagBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductTagNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductTag(int $productTagId, \Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductTag(int $productTagId, ?\Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductTag($productTagId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductTag($productTagId, $requestBody), $fetch); } /** * Update a product tag. Retrieves the updated `ProductTag` object * * @param int $productTagId The product tag id - * @param \Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductTagBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductTagNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductTag(int $productTagId, \Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductTag(int $productTagId, ?\Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductTag($productTagId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductTag($productTagId, $requestBody), $fetch); } /** * Returns a list of options @@ -1694,22 +1694,22 @@ public function putProductTag(int $productTagId, \Starweb\Api\Generated\Model\Pr */ public function getProductsTagOptions(int $productTagId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTagOptions($productTagId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsTagOptions($productTagId), $fetch); } /** * Create a tag option. Tag options can only be created for tags of type `option`. If you try to create options for a tag of type `boolean` an error `405` will be returned. Returns the created `ProductTagOption` object. * * @param int $productTagId The product tag id - * @param \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductTagOptionBadRequestException * @throws \Starweb\Api\Generated\Exception\CreateProductTagOptionMethodNotAllowedException * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductTagOption(int $productTagId, \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductTagOption(int $productTagId, ?\Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTagOption($productTagId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTagOption($productTagId, $requestBody), $fetch); } /** * Delete a tag option permanently. Tag options can only be deleted for tags of type `option`. If you try to delete a tag option for a tag of any other type an error `405` will be returned. @@ -1724,7 +1724,7 @@ public function createProductTagOption(int $productTagId, \Starweb\Api\Generated */ public function deleteProductTagOption(int $productTagId, int $productTagOptionId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTagOption($productTagId, $productTagOptionId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTagOption($productTagId, $productTagOptionId), $fetch); } /** * Retrieves a `TagOption` object @@ -1738,14 +1738,14 @@ public function deleteProductTagOption(int $productTagId, int $productTagOptionI */ public function getProductTagOptions(int $productTagId, int $productTagOptionId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductTagOptions($productTagId, $productTagOptionId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductTagOptions($productTagId, $productTagOptionId), $fetch); } /** * Partially updates a tag option. Tag options can only be updates for tags of type `option`. If you try to update a tag option for a tag of any other type an error `405` will be returned. Returns the updated `ProductTagOption` object. * * @param int $productTagId The product tag id * @param int $productTagOptionId The product tag option id - * @param \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductTagOptionBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductTagOptionNotFoundException @@ -1753,16 +1753,16 @@ public function getProductTagOptions(int $productTagId, int $productTagOptionId, * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductTagOption(int $productTagId, int $productTagOptionId, \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductTagOption(int $productTagId, int $productTagOptionId, ?\Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductTagOption($productTagId, $productTagOptionId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductTagOption($productTagId, $productTagOptionId, $requestBody), $fetch); } /** * Update a tag option. Tag options can only be updated for tags of type `option`. If you try to update a tag option for a tag of any other type an error `405` will be returned. Returns the updated `ProductTagOption` object. * * @param int $productTagId The product tag id * @param int $productTagOptionId The product tag option id - * @param \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductTagOptionBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductTagOptionNotFoundException @@ -1770,9 +1770,9 @@ public function patchProductTagOption(int $productTagId, int $productTagOptionId * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductTagOption(int $productTagId, int $productTagOptionId, \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductTagOption(int $productTagId, int $productTagOptionId, ?\Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductTagOption($productTagId, $productTagOptionId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductTagOption($productTagId, $productTagOptionId, $requestBody), $fetch); } /** * Returns a list of products. @@ -1794,20 +1794,20 @@ public function putProductTagOption(int $productTagId, int $productTagOptionId, */ public function listProducts(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProducts($queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProducts($queryParameters), $fetch); } /** * Creates a product. Retrieves the created `Product` object. * - * @param \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProduct(\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProduct(?\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProduct($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProduct($requestBody), $fetch); } /** * Deletes a product permanently. @@ -1820,7 +1820,7 @@ public function createProduct(\Starweb\Api\Generated\Model\ProductModelUpdatable */ public function deleteProduct(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProduct($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProduct($productId), $fetch); } /** * Retrieves the `Product` object. @@ -1836,37 +1836,37 @@ public function deleteProduct(int $productId, string $fetch = self::FETCH_OBJECT */ public function getProduct(int $productId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProduct($productId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProduct($productId, $queryParameters), $fetch); } /** * Updates a product. Retrieves the update `Product` object. * * @param int $productId The product id - * @param \Starweb\Api\Generated\Model\ProductModelPatchable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductModelPatchable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProduct(int $productId, \Starweb\Api\Generated\Model\ProductModelPatchable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProduct(int $productId, ?\Starweb\Api\Generated\Model\ProductModelPatchable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProduct($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProduct($productId, $requestBody), $fetch); } /** * Updates a product. Retrieves the update `Product` object. * * @param int $productId The product id - * @param \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProduct(int $productId, \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProduct(int $productId, ?\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProduct($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProduct($productId, $requestBody), $fetch); } /** * Return a list of bundled products. @@ -1883,21 +1883,21 @@ public function putProduct(int $productId, \Starweb\Api\Generated\Model\ProductM */ public function listProductsBundledProducts(int $productId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsBundledProducts($productId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsBundledProducts($productId, $queryParameters), $fetch); } /** * Creates a bundled product. Retrieves the created `BundledProduct` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody + * @param null|\Starweb\Api\Generated\Model\BundledProductsModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductBundledProductBadRequestException * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductBundledProduct(int $productId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductBundledProduct(int $productId, ?\Starweb\Api\Generated\Model\BundledProductsModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductBundledProduct($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductBundledProduct($productId, $requestBody), $fetch); } /** * Deletes a bundled product permanently. @@ -1911,7 +1911,7 @@ public function createProductBundledProduct(int $productId, \Starweb\Api\Generat */ public function deleteProductsBundledProduct(int $productId, int $bundledProductId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsBundledProduct($productId, $bundledProductId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsBundledProduct($productId, $bundledProductId), $fetch); } /** * Retrieves the `BundledProduct` object @@ -1928,39 +1928,39 @@ public function deleteProductsBundledProduct(int $productId, int $bundledProduct */ public function getProductsBundledProducts(int $productId, int $bundledProductId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsBundledProducts($productId, $bundledProductId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsBundledProducts($productId, $bundledProductId, $queryParameters), $fetch); } /** * Updates a bundled product. Retrieves the updated `BundledProduct` object * * @param int $productId The product id * @param int $bundledProductId The bundled products id - * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody + * @param null|\Starweb\Api\Generated\Model\BundledProductsModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsBundledProductBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsBundledProductNotFoundException * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsBundledProduct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsBundledProduct(int $productId, int $bundledProductId, ?\Starweb\Api\Generated\Model\BundledProductsModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsBundledProduct($productId, $bundledProductId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsBundledProduct($productId, $bundledProductId, $requestBody), $fetch); } /** * Updates a bundled product. Retrieves the updated `BundledProduct` object * * @param int $productId The product id * @param int $bundledProductId The bundled products id - * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody + * @param null|\Starweb\Api\Generated\Model\BundledProductsModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsBundledProductBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsBundledProductNotFoundException * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsBundledProduct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsBundledProduct(int $productId, int $bundledProductId, ?\Starweb\Api\Generated\Model\BundledProductsModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsBundledProduct($productId, $bundledProductId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsBundledProduct($productId, $bundledProductId, $requestBody), $fetch); } /** * Return a list of product variants. @@ -1977,21 +1977,21 @@ public function putProductsBundledProduct(int $productId, int $bundledProductId, */ public function listProductsVariants(int $productId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariants($productId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariants($productId, $queryParameters), $fetch); } /** * Creates a product variant. Retrieves the created `ProductVariant` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductVariantBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductVariant(int $productId, \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductVariant(int $productId, ?\Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariant($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariant($productId, $requestBody), $fetch); } /** * Deletes a product variant permanently. @@ -2005,7 +2005,7 @@ public function createProductVariant(int $productId, \Starweb\Api\Generated\Mode */ public function deleteProductsVariant(int $productId, int $variantId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariant($productId, $variantId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariant($productId, $variantId), $fetch); } /** * Retrieves the `ProductVariant` object @@ -2022,39 +2022,39 @@ public function deleteProductsVariant(int $productId, int $variantId, string $fe */ public function getProductsVariant(int $productId, int $variantId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariant($productId, $variantId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariant($productId, $variantId, $queryParameters), $fetch); } /** * Updates a product variant. Retrieves the updated `ProductVariant` object * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsVariant(int $productId, int $variantId, ?\Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariant($productId, $variantId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariant($productId, $variantId, $requestBody), $fetch); } /** * Updates a product variant. Retrieves the updated `ProductVariant` object * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVariantBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsVariantNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVariant(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsVariant(int $productId, int $variantId, ?\Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariant($productId, $variantId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariant($productId, $variantId, $requestBody), $fetch); } /** * Returns a list of product vat rates. @@ -2067,21 +2067,21 @@ public function putProductsVariant(int $productId, int $variantId, \Starweb\Api\ */ public function listProductsVatRates(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVatRates($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVatRates($productId), $fetch); } /** * Creates a product vat rate. Retrieves the create `ProductVatRate` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductVatRateBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductVatRate(int $productId, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductVatRate(int $productId, ?\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVatRate($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVatRate($productId, $requestBody), $fetch); } /** * Deletes the product vat rate permanently. @@ -2095,7 +2095,7 @@ public function createProductVatRate(int $productId, \Starweb\Api\Generated\Mode */ public function deleteProductsVatRate(int $productId, string $countryCode, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVatRate($productId, $countryCode), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVatRate($productId, $countryCode), $fetch); } /** * Retrieves the `ProductVatRate` object. @@ -2109,39 +2109,39 @@ public function deleteProductsVatRate(int $productId, string $countryCode, strin */ public function getProductsVatRate(int $productId, string $countryCode, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVatRate($productId, $countryCode), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVatRate($productId, $countryCode), $fetch); } /** * Updates a product vat rate. Retrieves the update `ProductVatRate` object. * * @param int $productId The product id * @param string $countryCode The country code for the vat rate to fetch/manipulate - * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVatRateBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsVatRateNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVatRate(int $productId, string $countryCode, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsVatRate(int $productId, string $countryCode, ?\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVatRate($productId, $countryCode, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVatRate($productId, $countryCode, $requestBody), $fetch); } /** * Updates a product vat rate. Retrieves the update `ProductVatRate` object. * * @param int $productId The product id * @param string $countryCode The country code for the vat rate to fetch/manipulate - * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVatRateBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsVatRateNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVatRate(int $productId, string $countryCode, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsVatRate(int $productId, string $countryCode, ?\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVatRate($productId, $countryCode, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVatRate($productId, $countryCode, $requestBody), $fetch); } /** * Returns a list of product media file links. @@ -2154,22 +2154,22 @@ public function putProductsVatRate(int $productId, string $countryCode, \Starweb */ public function listProductsMediaFileLinks(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsMediaFileLinks($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsMediaFileLinks($productId), $fetch); } /** * Creates a product media file link. Retrieves the create `ProductMediaFileLink` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductsMediaFileLinkBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductsMediaFileLink(int $productId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductsMediaFileLink(int $productId, ?\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsMediaFileLink($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsMediaFileLink($productId, $requestBody), $fetch); } /** * Deletes the product media file link permanently. @@ -2183,7 +2183,7 @@ public function createProductsMediaFileLink(int $productId, \Starweb\Api\Generat */ public function deleteProductsMediaFileLink(int $productId, int $mediaFileId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsMediaFileLink($productId, $mediaFileId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsMediaFileLink($productId, $mediaFileId), $fetch); } /** * Retrieves the `ProductMediaFileLink` object. @@ -2197,7 +2197,7 @@ public function deleteProductsMediaFileLink(int $productId, int $mediaFileId, st */ public function getProductsMediaFileLink(int $productId, int $mediaFileId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsMediaFileLink($productId, $mediaFileId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsMediaFileLink($productId, $mediaFileId), $fetch); } /** * Updates a product media file link. @@ -2205,16 +2205,16 @@ public function getProductsMediaFileLink(int $productId, int $mediaFileId, strin * * @param int $productId The product id * @param int $mediaFileId The media file id of the link you want to fetch/change - * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsMediaFileLink(int $productId, int $mediaFileId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsMediaFileLink(int $productId, int $mediaFileId, ?\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsMediaFileLink($productId, $mediaFileId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsMediaFileLink($productId, $mediaFileId, $requestBody), $fetch); } /** * Updates a product media file link. @@ -2222,16 +2222,16 @@ public function patchProductsMediaFileLink(int $productId, int $mediaFileId, \St * * @param int $productId The product id * @param int $mediaFileId The media file id of the link you want to fetch/change - * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsMediaFileLink(int $productId, int $mediaFileId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsMediaFileLink(int $productId, int $mediaFileId, ?\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsMediaFileLink($productId, $mediaFileId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsMediaFileLink($productId, $mediaFileId, $requestBody), $fetch); } /** * Returns a list of product languages. @@ -2244,21 +2244,21 @@ public function putProductsMediaFileLink(int $productId, int $mediaFileId, \Star */ public function listProductsLanguages(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsLanguages($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsLanguages($productId), $fetch); } /** * Create a product language. Retrieves the created `ProductLanguage` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductsLanguageBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductsLanguage(int $productId, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductsLanguage(int $productId, ?\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsLanguage($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsLanguage($productId, $requestBody), $fetch); } /** * Delete a product language permanently. @@ -2272,7 +2272,7 @@ public function createProductsLanguage(int $productId, \Starweb\Api\Generated\Mo */ public function deleteProductsLanguage(int $productId, string $langCode, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsLanguage($productId, $langCode), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsLanguage($productId, $langCode), $fetch); } /** * Retrieves the `ProductLanguage` object. @@ -2286,39 +2286,39 @@ public function deleteProductsLanguage(int $productId, string $langCode, string */ public function getProductsLanguage(int $productId, string $langCode, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsLanguage($productId, $langCode), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsLanguage($productId, $langCode), $fetch); } /** * Update a product language. Retrieves the update `ProductLanguage` object. * * @param int $productId The product id * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es - * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsLanguageBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsLanguageNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsLanguage(int $productId, string $langCode, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsLanguage(int $productId, string $langCode, ?\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsLanguage($productId, $langCode, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsLanguage($productId, $langCode, $requestBody), $fetch); } /** * Update a product language. Retrieves the update `ProductLanguage` object. * * @param int $productId The product id * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es - * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsLanguageBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsLanguageNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsLanguage(int $productId, string $langCode, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsLanguage(int $productId, string $langCode, ?\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsLanguage($productId, $langCode, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsLanguage($productId, $langCode, $requestBody), $fetch); } /** * Returns a list of product category links. @@ -2331,21 +2331,21 @@ public function putProductsLanguage(int $productId, string $langCode, \Starweb\A */ public function listProductsCategoryLinks(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsCategoryLinks($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsCategoryLinks($productId), $fetch); } /** * Retrieves the created `ProductCategoryLink` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductsCategoryLinkBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductsCategoryLink(int $productId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductsCategoryLink(int $productId, ?\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsCategoryLink($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsCategoryLink($productId, $requestBody), $fetch); } /** * Delete a product category link permanently. @@ -2359,7 +2359,7 @@ public function createProductsCategoryLink(int $productId, \Starweb\Api\Generate */ public function deleteProductsCategoryLink(int $productId, int $categoryId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsCategoryLink($productId, $categoryId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsCategoryLink($productId, $categoryId), $fetch); } /** * Retrieves the `ProductCategoryLink` object @@ -2373,39 +2373,39 @@ public function deleteProductsCategoryLink(int $productId, int $categoryId, stri */ public function getProductsCategoryLink(int $productId, int $categoryId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsCategoryLink($productId, $categoryId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsCategoryLink($productId, $categoryId), $fetch); } /** * Update a product category link. Retrieves the update `ProductCategoryLink` object. * * @param int $productId The product id * @param int $categoryId The category id - * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsCategoryLink(int $productId, int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsCategoryLink(int $productId, int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsCategoryLink($productId, $categoryId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsCategoryLink($productId, $categoryId, $requestBody), $fetch); } /** * Update a product category link. Retrieves the update `ProductCategoryLink` object. * * @param int $productId The product id * @param int $categoryId The category id - * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsCategoryLinkBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsCategoryLinkNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsCategoryLink(int $productId, int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsCategoryLink(int $productId, int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsCategoryLink($productId, $categoryId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsCategoryLink($productId, $categoryId, $requestBody), $fetch); } /** * Returns a list of product meta data. @@ -2418,21 +2418,21 @@ public function putProductsCategoryLink(int $productId, int $categoryId, \Starwe */ public function listProductsMetaData(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsMetaData($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsMetaData($productId), $fetch); } /** * Deprecated: use the [putProductsMetaData](#operation/putProductsMetaData) operation to create a new product meta data for the `metaDataTypeId` instead. Creates a product meta data. Retrieves the created `ProductMetaData` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductsMetaDataBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductsMetaData(int $productId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductsMetaData(int $productId, ?\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsMetaData($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductsMetaData($productId, $requestBody), $fetch); } /** * Deletes a product meta data permanently. @@ -2446,7 +2446,7 @@ public function createProductsMetaData(int $productId, \Starweb\Api\Generated\Mo */ public function deleteProductsMetaData(int $productId, int $metaDataTypeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsMetaData($productId, $metaDataTypeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsMetaData($productId, $metaDataTypeId), $fetch); } /** * Retrieves the `ProductMetaData` object. @@ -2460,39 +2460,39 @@ public function deleteProductsMetaData(int $productId, int $metaDataTypeId, stri */ public function getProductsMetaData(int $productId, int $metaDataTypeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsMetaData($productId, $metaDataTypeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsMetaData($productId, $metaDataTypeId), $fetch); } /** * Updates a product meta data. Retrieves the update `ProductMetaData` object. * * @param int $productId The product id * @param int $metaDataTypeId The meta data type id - * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsMetaDataBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsMetaDataNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsMetaData(int $productId, int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsMetaData(int $productId, int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsMetaData($productId, $metaDataTypeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsMetaData($productId, $metaDataTypeId, $requestBody), $fetch); } /** * Updates a product meta data if it exists or creates a new product meta data for the given `metaDataTypeId` if it does not exist. Retrieves the update `ProductMetaData` object. * * @param int $productId The product id * @param int $metaDataTypeId The meta data type id - * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsMetaDataBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsMetaDataNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsMetaData(int $productId, int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsMetaData(int $productId, int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsMetaData($productId, $metaDataTypeId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsMetaData($productId, $metaDataTypeId, $requestBody), $fetch); } /** * Returns a list of product attributes. @@ -2505,7 +2505,7 @@ public function putProductsMetaData(int $productId, int $metaDataTypeId, \Starwe */ public function listProductsAttributes(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsAttributes($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsAttributes($productId), $fetch); } /** * Retrieves the `ProductAttribute` object. @@ -2519,7 +2519,7 @@ public function listProductsAttributes(int $productId, string $fetch = self::FET */ public function getProductsAttribute(int $productId, int $attributeId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsAttribute($productId, $attributeId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsAttribute($productId, $attributeId), $fetch); } /** * Returns a list of product variant pricelist prices @@ -2536,7 +2536,7 @@ public function getProductsAttribute(int $productId, int $attributeId, string $f */ public function listProductsVariantsPricelistPrices(int $productId, int $variantId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistPrices($productId, $variantId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistPrices($productId, $variantId, $queryParameters), $fetch); } /** * Creates a product variant pricelist price. @@ -2544,7 +2544,7 @@ public function listProductsVariantsPricelistPrices(int $productId, int $variant * * @param int $productId The products id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody * @param array $queryParameters { * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices * } @@ -2553,9 +2553,9 @@ public function listProductsVariantsPricelistPrices(int $productId, int $variant * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductVariantPricelistPrice(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) + public function createProductVariantPricelistPrice(int $productId, int $variantId, ?\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody = null, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody, $queryParameters), $fetch); } /** * Deletes a product variant pricelist price permanently. @@ -2573,7 +2573,7 @@ public function createProductVariantPricelistPrice(int $productId, int $variantI */ public function deleteProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch); } /** * Retrieves the `ProductVariantPricelistPrice` object @@ -2591,7 +2591,7 @@ public function deleteProductsVariantsPricelistPrice(int $productId, int $varian */ public function getProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch); } /** * Updates a product variant pricelist price. @@ -2600,7 +2600,7 @@ public function getProductsVariantsPricelistPrice(int $productId, int $variantId * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody * @param array $queryParameters { * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices * } @@ -2610,9 +2610,9 @@ public function getProductsVariantsPricelistPrice(int $productId, int $variantId * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) + public function patchProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody = null, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch); } /** * Updates a product variant pricelist price. @@ -2621,7 +2621,7 @@ public function patchProductsVariantsPricelistPrice(int $productId, int $variant * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody * @param array $queryParameters { * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices * } @@ -2631,9 +2631,9 @@ public function patchProductsVariantsPricelistPrice(int $productId, int $variant * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) + public function putProductsVariantsPricelistPrice(int $productId, int $variantId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody = null, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch); } /** * Returns a list of product variant pricelist prices @@ -2647,7 +2647,7 @@ public function putProductsVariantsPricelistPrice(int $productId, int $variantId */ public function listProductBundledProductsPricelistPrices(int $productId, int $bundledProductId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductBundledProductsPricelistPrices($productId, $bundledProductId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductBundledProductsPricelistPrices($productId, $bundledProductId), $fetch); } /** * Creates a bundled product pricelist price. @@ -2655,15 +2655,15 @@ public function listProductBundledProductsPricelistPrices(int $productId, int $b * * @param int $productId The products id * @param int $bundledProductId The bundled products id - * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductBundleProductPricelistPriceBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductBundleProductPricelistPrice(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductBundleProductPricelistPrice(int $productId, int $bundledProductId, ?\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductBundleProductPricelistPrice($productId, $bundledProductId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductBundleProductPricelistPrice($productId, $bundledProductId, $requestBody), $fetch); } /** * Deletes a bundled product pricelist price permanently. @@ -2678,7 +2678,7 @@ public function createProductBundleProductPricelistPrice(int $productId, int $bu */ public function deleteProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId), $fetch); } /** * Retrieves the `ProductBundleProductPricelistPrice` object @@ -2693,7 +2693,7 @@ public function deleteProductBundledProductsPricelistPrice(int $productId, int $ */ public function getProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId), $fetch); } /** * Updates a bundled product pricelist price. @@ -2702,16 +2702,16 @@ public function getProductBundledProductsPricelistPrice(int $productId, int $bun * @param int $productId The product id * @param int $bundledProductId The bundled products id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId, $requestBody), $fetch); } /** * Updates a bundled product pricelist price. @@ -2720,16 +2720,16 @@ public function patchProductBundledProductsPricelistPrice(int $productId, int $b * @param int $productId The product id * @param int $bundledProductId The bundled products id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductBundledProductsPricelistPrice(int $productId, int $bundledProductId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductBundledProductsPricelistPrice($productId, $bundledProductId, $pricelistId, $requestBody), $fetch); } /** * Returns a list of product tag links. @@ -2742,21 +2742,21 @@ public function putProductBundledProductsPricelistPrice(int $productId, int $bun */ public function listProductTagLinks(int $productId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductTagLinks($productId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductTagLinks($productId), $fetch); } /** * Create a product tag link by submitting the tagOptionId. Retrieves the created `ProductTagLink` object * * @param int $productId The product id - * @param \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductTagLinkBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductTagLink(int $productId, \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductTagLink(int $productId, ?\Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTagLink($productId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductTagLink($productId, $requestBody), $fetch); } /** * Delete a product tag link permanently. @@ -2770,7 +2770,7 @@ public function createProductTagLink(int $productId, \Starweb\Api\Generated\Mode */ public function deleteProductTagLink(int $productId, int $tagOptionId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTagLink($productId, $tagOptionId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductTagLink($productId, $tagOptionId), $fetch); } /** * Retrieves the `ProductTagLink` object @@ -2784,7 +2784,7 @@ public function deleteProductTagLink(int $productId, int $tagOptionId, string $f */ public function getProductTagLink(int $productId, int $tagOptionId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductTagLink($productId, $tagOptionId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductTagLink($productId, $tagOptionId), $fetch); } /** * Returns a list of the variants pricelist volume prices @@ -2799,7 +2799,7 @@ public function getProductTagLink(int $productId, int $tagOptionId, string $fetc */ public function listProductsVariantsPricelistVolumePrices(int $productId, int $variantId, int $pricelistId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistVolumePrices($productId, $variantId, $pricelistId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistVolumePrices($productId, $variantId, $pricelistId), $fetch); } /** * Creates a variant volume pricelist price. @@ -2808,15 +2808,15 @@ public function listProductsVariantsPricelistVolumePrices(int $productId, int $v * @param int $productId The products id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateProductVariantPricelistVolumePriceBadRequestException * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function createProductVariantPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createProductVariantPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistVolumePrice($productId, $variantId, $pricelistId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistVolumePrice($productId, $variantId, $pricelistId, $requestBody), $fetch); } /** * Deletes a product variant pricelist volume price permanently. @@ -2832,7 +2832,7 @@ public function createProductVariantPricelistVolumePrice(int $productId, int $va */ public function deleteProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity), $fetch); } /** * Retrieves the `ProductVariantPricelistVolumePrice` object @@ -2848,7 +2848,7 @@ public function deleteProductsVariantsPricelistVolumePrice(int $productId, int $ */ public function getProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity), $fetch); } /** * Updates a product variant pricelist volume price. @@ -2858,16 +2858,16 @@ public function getProductsVariantsPricelistVolumePrice(int $productId, int $var * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param int $quantity The volume quantity - * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, ?\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity, $requestBody), $fetch); } /** * Updates a product variant pricelist volume price. @@ -2877,16 +2877,16 @@ public function patchProductsVariantsPricelistVolumePrice(int $productId, int $v * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param int $quantity The volume quantity - * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductsVariantsPricelistVolumePrice(int $productId, int $variantId, int $pricelistId, int $quantity, ?\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistVolumePrice($productId, $variantId, $pricelistId, $quantity, $requestBody), $fetch); } /** * Returns a list of product variant stocks for stock locations @@ -2900,7 +2900,7 @@ public function putProductsVariantsPricelistVolumePrice(int $productId, int $var */ public function listProductsVariantsStocks(int $productId, int $variantId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsStocks($productId, $variantId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsStocks($productId, $variantId), $fetch); } /** * Deletes a product variant stock permanently. @@ -2915,7 +2915,7 @@ public function listProductsVariantsStocks(int $productId, int $variantId, strin */ public function deleteProductVariantStocks(int $productId, int $variantId, int $stockLocationId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductVariantStocks($productId, $variantId, $stockLocationId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductVariantStocks($productId, $variantId, $stockLocationId), $fetch); } /** * Retrieves the `ProductVariantStock` object @@ -2930,7 +2930,7 @@ public function deleteProductVariantStocks(int $productId, int $variantId, int $ */ public function getProductVariantStock(int $productId, int $variantId, int $stockLocationId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetProductVariantStock($productId, $variantId, $stockLocationId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductVariantStock($productId, $variantId, $stockLocationId), $fetch); } /** * Update the stock for a product variant at a stock location. @@ -2939,16 +2939,16 @@ public function getProductVariantStock(int $productId, int $variantId, int $stoc * @param int $productId The product id * @param int $variantId The products variants id * @param int $stockLocationId The stock location id - * @param \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchProductVariantStockBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchProductVariantStockNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchProductVariantStock(int $productId, int $variantId, int $stockLocationId, \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchProductVariantStock(int $productId, int $variantId, int $stockLocationId, ?\Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductVariantStock($productId, $variantId, $stockLocationId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductVariantStock($productId, $variantId, $stockLocationId, $requestBody), $fetch); } /** * Update or set the stock for a product variant at a stock location. @@ -2957,16 +2957,16 @@ public function patchProductVariantStock(int $productId, int $variantId, int $st * @param int $productId The product id * @param int $variantId The products variants id * @param int $stockLocationId The stock location id - * @param \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutProductVariantStockBadRequestException * @throws \Starweb\Api\Generated\Exception\PutProductVariantStockNotFoundException * * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem|\Psr\Http\Message\ResponseInterface */ - public function putProductVariantStock(int $productId, int $variantId, int $stockLocationId, \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putProductVariantStock(int $productId, int $variantId, int $stockLocationId, ?\Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductVariantStock($productId, $variantId, $stockLocationId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductVariantStock($productId, $variantId, $stockLocationId, $requestBody), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -2975,7 +2975,7 @@ public function putProductVariantStock(int $productId, int $variantId, int $stoc */ public function getShippingMethods(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShippingMethods(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetShippingMethods(), $fetch); } /** * Retrieves a `ShippingMethid` object @@ -2988,7 +2988,7 @@ public function getShippingMethods(string $fetch = self::FETCH_OBJECT) */ public function getShippingMethod(int $shippingMethodId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShippingMethod($shippingMethodId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetShippingMethod($shippingMethodId), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -2997,7 +2997,7 @@ public function getShippingMethod(int $shippingMethodId, string $fetch = self::F */ public function getShippingTrackingTypes(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShippingTrackingTypes(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetShippingTrackingTypes(), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -3007,7 +3007,7 @@ public function getShippingTrackingTypes(string $fetch = self::FETCH_OBJECT) */ public function getShop(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetShop(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetShop(), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -3017,21 +3017,21 @@ public function getShop(string $fetch = self::FETCH_OBJECT) */ public function listStockLocations(string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\ListStockLocations(), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListStockLocations(), $fetch); } /** * Create a stock location. Retrieves the created `StockLocation` object * - * @param \Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateStockLocationBadRequestException * @throws \Starweb\Api\Generated\Exception\CreateStockLocationForbiddenException * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface */ - public function createStockLocation(\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createStockLocation(?\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateStockLocation($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateStockLocation($requestBody), $fetch); } /** * Delete a stock location permanently @@ -3045,7 +3045,7 @@ public function createStockLocation(\Starweb\Api\Generated\Model\StockLocationPo */ public function deleteStockLocation(int $stockLocationId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteStockLocation($stockLocationId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteStockLocation($stockLocationId), $fetch); } /** * Retrieves a `StockLocation` object @@ -3058,13 +3058,13 @@ public function deleteStockLocation(int $stockLocationId, string $fetch = self:: */ public function getStockLocation(int $stockLocationId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetStockLocation($stockLocationId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetStockLocation($stockLocationId), $fetch); } /** * Update a stock location partially. Retrieves the updated `StockLocation` object * * @param int $stockLocationId The stock location id - * @param mixed $requestBody + * @param null|mixed $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchStockLocationBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchStockLocationForbiddenException @@ -3072,15 +3072,15 @@ public function getStockLocation(int $stockLocationId, string $fetch = self::FET * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchStockLocation(int $stockLocationId, $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchStockLocation(int $stockLocationId, $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchStockLocation($stockLocationId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchStockLocation($stockLocationId, $requestBody), $fetch); } /** * Update a stock location. Retrieves the updated `StockLocation` object * * @param int $stockLocationId The stock location id - * @param \Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutStockLocationBadRequestException * @throws \Starweb\Api\Generated\Exception\PutStockLocationForbiddenException @@ -3088,9 +3088,9 @@ public function patchStockLocation(int $stockLocationId, $requestBody, string $f * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem|\Psr\Http\Message\ResponseInterface */ - public function putStockLocation(int $stockLocationId, \Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putStockLocation(int $stockLocationId, ?\Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutStockLocation($stockLocationId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutStockLocation($stockLocationId, $requestBody), $fetch); } /** * @@ -3105,20 +3105,20 @@ public function putStockLocation(int $stockLocationId, \Starweb\Api\Generated\Mo */ public function getWebHooks(array $queryParameters = array(), string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetWebHooks($queryParameters), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetWebHooks($queryParameters), $fetch); } /** * * - * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody + * @param null|\Starweb\Api\Generated\Model\WebHookModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\CreateWebHookBadRequestException * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface */ - public function createWebHook(\Starweb\Api\Generated\Model\WebHookModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function createWebHook(?\Starweb\Api\Generated\Model\WebHookModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateWebHook($requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateWebHook($requestBody), $fetch); } /** * @@ -3131,7 +3131,7 @@ public function createWebHook(\Starweb\Api\Generated\Model\WebHookModel $request */ public function deleteWebHook(int $webHookId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\DeleteWebHook($webHookId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteWebHook($webHookId), $fetch); } /** * @@ -3144,51 +3144,58 @@ public function deleteWebHook(int $webHookId, string $fetch = self::FETCH_OBJECT */ public function getWebHook(int $webHookId, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\GetWebHook($webHookId), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetWebHook($webHookId), $fetch); } /** * * * @param int $webHookId The web hook id - * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody + * @param null|\Starweb\Api\Generated\Model\WebHookModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PatchWebHookBadRequestException * @throws \Starweb\Api\Generated\Exception\PatchWebHookNotFoundException * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface */ - public function patchWebHook(int $webHookId, \Starweb\Api\Generated\Model\WebHookModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function patchWebHook(int $webHookId, ?\Starweb\Api\Generated\Model\WebHookModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchWebHook($webHookId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchWebHook($webHookId, $requestBody), $fetch); } /** * * * @param int $webHookId The web hook id - * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody + * @param null|\Starweb\Api\Generated\Model\WebHookModel $requestBody * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Starweb\Api\Generated\Exception\PutWebHookBadRequestException * @throws \Starweb\Api\Generated\Exception\PutWebHookNotFoundException * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem|\Psr\Http\Message\ResponseInterface */ - public function putWebHook(int $webHookId, \Starweb\Api\Generated\Model\WebHookModel $requestBody, string $fetch = self::FETCH_OBJECT) + public function putWebHook(int $webHookId, ?\Starweb\Api\Generated\Model\WebHookModel $requestBody = null, string $fetch = self::FETCH_OBJECT) { - return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutWebHook($webHookId, $requestBody), $fetch); + return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutWebHook($webHookId, $requestBody), $fetch); } - public static function create($httpClient = null) + public static function create($httpClient = null, array $additionalPlugins = array(), array $additionalNormalizers = array()) { if (null === $httpClient) { - $httpClient = \Http\Discovery\HttpClientDiscovery::find(); + $httpClient = \Http\Discovery\Psr18ClientDiscovery::find(); $plugins = array(); - $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('https://{shopId}.sws.local/api/v2'); + $uri = \Http\Discovery\Psr17FactoryDiscovery::findUrlFactory()->createUri('https://{shopId}.sws.local/api/v2'); $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri); $plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri); + if (count($additionalPlugins) > 0) { + $plugins = array_merge($plugins, $additionalPlugins); + } $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); } - $messageFactory = \Http\Discovery\MessageFactoryDiscovery::find(); - $streamFactory = \Http\Discovery\StreamFactoryDiscovery::find(); - $serializer = new \Symfony\Component\Serializer\Serializer(\Starweb\Api\Generated\Normalizer\NormalizerFactory::create(), array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode()))); - return new static($httpClient, $messageFactory, $serializer, $streamFactory); + $requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory(); + $streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory(); + $normalizers = array(new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Starweb\Api\Generated\Normalizer\JaneObjectNormalizer()); + if (count($additionalNormalizers) > 0) { + $normalizers = array_merge($normalizers, $additionalNormalizers); + } + $serializer = new \Symfony\Component\Serializer\Serializer($normalizers, array(new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(array('json_decode_associative' => true))))); + return new static($httpClient, $requestFactory, $serializer, $streamFactory); } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/AddCommentToOrder.php b/src/Api/Generated/Endpoint/AddCommentToOrder.php index 72f042db..1effc26f 100644 --- a/src/Api/Generated/Endpoint/AddCommentToOrder.php +++ b/src/Api/Generated/Endpoint/AddCommentToOrder.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class AddCommentToOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class AddCommentToOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** * Add a comment to an order. Retrieves the created `OrderComment` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderCommentModel $requestBody */ - public function __construct(int $orderId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody) + public function __construct(int $orderId, ?\Starweb\Api\Generated\Model\OrderCommentModel $requestBody = null) { $this->orderId = $orderId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\AddCommentToOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\AddCommentToOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/AddTagToCustomer.php b/src/Api/Generated/Endpoint/AddTagToCustomer.php index 8aa4fe19..971e574f 100644 --- a/src/Api/Generated/Endpoint/AddTagToCustomer.php +++ b/src/Api/Generated/Endpoint/AddTagToCustomer.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class AddTagToCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class AddTagToCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** * Add a tag to a customer. Retrieves the created `CustomerTag` object * * @param int $customerId The customers id - * @param \Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody */ - public function __construct(int $customerId, \Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody) + public function __construct(int $customerId, ?\Starweb\Api\Generated\Model\CustomerAddedTagModel $requestBody = null) { $this->customerId = $customerId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\AddTagToCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\AddTagToCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateAttribute.php b/src/Api/Generated/Endpoint/CreateAttribute.php index 835bc121..a5b8a111 100644 --- a/src/Api/Generated/Endpoint/CreateAttribute.php +++ b/src/Api/Generated/Endpoint/CreateAttribute.php @@ -2,19 +2,19 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateAttribute extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a product variant attribute. Retrieves the created `ProductVariantAttribute` object. * - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateAttributeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateAttributeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateCustomer.php b/src/Api/Generated/Endpoint/CreateCustomer.php index ba6282d3..e64685b1 100644 --- a/src/Api/Generated/Endpoint/CreateCustomer.php +++ b/src/Api/Generated/Endpoint/CreateCustomer.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a `Customer` object * - * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerCreatedModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateMediaFile.php b/src/Api/Generated/Endpoint/CreateMediaFile.php index ec68daab..9f67f6dd 100644 --- a/src/Api/Generated/Endpoint/CreateMediaFile.php +++ b/src/Api/Generated/Endpoint/CreateMediaFile.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateMediaFile extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateMediaFile extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a new `Media File` object * - * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody + * @param null|\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -28,9 +28,10 @@ public function getBody(\Symfony\Component\Serializer\SerializerInterface $seria $bodyBuilder = new \Http\Message\MultipartStream\MultipartStreamBuilder($streamFactory); $formParameters = $serializer->normalize($this->body, 'json'); foreach ($formParameters as $key => $value) { + $value = is_int($value) ? (string) $value : $value; $bodyBuilder->addResource($key, $value); } - return array(array('Content-Type' => array('multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '""'))), $bodyBuilder->build()); + return array(array('Content-Type' => array('multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '"'))), $bodyBuilder->build()); } return array(array(), null); } @@ -45,13 +46,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateMediaFileBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateMediaFileBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateOrder.php b/src/Api/Generated/Endpoint/CreateOrder.php index 4f5dcf4c..ad695a23 100644 --- a/src/Api/Generated/Endpoint/CreateOrder.php +++ b/src/Api/Generated/Endpoint/CreateOrder.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create an order. Retrieves the create `Order` object * - * @param \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateOrderExternalService.php b/src/Api/Generated/Endpoint/CreateOrderExternalService.php index dacefc77..60ae98bf 100644 --- a/src/Api/Generated/Endpoint/CreateOrderExternalService.php +++ b/src/Api/Generated/Endpoint/CreateOrderExternalService.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateOrderExternalService extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -10,14 +10,14 @@ class CreateOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoin object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody */ - public function __construct(int $orderId, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody) + public function __construct(int $orderId, ?\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody = null) { $this->orderId = $orderId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateOrderExternalServiceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateOrderExternalServiceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateOrderItem.php b/src/Api/Generated/Endpoint/CreateOrderItem.php index c699315d..f6c222d1 100644 --- a/src/Api/Generated/Endpoint/CreateOrderItem.php +++ b/src/Api/Generated/Endpoint/CreateOrderItem.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateOrderItem extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** * Create an order item. Retrieves the create `OrderItem` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderItemModel $requestBody */ - public function __construct(int $orderId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody) + public function __construct(int $orderId, ?\Starweb\Api\Generated\Model\OrderItemModel $requestBody = null) { $this->orderId = $orderId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateOrderItemBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateOrderItemBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateOrderStatus.php b/src/Api/Generated/Endpoint/CreateOrderStatus.php index 51de9fdd..4f9b1f15 100644 --- a/src/Api/Generated/Endpoint/CreateOrderStatus.php +++ b/src/Api/Generated/Endpoint/CreateOrderStatus.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateOrderStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create an order status. Retrieves the created `OrderStatus` object * - * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderStatusModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\OrderStatusModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\OrderStatusModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateOrderStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateOrderStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreatePricelist.php b/src/Api/Generated/Endpoint/CreatePricelist.php index 694194a4..55b41331 100644 --- a/src/Api/Generated/Endpoint/CreatePricelist.php +++ b/src/Api/Generated/Endpoint/CreatePricelist.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreatePricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreatePricelist extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create a pricelist. Retrieves the created `Pricelist` object * - * @param mixed $requestBody + * @param null|mixed $requestBody */ - public function __construct($requestBody) + public function __construct($requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PricelistModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreatePricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreatePricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProduct.php b/src/Api/Generated/Endpoint/CreateProduct.php index da43db2d..482b969e 100644 --- a/src/Api/Generated/Endpoint/CreateProduct.php +++ b/src/Api/Generated/Endpoint/CreateProduct.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a product. Retrieves the created `Product` object. * - * @param \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductBundleProductPricelistPrice.php b/src/Api/Generated/Endpoint/CreateProductBundleProductPricelistPrice.php index ee2811b1..10b33531 100644 --- a/src/Api/Generated/Endpoint/CreateProductBundleProductPricelistPrice.php +++ b/src/Api/Generated/Endpoint/CreateProductBundleProductPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductBundleProductPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductBundleProductPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -12,15 +12,15 @@ class CreateProductBundleProductPricelistPrice extends \Jane\OpenApiRuntime\Clie * * @param int $productId The products id * @param int $bundledProductId The bundled products id - * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody */ - public function __construct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody) + public function __construct(int $productId, int $bundledProductId, ?\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody = null) { $this->productId = $productId; $this->bundledProductId = $bundledProductId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -47,13 +47,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductBundleProductPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductBundleProductPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductBundledProduct.php b/src/Api/Generated/Endpoint/CreateProductBundledProduct.php index 31bfb023..dab85ae7 100644 --- a/src/Api/Generated/Endpoint/CreateProductBundledProduct.php +++ b/src/Api/Generated/Endpoint/CreateProductBundledProduct.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductBundledProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductBundledProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Creates a bundled product. Retrieves the created `BundledProduct` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody + * @param null|\Starweb\Api\Generated\Model\BundledProductsModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\BundledProductsModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductBundledProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductBundledProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductCategory.php b/src/Api/Generated/Endpoint/CreateProductCategory.php index 1ce74295..6cae0e02 100644 --- a/src/Api/Generated/Endpoint/CreateProductCategory.php +++ b/src/Api/Generated/Endpoint/CreateProductCategory.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductCategory extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductCategory extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create a product category. Retrieves the created `ProductCategory` object * - * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductCategoryBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductCategoryBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductManufacturer.php b/src/Api/Generated/Endpoint/CreateProductManufacturer.php index c7e3aaf0..031eae6d 100644 --- a/src/Api/Generated/Endpoint/CreateProductManufacturer.php +++ b/src/Api/Generated/Endpoint/CreateProductManufacturer.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductManufacturer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductManufacturer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a product manufacturer. * - * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductManufacturerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductManufacturerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductMetaDataType.php b/src/Api/Generated/Endpoint/CreateProductMetaDataType.php index f307713f..6355a636 100644 --- a/src/Api/Generated/Endpoint/CreateProductMetaDataType.php +++ b/src/Api/Generated/Endpoint/CreateProductMetaDataType.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductMetaDataType extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductMetaDataType extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create a product meta data type. Retrieves the created `ProductMetaDataType` object * - * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductMetaDataTypeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductMetaDataTypeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductStockStatus.php b/src/Api/Generated/Endpoint/CreateProductStockStatus.php index 2278385b..0ce9c2bb 100644 --- a/src/Api/Generated/Endpoint/CreateProductStockStatus.php +++ b/src/Api/Generated/Endpoint/CreateProductStockStatus.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductStockStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create a product stock status. Retrieves the created `ProductStockStatus` object. * - * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductStockStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductStockStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductTag.php b/src/Api/Generated/Endpoint/CreateProductTag.php index 18a6626c..0c61915e 100644 --- a/src/Api/Generated/Endpoint/CreateProductTag.php +++ b/src/Api/Generated/Endpoint/CreateProductTag.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a `ProductTag` object * - * @param \Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductTagPostRequestModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductTagBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductTagBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductTagLink.php b/src/Api/Generated/Endpoint/CreateProductTagLink.php index d095e1d7..cc8e87d4 100644 --- a/src/Api/Generated/Endpoint/CreateProductTagLink.php +++ b/src/Api/Generated/Endpoint/CreateProductTagLink.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductTagLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductTagLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Create a product tag link by submitting the tagOptionId. Retrieves the created `ProductTagLink` object * * @param int $productId The product id - * @param \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductTagLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductTagLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductTagOption.php b/src/Api/Generated/Endpoint/CreateProductTagOption.php index b624a0ae..70ff1ec2 100644 --- a/src/Api/Generated/Endpoint/CreateProductTagOption.php +++ b/src/Api/Generated/Endpoint/CreateProductTagOption.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductTagOption extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductTagOption extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; /** * Create a tag option. Tag options can only be created for tags of type `option`. If you try to create options for a tag of type `boolean` an error `405` will be returned. Returns the created `ProductTagOption` object. * * @param int $productTagId The product tag id - * @param \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody */ - public function __construct(int $productTagId, \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody) + public function __construct(int $productTagId, ?\Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel $requestBody = null) { $this->productTagId = $productTagId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductTagOptionBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductTagOptionBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (405 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (405 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductUnit.php b/src/Api/Generated/Endpoint/CreateProductUnit.php index 7351692c..7c0dcb3a 100644 --- a/src/Api/Generated/Endpoint/CreateProductUnit.php +++ b/src/Api/Generated/Endpoint/CreateProductUnit.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductUnit extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Creates a product unit. * - * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductUnitBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductVariant.php b/src/Api/Generated/Endpoint/CreateProductVariant.php index f844fb9b..12f83679 100644 --- a/src/Api/Generated/Endpoint/CreateProductVariant.php +++ b/src/Api/Generated/Endpoint/CreateProductVariant.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductVariant extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Creates a product variant. Retrieves the created `ProductVariant` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductVariantRequestModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductVariantBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductVariantBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php b/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php index e08c9802..6e83e24a 100644 --- a/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php +++ b/src/Api/Generated/Endpoint/CreateProductVariantPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductVariantPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductVariantPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -12,19 +12,19 @@ class CreateProductVariantPricelistPrice extends \Jane\OpenApiRuntime\Client\Bas * * @param int $productId The products id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody * @param array $queryParameters { * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices * } */ - public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array()) + public function __construct(int $productId, int $variantId, ?\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody = null, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; $this->body = $requestBody; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -50,7 +50,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -60,13 +60,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductVariantPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductVariantPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductVariantPricelistVolumePrice.php b/src/Api/Generated/Endpoint/CreateProductVariantPricelistVolumePrice.php index 4730ce2f..1a9eaf66 100644 --- a/src/Api/Generated/Endpoint/CreateProductVariantPricelistVolumePrice.php +++ b/src/Api/Generated/Endpoint/CreateProductVariantPricelistVolumePrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductVariantPricelistVolumePrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductVariantPricelistVolumePrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -14,16 +14,16 @@ class CreateProductVariantPricelistVolumePrice extends \Jane\OpenApiRuntime\Clie * @param int $productId The products id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody */ - public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody) + public function __construct(int $productId, int $variantId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; $this->pricelistId = $pricelistId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -50,13 +50,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductVariantPricelistVolumePriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductVariantPricelistVolumePriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductVatRate.php b/src/Api/Generated/Endpoint/CreateProductVatRate.php index 2e06cabc..5620aacd 100644 --- a/src/Api/Generated/Endpoint/CreateProductVatRate.php +++ b/src/Api/Generated/Endpoint/CreateProductVatRate.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductVatRate extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Creates a product vat rate. Retrieves the create `ProductVatRate` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductVatRateBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductVatRateBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductsCategoryLink.php b/src/Api/Generated/Endpoint/CreateProductsCategoryLink.php index 25917984..03fbf7a1 100644 --- a/src/Api/Generated/Endpoint/CreateProductsCategoryLink.php +++ b/src/Api/Generated/Endpoint/CreateProductsCategoryLink.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductsCategoryLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Retrieves the created `ProductCategoryLink` object * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductsCategoryLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductsCategoryLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductsLanguage.php b/src/Api/Generated/Endpoint/CreateProductsLanguage.php index 706c381d..5fd23b77 100644 --- a/src/Api/Generated/Endpoint/CreateProductsLanguage.php +++ b/src/Api/Generated/Endpoint/CreateProductsLanguage.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductsLanguage extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Create a product language. Retrieves the created `ProductLanguage` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductsLanguageBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductsLanguageBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductsMediaFileLink.php b/src/Api/Generated/Endpoint/CreateProductsMediaFileLink.php index c6442517..64c5ee3c 100644 --- a/src/Api/Generated/Endpoint/CreateProductsMediaFileLink.php +++ b/src/Api/Generated/Endpoint/CreateProductsMediaFileLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductsMediaFileLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -10,14 +10,14 @@ class CreateProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoi Retrieves the create `ProductMediaFileLink` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductsMediaFileLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductsMediaFileLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductsMetaData.php b/src/Api/Generated/Endpoint/CreateProductsMetaData.php index 259e58ea..bbc96734 100644 --- a/src/Api/Generated/Endpoint/CreateProductsMetaData.php +++ b/src/Api/Generated/Endpoint/CreateProductsMetaData.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductsMetaData extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Deprecated: use the [putProductsMetaData](#operation/putProductsMetaData) operation to create a new product meta data for the `metaDataTypeId` instead. Creates a product meta data. Retrieves the created `ProductMetaData` object. * * @param int $productId The products id - * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php index 95184e17..6c17447c 100644 --- a/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/CreateProductsVariantsAttributeValues.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateProductsVariantsAttributeValues extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; /** @@ -10,14 +10,14 @@ class CreateProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\ Retrieves the created `ProductVariantAttributeValue` object. * * @param int $attributeId The attribute id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody */ - public function __construct(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody) + public function __construct(int $attributeId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody = null) { $this->attributeId = $attributeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateStockLocation.php b/src/Api/Generated/Endpoint/CreateStockLocation.php index 3b084add..409541a0 100644 --- a/src/Api/Generated/Endpoint/CreateStockLocation.php +++ b/src/Api/Generated/Endpoint/CreateStockLocation.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateStockLocation extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateStockLocation extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create a stock location. Retrieves the created `StockLocation` object * - * @param \Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\StockLocationPostRequestModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -41,16 +41,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateStockLocationBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateStockLocationBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/CreateWebHook.php b/src/Api/Generated/Endpoint/CreateWebHook.php index 3c2bdfbe..b70b02f4 100644 --- a/src/Api/Generated/Endpoint/CreateWebHook.php +++ b/src/Api/Generated/Endpoint/CreateWebHook.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class CreateWebHook extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class CreateWebHook extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * * - * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody + * @param null|\Starweb\Api\Generated\Model\WebHookModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\WebHookModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\WebHookModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (201 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\WebHookModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\CreateWebHookBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\CreateWebHookBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteAttribute.php b/src/Api/Generated/Endpoint/DeleteAttribute.php index fbfdfcd0..4c2e9ca2 100644 --- a/src/Api/Generated/Endpoint/DeleteAttribute.php +++ b/src/Api/Generated/Endpoint/DeleteAttribute.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteAttribute extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; /** @@ -14,7 +14,7 @@ public function __construct(int $attributeId) { $this->attributeId = $attributeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteAttributeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteAttributeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteAttributeValue.php b/src/Api/Generated/Endpoint/DeleteAttributeValue.php index 36083fd5..0818af6b 100644 --- a/src/Api/Generated/Endpoint/DeleteAttributeValue.php +++ b/src/Api/Generated/Endpoint/DeleteAttributeValue.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteAttributeValue extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteAttributeValue extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; protected $attributeValueId; @@ -17,7 +17,7 @@ public function __construct(int $attributeId, int $attributeValueId) $this->attributeId = $attributeId; $this->attributeValueId = $attributeValueId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteAttributeValueNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteAttributeValueNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteCustomer.php b/src/Api/Generated/Endpoint/DeleteCustomer.php index 370aa9d7..36af0831 100644 --- a/src/Api/Generated/Endpoint/DeleteCustomer.php +++ b/src/Api/Generated/Endpoint/DeleteCustomer.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** @@ -14,7 +14,7 @@ public function __construct(int $customerId) { $this->customerId = $customerId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteMediaFile.php b/src/Api/Generated/Endpoint/DeleteMediaFile.php index c9ae7861..594225d5 100644 --- a/src/Api/Generated/Endpoint/DeleteMediaFile.php +++ b/src/Api/Generated/Endpoint/DeleteMediaFile.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteMediaFile extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteMediaFile extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $mediaFileId; /** @@ -14,7 +14,7 @@ public function __construct(int $mediaFileId) { $this->mediaFileId = $mediaFileId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteOrder.php b/src/Api/Generated/Endpoint/DeleteOrder.php index c55bfb4a..859db4c9 100644 --- a/src/Api/Generated/Endpoint/DeleteOrder.php +++ b/src/Api/Generated/Endpoint/DeleteOrder.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -14,7 +14,7 @@ public function __construct(int $orderId) { $this->orderId = $orderId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteOrderAddress.php b/src/Api/Generated/Endpoint/DeleteOrderAddress.php index b7f588ea..fbc2cc34 100644 --- a/src/Api/Generated/Endpoint/DeleteOrderAddress.php +++ b/src/Api/Generated/Endpoint/DeleteOrderAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteOrderAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteOrderAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $addressType; @@ -17,7 +17,7 @@ public function __construct(int $orderId, string $addressType) $this->orderId = $orderId; $this->addressType = $addressType; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteOrderExternalService.php b/src/Api/Generated/Endpoint/DeleteOrderExternalService.php index e6ea2832..6141705f 100644 --- a/src/Api/Generated/Endpoint/DeleteOrderExternalService.php +++ b/src/Api/Generated/Endpoint/DeleteOrderExternalService.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteOrderExternalService extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $serviceName; @@ -17,7 +17,7 @@ public function __construct(int $orderId, string $serviceName) $this->orderId = $orderId; $this->serviceName = $serviceName; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteOrderItem.php b/src/Api/Generated/Endpoint/DeleteOrderItem.php index 43edfe5d..03e0acca 100644 --- a/src/Api/Generated/Endpoint/DeleteOrderItem.php +++ b/src/Api/Generated/Endpoint/DeleteOrderItem.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteOrderItem extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $orderItemId; @@ -17,7 +17,7 @@ public function __construct(int $orderId, int $orderItemId) $this->orderId = $orderId; $this->orderItemId = $orderItemId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteOrderStatus.php b/src/Api/Generated/Endpoint/DeleteOrderStatus.php index 8f97c7fd..203dfeae 100644 --- a/src/Api/Generated/Endpoint/DeleteOrderStatus.php +++ b/src/Api/Generated/Endpoint/DeleteOrderStatus.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteOrderStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderStatusId; /** @@ -15,7 +15,7 @@ public function __construct(int $orderStatusId) { $this->orderStatusId = $orderStatusId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -40,16 +40,22 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteOrderStatusForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteOrderStatusForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeletePricelist.php b/src/Api/Generated/Endpoint/DeletePricelist.php index d3a089ab..675453ce 100644 --- a/src/Api/Generated/Endpoint/DeletePricelist.php +++ b/src/Api/Generated/Endpoint/DeletePricelist.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeletePricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeletePricelist extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $pricelistId; /** @@ -14,7 +14,7 @@ public function __construct(int $pricelistId) { $this->pricelistId = $pricelistId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -39,16 +39,22 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeletePricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeletePricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeletePricelistForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeletePricelistForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProduct.php b/src/Api/Generated/Endpoint/DeleteProduct.php index 4bb678c6..663e4d37 100644 --- a/src/Api/Generated/Endpoint/DeleteProduct.php +++ b/src/Api/Generated/Endpoint/DeleteProduct.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductBundledProductsPricelistPrice.php b/src/Api/Generated/Endpoint/DeleteProductBundledProductsPricelistPrice.php index a36afc93..559a6a83 100644 --- a/src/Api/Generated/Endpoint/DeleteProductBundledProductsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/DeleteProductBundledProductsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductBundledProductsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductBundledProductsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -20,7 +20,7 @@ public function __construct(int $productId, int $bundledProductId, int $pricelis $this->bundledProductId = $bundledProductId; $this->pricelistId = $pricelistId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductCategory.php b/src/Api/Generated/Endpoint/DeleteProductCategory.php index a061bb99..297d42b3 100644 --- a/src/Api/Generated/Endpoint/DeleteProductCategory.php +++ b/src/Api/Generated/Endpoint/DeleteProductCategory.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductCategory extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductCategory extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $categoryId; /** @@ -14,7 +14,7 @@ public function __construct(int $categoryId) { $this->categoryId = $categoryId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductManufacturer.php b/src/Api/Generated/Endpoint/DeleteProductManufacturer.php index 5fd7438f..8416c3ca 100644 --- a/src/Api/Generated/Endpoint/DeleteProductManufacturer.php +++ b/src/Api/Generated/Endpoint/DeleteProductManufacturer.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductManufacturer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductManufacturer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $manufacturerId; /** @@ -14,7 +14,7 @@ public function __construct(int $manufacturerId) { $this->manufacturerId = $manufacturerId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductMetaDataType.php b/src/Api/Generated/Endpoint/DeleteProductMetaDataType.php index aa77307a..f703c982 100644 --- a/src/Api/Generated/Endpoint/DeleteProductMetaDataType.php +++ b/src/Api/Generated/Endpoint/DeleteProductMetaDataType.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductMetaDataType extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductMetaDataType extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $metaDataTypeId; /** @@ -14,7 +14,7 @@ public function __construct(int $metaDataTypeId) { $this->metaDataTypeId = $metaDataTypeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductStockStatus.php b/src/Api/Generated/Endpoint/DeleteProductStockStatus.php index 22a57c9d..81a8508d 100644 --- a/src/Api/Generated/Endpoint/DeleteProductStockStatus.php +++ b/src/Api/Generated/Endpoint/DeleteProductStockStatus.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductStockStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockStatusId; /** @@ -14,7 +14,7 @@ public function __construct(int $stockStatusId) { $this->stockStatusId = $stockStatusId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductTag.php b/src/Api/Generated/Endpoint/DeleteProductTag.php index 10f7fad0..c4c84f56 100644 --- a/src/Api/Generated/Endpoint/DeleteProductTag.php +++ b/src/Api/Generated/Endpoint/DeleteProductTag.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; /** @@ -14,7 +14,7 @@ public function __construct(int $productTagId) { $this->productTagId = $productTagId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductTagLink.php b/src/Api/Generated/Endpoint/DeleteProductTagLink.php index e2b5f1a5..d021c9fd 100644 --- a/src/Api/Generated/Endpoint/DeleteProductTagLink.php +++ b/src/Api/Generated/Endpoint/DeleteProductTagLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductTagLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductTagLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $tagOptionId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $tagOptionId) $this->productId = $productId; $this->tagOptionId = $tagOptionId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductTagLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductTagLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductTagOption.php b/src/Api/Generated/Endpoint/DeleteProductTagOption.php index 72cf7dce..59d3e9d1 100644 --- a/src/Api/Generated/Endpoint/DeleteProductTagOption.php +++ b/src/Api/Generated/Endpoint/DeleteProductTagOption.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductTagOption extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductTagOption extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; protected $productTagOptionId; @@ -17,7 +17,7 @@ public function __construct(int $productTagId, int $productTagOptionId) $this->productTagId = $productTagId; $this->productTagOptionId = $productTagOptionId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -42,16 +42,22 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductTagOptionNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductTagOptionNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (405 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (405 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductUnit.php b/src/Api/Generated/Endpoint/DeleteProductUnit.php index 1dc30430..5c1b7fc3 100644 --- a/src/Api/Generated/Endpoint/DeleteProductUnit.php +++ b/src/Api/Generated/Endpoint/DeleteProductUnit.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductUnit extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $unitId; /** @@ -14,7 +14,7 @@ public function __construct(int $unitId) { $this->unitId = $unitId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductVariantStocks.php b/src/Api/Generated/Endpoint/DeleteProductVariantStocks.php index 3ff6f3c9..286b0f2f 100644 --- a/src/Api/Generated/Endpoint/DeleteProductVariantStocks.php +++ b/src/Api/Generated/Endpoint/DeleteProductVariantStocks.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductVariantStocks extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductVariantStocks extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -20,7 +20,7 @@ public function __construct(int $productId, int $variantId, int $stockLocationId $this->variantId = $variantId; $this->stockLocationId = $stockLocationId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductVariantStocksNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductVariantStocksNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsBundledProduct.php b/src/Api/Generated/Endpoint/DeleteProductsBundledProduct.php index 8a922340..13062547 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsBundledProduct.php +++ b/src/Api/Generated/Endpoint/DeleteProductsBundledProduct.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsBundledProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsBundledProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $bundledProductId) $this->productId = $productId; $this->bundledProductId = $bundledProductId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsBundledProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsBundledProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsCategoryLink.php b/src/Api/Generated/Endpoint/DeleteProductsCategoryLink.php index 2c34c504..3380f621 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsCategoryLink.php +++ b/src/Api/Generated/Endpoint/DeleteProductsCategoryLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsCategoryLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $categoryId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $categoryId) $this->productId = $productId; $this->categoryId = $categoryId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsLanguage.php b/src/Api/Generated/Endpoint/DeleteProductsLanguage.php index 0a6acdf1..5b1ed880 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsLanguage.php +++ b/src/Api/Generated/Endpoint/DeleteProductsLanguage.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsLanguage extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $langCode; @@ -17,7 +17,7 @@ public function __construct(int $productId, string $langCode) $this->productId = $productId; $this->langCode = $langCode; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsMediaFileLink.php b/src/Api/Generated/Endpoint/DeleteProductsMediaFileLink.php index 32964ae2..6e3aeb4b 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsMediaFileLink.php +++ b/src/Api/Generated/Endpoint/DeleteProductsMediaFileLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsMediaFileLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $mediaFileId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $mediaFileId) $this->productId = $productId; $this->mediaFileId = $mediaFileId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsMetaData.php b/src/Api/Generated/Endpoint/DeleteProductsMetaData.php index b386c1f4..08babbbd 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsMetaData.php +++ b/src/Api/Generated/Endpoint/DeleteProductsMetaData.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsMetaData extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $metaDataTypeId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $metaDataTypeId) $this->productId = $productId; $this->metaDataTypeId = $metaDataTypeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsVariant.php b/src/Api/Generated/Endpoint/DeleteProductsVariant.php index eb6d297d..4c0c342a 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsVariant.php +++ b/src/Api/Generated/Endpoint/DeleteProductsVariant.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsVariant extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $variantId) $this->productId = $productId; $this->variantId = $variantId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php index ddec764c..d9686fc5 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsVariantsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -24,7 +24,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, ar $this->pricelistId = $pricelistId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -47,7 +47,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -57,13 +57,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistVolumePrice.php b/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistVolumePrice.php index 59fb3613..6e037082 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistVolumePrice.php +++ b/src/Api/Generated/Endpoint/DeleteProductsVariantsPricelistVolumePrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsVariantsPricelistVolumePrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsVariantsPricelistVolumePrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -23,7 +23,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, in $this->pricelistId = $pricelistId; $this->quantity = $quantity; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -47,13 +47,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteProductsVatRate.php b/src/Api/Generated/Endpoint/DeleteProductsVatRate.php index 1487cccb..8eae23c6 100644 --- a/src/Api/Generated/Endpoint/DeleteProductsVatRate.php +++ b/src/Api/Generated/Endpoint/DeleteProductsVatRate.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteProductsVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteProductsVatRate extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $countryCode; @@ -17,7 +17,7 @@ public function __construct(int $productId, string $countryCode) $this->productId = $productId; $this->countryCode = $countryCode; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteStockLocation.php b/src/Api/Generated/Endpoint/DeleteStockLocation.php index 7a1d0b22..440460cf 100644 --- a/src/Api/Generated/Endpoint/DeleteStockLocation.php +++ b/src/Api/Generated/Endpoint/DeleteStockLocation.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteStockLocation extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteStockLocation extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockLocationId; /** @@ -14,7 +14,7 @@ public function __construct(int $stockLocationId) { $this->stockLocationId = $stockLocationId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -39,16 +39,22 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/DeleteWebHook.php b/src/Api/Generated/Endpoint/DeleteWebHook.php index 4418941a..07434786 100644 --- a/src/Api/Generated/Endpoint/DeleteWebHook.php +++ b/src/Api/Generated/Endpoint/DeleteWebHook.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class DeleteWebHook extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class DeleteWebHook extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $webHookId; /** @@ -14,7 +14,7 @@ public function __construct(int $webHookId) { $this->webHookId = $webHookId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\DeleteWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\DeleteWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GenerateFetchAccessToken.php b/src/Api/Generated/Endpoint/GenerateFetchAccessToken.php index 3230bc82..7f3e9ed2 100644 --- a/src/Api/Generated/Endpoint/GenerateFetchAccessToken.php +++ b/src/Api/Generated/Endpoint/GenerateFetchAccessToken.php @@ -2,18 +2,18 @@ namespace Starweb\Api\Generated\Endpoint; -class GenerateFetchAccessToken extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GenerateFetchAccessToken extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Create a token. Retrieves the create `Token` object. * - * @param \Starweb\Api\Generated\Model\ClientCredentialModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody */ - public function __construct(\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody) + public function __construct(?\Starweb\Api\Generated\Model\ClientCredentialModel $requestBody = null) { $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'POST'; @@ -40,13 +40,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\TokenModel */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\TokenModel', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GenerateFetchAccessTokenBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GenerateFetchAccessTokenBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCurrencies.php b/src/Api/Generated/Endpoint/GetCurrencies.php index ae8c78da..1ae2bbc3 100644 --- a/src/Api/Generated/Endpoint/GetCurrencies.php +++ b/src/Api/Generated/Endpoint/GetCurrencies.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCurrencies extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCurrencies extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CurrencyCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CurrencyCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCurrency.php b/src/Api/Generated/Endpoint/GetCurrency.php index 2bf00635..d46efed8 100644 --- a/src/Api/Generated/Endpoint/GetCurrency.php +++ b/src/Api/Generated/Endpoint/GetCurrency.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCurrency extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCurrency extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $currencyCode; /** @@ -14,7 +14,7 @@ public function __construct(string $currencyCode) { $this->currencyCode = $currencyCode; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CurrencyModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetCurrencyNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetCurrencyNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomer.php b/src/Api/Generated/Endpoint/GetCustomer.php index 2946ec6f..81b17481 100644 --- a/src/Api/Generated/Endpoint/GetCustomer.php +++ b/src/Api/Generated/Endpoint/GetCustomer.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** @@ -18,7 +18,7 @@ public function __construct(int $customerId, array $queryParameters = array()) $this->customerId = $customerId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,7 +41,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -51,13 +51,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\CustomerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomerAddress.php b/src/Api/Generated/Endpoint/GetCustomerAddress.php index 076095b5..c37a0eba 100644 --- a/src/Api/Generated/Endpoint/GetCustomerAddress.php +++ b/src/Api/Generated/Endpoint/GetCustomerAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomerAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomerAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $addressType; @@ -17,7 +17,7 @@ public function __construct(int $customerId, string $addressType) $this->customerId = $customerId; $this->addressType = $addressType; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetCustomerAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetCustomerAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomerExternalService.php b/src/Api/Generated/Endpoint/GetCustomerExternalService.php index b0fafeae..1ee5c5e8 100644 --- a/src/Api/Generated/Endpoint/GetCustomerExternalService.php +++ b/src/Api/Generated/Endpoint/GetCustomerExternalService.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomerExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomerExternalService extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $serviceName; @@ -17,7 +17,7 @@ public function __construct(int $customerId, string $serviceName) $this->customerId = $customerId; $this->serviceName = $serviceName; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerExternalServicesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetCustomerExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetCustomerExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomerExternalServices.php b/src/Api/Generated/Endpoint/GetCustomerExternalServices.php index af889a82..83e7f12d 100644 --- a/src/Api/Generated/Endpoint/GetCustomerExternalServices.php +++ b/src/Api/Generated/Endpoint/GetCustomerExternalServices.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomerExternalServices extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomerExternalServices extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** @@ -14,7 +14,7 @@ public function __construct(int $customerId) { $this->customerId = $customerId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerExternalServicesModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomerGroups.php b/src/Api/Generated/Endpoint/GetCustomerGroups.php index 7f4284b1..1a959a3e 100644 --- a/src/Api/Generated/Endpoint/GetCustomerGroups.php +++ b/src/Api/Generated/Endpoint/GetCustomerGroups.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomerGroups extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomerGroups extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** @@ -14,7 +14,7 @@ public function __construct(int $customerId) { $this->customerId = $customerId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomerTag.php b/src/Api/Generated/Endpoint/GetCustomerTag.php index 3627be4a..079fc03e 100644 --- a/src/Api/Generated/Endpoint/GetCustomerTag.php +++ b/src/Api/Generated/Endpoint/GetCustomerTag.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomerTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomerTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $tagId; @@ -17,7 +17,7 @@ public function __construct(int $customerId, int $tagId) $this->customerId = $customerId; $this->tagId = $tagId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetCustomerTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetCustomerTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomerTags.php b/src/Api/Generated/Endpoint/GetCustomerTags.php index 45aa3675..fbc7c891 100644 --- a/src/Api/Generated/Endpoint/GetCustomerTags.php +++ b/src/Api/Generated/Endpoint/GetCustomerTags.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomerTags extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomerTags extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** @@ -14,7 +14,7 @@ public function __construct(int $customerId) { $this->customerId = $customerId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddedTagModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomersTag.php b/src/Api/Generated/Endpoint/GetCustomersTag.php index addad8ca..7e9952ca 100644 --- a/src/Api/Generated/Endpoint/GetCustomersTag.php +++ b/src/Api/Generated/Endpoint/GetCustomersTag.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomersTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomersTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $tagId; /** @@ -14,7 +14,7 @@ public function __construct(int $tagId) { $this->tagId = $tagId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetCustomersTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetCustomersTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetCustomersTags.php b/src/Api/Generated/Endpoint/GetCustomersTags.php index 2d170544..9ffec8fc 100644 --- a/src/Api/Generated/Endpoint/GetCustomersTags.php +++ b/src/Api/Generated/Endpoint/GetCustomersTags.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetCustomersTags extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetCustomersTags extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerTagModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetMediaFile.php b/src/Api/Generated/Endpoint/GetMediaFile.php index 75c91894..4864f610 100644 --- a/src/Api/Generated/Endpoint/GetMediaFile.php +++ b/src/Api/Generated/Endpoint/GetMediaFile.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetMediaFile extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetMediaFile extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $mediaFileId; /** @@ -14,7 +14,7 @@ public function __construct(int $mediaFileId) { $this->mediaFileId = $mediaFileId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetMediaFiles.php b/src/Api/Generated/Endpoint/GetMediaFiles.php index 73f06fe8..5f0cfb6f 100644 --- a/src/Api/Generated/Endpoint/GetMediaFiles.php +++ b/src/Api/Generated/Endpoint/GetMediaFiles.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetMediaFiles extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetMediaFiles extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Returns a list of media file‚ @@ -15,7 +15,7 @@ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,7 +38,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('page', array('int')); return $optionsResolver; } /** @@ -47,10 +47,16 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\MediaFileModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrder.php b/src/Api/Generated/Endpoint/GetOrder.php index 922e2f3d..4e3a49cf 100644 --- a/src/Api/Generated/Endpoint/GetOrder.php +++ b/src/Api/Generated/Endpoint/GetOrder.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -18,7 +18,7 @@ public function __construct(int $orderId, array $queryParameters = array()) $this->orderId = $orderId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,7 +41,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -51,13 +51,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\OrderModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderAddress.php b/src/Api/Generated/Endpoint/GetOrderAddress.php index af2f4b33..cb48e43f 100644 --- a/src/Api/Generated/Endpoint/GetOrderAddress.php +++ b/src/Api/Generated/Endpoint/GetOrderAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $addressType; @@ -17,7 +17,7 @@ public function __construct(int $orderId, string $addressType) $this->orderId = $orderId; $this->addressType = $addressType; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\AddressModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\AddressModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderComment.php b/src/Api/Generated/Endpoint/GetOrderComment.php index af53d7ee..d50570de 100644 --- a/src/Api/Generated/Endpoint/GetOrderComment.php +++ b/src/Api/Generated/Endpoint/GetOrderComment.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderComment extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderComment extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $commentId; @@ -17,7 +17,7 @@ public function __construct(int $orderId, int $commentId) $this->orderId = $orderId; $this->commentId = $commentId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetOrderCommentNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetOrderCommentNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderComments.php b/src/Api/Generated/Endpoint/GetOrderComments.php index dae86043..aa2bff1f 100644 --- a/src/Api/Generated/Endpoint/GetOrderComments.php +++ b/src/Api/Generated/Endpoint/GetOrderComments.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderComments extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderComments extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -14,7 +14,7 @@ public function __construct(int $orderId) { $this->orderId = $orderId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderExternalService.php b/src/Api/Generated/Endpoint/GetOrderExternalService.php index 888c0351..793bad77 100644 --- a/src/Api/Generated/Endpoint/GetOrderExternalService.php +++ b/src/Api/Generated/Endpoint/GetOrderExternalService.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderExternalService extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $serviceName; @@ -17,7 +17,7 @@ public function __construct(int $orderId, string $serviceName) $this->orderId = $orderId; $this->serviceName = $serviceName; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderExternalServices.php b/src/Api/Generated/Endpoint/GetOrderExternalServices.php index 500efccd..07b06317 100644 --- a/src/Api/Generated/Endpoint/GetOrderExternalServices.php +++ b/src/Api/Generated/Endpoint/GetOrderExternalServices.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderExternalServices extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderExternalServices extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -14,7 +14,7 @@ public function __construct(int $orderId) { $this->orderId = $orderId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderExternalServiceModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderItem.php b/src/Api/Generated/Endpoint/GetOrderItem.php index b3e3b88d..72b8e0cc 100644 --- a/src/Api/Generated/Endpoint/GetOrderItem.php +++ b/src/Api/Generated/Endpoint/GetOrderItem.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderItem extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $orderItemId; @@ -21,7 +21,7 @@ public function __construct(int $orderId, int $orderItemId, array $queryParamete $this->orderItemId = $orderItemId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,7 +44,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -54,13 +54,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderItems.php b/src/Api/Generated/Endpoint/GetOrderItems.php index e8900456..ae853227 100644 --- a/src/Api/Generated/Endpoint/GetOrderItems.php +++ b/src/Api/Generated/Endpoint/GetOrderItems.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderItems extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderItems extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -14,7 +14,7 @@ public function __construct(int $orderId) { $this->orderId = $orderId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderItemModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderStatus.php b/src/Api/Generated/Endpoint/GetOrderStatus.php index fe05e538..a2b2d070 100644 --- a/src/Api/Generated/Endpoint/GetOrderStatus.php +++ b/src/Api/Generated/Endpoint/GetOrderStatus.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderStatusId; /** @@ -14,7 +14,7 @@ public function __construct(int $orderStatusId) { $this->orderStatusId = $orderStatusId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetOrderStatuses.php b/src/Api/Generated/Endpoint/GetOrderStatuses.php index 93b536f8..50f6e538 100644 --- a/src/Api/Generated/Endpoint/GetOrderStatuses.php +++ b/src/Api/Generated/Endpoint/GetOrderStatuses.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetOrderStatuses extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetOrderStatuses extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetPaymentMethod.php b/src/Api/Generated/Endpoint/GetPaymentMethod.php index 7f748abb..b9c61929 100644 --- a/src/Api/Generated/Endpoint/GetPaymentMethod.php +++ b/src/Api/Generated/Endpoint/GetPaymentMethod.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetPaymentMethod extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetPaymentMethod extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $paymentMethodId; /** @@ -14,7 +14,7 @@ public function __construct(int $paymentMethodId) { $this->paymentMethodId = $paymentMethodId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PaymentMethodModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetPaymentMethodNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetPaymentMethodNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetPaymentMethods.php b/src/Api/Generated/Endpoint/GetPaymentMethods.php index 8861e881..2e658981 100644 --- a/src/Api/Generated/Endpoint/GetPaymentMethods.php +++ b/src/Api/Generated/Endpoint/GetPaymentMethods.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetPaymentMethods extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetPaymentMethods extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PaymentMethodModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetPricelist.php b/src/Api/Generated/Endpoint/GetPricelist.php index 19eafe27..571bc308 100644 --- a/src/Api/Generated/Endpoint/GetPricelist.php +++ b/src/Api/Generated/Endpoint/GetPricelist.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetPricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetPricelist extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $pricelistId; /** @@ -14,7 +14,7 @@ public function __construct(int $pricelistId) { $this->pricelistId = $pricelistId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PricelistModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetPricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetPricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetPricelists.php b/src/Api/Generated/Endpoint/GetPricelists.php index 39957918..4748d00d 100644 --- a/src/Api/Generated/Endpoint/GetPricelists.php +++ b/src/Api/Generated/Endpoint/GetPricelists.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetPricelists extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetPricelists extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PricelistModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProduct.php b/src/Api/Generated/Endpoint/GetProduct.php index 7a348619..23a36714 100644 --- a/src/Api/Generated/Endpoint/GetProduct.php +++ b/src/Api/Generated/Endpoint/GetProduct.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -18,7 +18,7 @@ public function __construct(int $productId, array $queryParameters = array()) $this->productId = $productId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,7 +41,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -51,13 +51,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductBundledProductsPricelistPrice.php b/src/Api/Generated/Endpoint/GetProductBundledProductsPricelistPrice.php index 8d6fb86f..3e3c4bf1 100644 --- a/src/Api/Generated/Endpoint/GetProductBundledProductsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/GetProductBundledProductsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductBundledProductsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductBundledProductsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -20,7 +20,7 @@ public function __construct(int $productId, int $bundledProductId, int $pricelis $this->bundledProductId = $bundledProductId; $this->pricelistId = $pricelistId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductCategory.php b/src/Api/Generated/Endpoint/GetProductCategory.php index d724a774..244f4bb8 100644 --- a/src/Api/Generated/Endpoint/GetProductCategory.php +++ b/src/Api/Generated/Endpoint/GetProductCategory.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductCategory extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductCategory extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $categoryId; /** @@ -18,7 +18,7 @@ public function __construct(int $categoryId, array $queryParameters = array()) $this->categoryId = $categoryId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,7 +41,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -51,13 +51,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductManufacturer.php b/src/Api/Generated/Endpoint/GetProductManufacturer.php index 29f91602..952efc3f 100644 --- a/src/Api/Generated/Endpoint/GetProductManufacturer.php +++ b/src/Api/Generated/Endpoint/GetProductManufacturer.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductManufacturer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductManufacturer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $manufacturerId; /** @@ -14,7 +14,7 @@ public function __construct(int $manufacturerId) { $this->manufacturerId = $manufacturerId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductMetaDataType.php b/src/Api/Generated/Endpoint/GetProductMetaDataType.php index b5a6174e..5585d30e 100644 --- a/src/Api/Generated/Endpoint/GetProductMetaDataType.php +++ b/src/Api/Generated/Endpoint/GetProductMetaDataType.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductMetaDataType extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductMetaDataType extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $metaDataTypeId; /** @@ -14,7 +14,7 @@ public function __construct(int $metaDataTypeId) { $this->metaDataTypeId = $metaDataTypeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductStockStatus.php b/src/Api/Generated/Endpoint/GetProductStockStatus.php index fe2b869e..549a05b0 100644 --- a/src/Api/Generated/Endpoint/GetProductStockStatus.php +++ b/src/Api/Generated/Endpoint/GetProductStockStatus.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductStockStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockStatusId; /** @@ -14,7 +14,7 @@ public function __construct(int $stockStatusId) { $this->stockStatusId = $stockStatusId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductTagLink.php b/src/Api/Generated/Endpoint/GetProductTagLink.php index dfe7169d..d1481c65 100644 --- a/src/Api/Generated/Endpoint/GetProductTagLink.php +++ b/src/Api/Generated/Endpoint/GetProductTagLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductTagLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductTagLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $tagOptionId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $tagOptionId) $this->productId = $productId; $this->tagOptionId = $tagOptionId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductTagLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductTagLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductTagOptions.php b/src/Api/Generated/Endpoint/GetProductTagOptions.php index 209d5a57..495f9e69 100644 --- a/src/Api/Generated/Endpoint/GetProductTagOptions.php +++ b/src/Api/Generated/Endpoint/GetProductTagOptions.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductTagOptions extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductTagOptions extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; protected $productTagOptionId; @@ -17,7 +17,7 @@ public function __construct(int $productTagId, int $productTagOptionId) $this->productTagId = $productTagId; $this->productTagOptionId = $productTagOptionId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductTagOptionsNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductTagOptionsNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductUnit.php b/src/Api/Generated/Endpoint/GetProductUnit.php index 39a5e3b7..8b59548d 100644 --- a/src/Api/Generated/Endpoint/GetProductUnit.php +++ b/src/Api/Generated/Endpoint/GetProductUnit.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductUnit extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $unitId; /** @@ -14,7 +14,7 @@ public function __construct(int $unitId) { $this->unitId = $unitId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductVariantStock.php b/src/Api/Generated/Endpoint/GetProductVariantStock.php index 4acc5ab4..24e25c32 100644 --- a/src/Api/Generated/Endpoint/GetProductVariantStock.php +++ b/src/Api/Generated/Endpoint/GetProductVariantStock.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductVariantStock extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductVariantStock extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -20,7 +20,7 @@ public function __construct(int $productId, int $variantId, int $stockLocationId $this->variantId = $variantId; $this->stockLocationId = $stockLocationId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsAttribute.php b/src/Api/Generated/Endpoint/GetProductsAttribute.php index 12b9045e..09af15dd 100644 --- a/src/Api/Generated/Endpoint/GetProductsAttribute.php +++ b/src/Api/Generated/Endpoint/GetProductsAttribute.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsAttribute extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $attributeId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $attributeId) $this->productId = $productId; $this->attributeId = $attributeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsAttributeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsAttributeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsBundledProducts.php b/src/Api/Generated/Endpoint/GetProductsBundledProducts.php index bce87436..6604d1ee 100644 --- a/src/Api/Generated/Endpoint/GetProductsBundledProducts.php +++ b/src/Api/Generated/Endpoint/GetProductsBundledProducts.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsBundledProducts extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsBundledProducts extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -21,7 +21,7 @@ public function __construct(int $productId, int $bundledProductId, array $queryP $this->bundledProductId = $bundledProductId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,7 +44,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -54,13 +54,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsBundledProductsNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsBundledProductsNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsCategoryLink.php b/src/Api/Generated/Endpoint/GetProductsCategoryLink.php index 19afb3d7..546f903f 100644 --- a/src/Api/Generated/Endpoint/GetProductsCategoryLink.php +++ b/src/Api/Generated/Endpoint/GetProductsCategoryLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsCategoryLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $categoryId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $categoryId) $this->productId = $productId; $this->categoryId = $categoryId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsLanguage.php b/src/Api/Generated/Endpoint/GetProductsLanguage.php index a96e3cbd..a957e506 100644 --- a/src/Api/Generated/Endpoint/GetProductsLanguage.php +++ b/src/Api/Generated/Endpoint/GetProductsLanguage.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsLanguage extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $langCode; @@ -17,7 +17,7 @@ public function __construct(int $productId, string $langCode) $this->productId = $productId; $this->langCode = $langCode; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsMediaFileLink.php b/src/Api/Generated/Endpoint/GetProductsMediaFileLink.php index fe71b857..87794ddc 100644 --- a/src/Api/Generated/Endpoint/GetProductsMediaFileLink.php +++ b/src/Api/Generated/Endpoint/GetProductsMediaFileLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsMediaFileLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $mediaFileId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $mediaFileId) $this->productId = $productId; $this->mediaFileId = $mediaFileId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsMetaData.php b/src/Api/Generated/Endpoint/GetProductsMetaData.php index 3985ea72..7d75a9cb 100644 --- a/src/Api/Generated/Endpoint/GetProductsMetaData.php +++ b/src/Api/Generated/Endpoint/GetProductsMetaData.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsMetaData extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $metaDataTypeId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $metaDataTypeId) $this->productId = $productId; $this->metaDataTypeId = $metaDataTypeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsTag.php b/src/Api/Generated/Endpoint/GetProductsTag.php index 4807f98f..89bd561a 100644 --- a/src/Api/Generated/Endpoint/GetProductsTag.php +++ b/src/Api/Generated/Endpoint/GetProductsTag.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; /** @@ -14,7 +14,7 @@ public function __construct(int $productTagId) { $this->productTagId = $productTagId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsTagOptions.php b/src/Api/Generated/Endpoint/GetProductsTagOptions.php index 54e002b6..492bdcd0 100644 --- a/src/Api/Generated/Endpoint/GetProductsTagOptions.php +++ b/src/Api/Generated/Endpoint/GetProductsTagOptions.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsTagOptions extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsTagOptions extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; /** @@ -14,7 +14,7 @@ public function __construct(int $productTagId) { $this->productTagId = $productTagId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsTags.php b/src/Api/Generated/Endpoint/GetProductsTags.php index 1624c877..8d4112bb 100644 --- a/src/Api/Generated/Endpoint/GetProductsTags.php +++ b/src/Api/Generated/Endpoint/GetProductsTags.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsTags extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsTags extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsVariant.php b/src/Api/Generated/Endpoint/GetProductsVariant.php index 3e53fcad..98ab80dd 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariant.php +++ b/src/Api/Generated/Endpoint/GetProductsVariant.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsVariant extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -21,7 +21,7 @@ public function __construct(int $productId, int $variantId, array $queryParamete $this->variantId = $variantId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,7 +44,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -54,13 +54,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsVariantsAttribute.php b/src/Api/Generated/Endpoint/GetProductsVariantsAttribute.php index 7ad963e1..7731a80a 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariantsAttribute.php +++ b/src/Api/Generated/Endpoint/GetProductsVariantsAttribute.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsVariantsAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsVariantsAttribute extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; /** @@ -14,7 +14,7 @@ public function __construct(int $attributeId) { $this->attributeId = $attributeId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsVariantsAttributeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsVariantsAttributeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsVariantsAttributeValue.php b/src/Api/Generated/Endpoint/GetProductsVariantsAttributeValue.php index 816af089..9e6c93c9 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariantsAttributeValue.php +++ b/src/Api/Generated/Endpoint/GetProductsVariantsAttributeValue.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsVariantsAttributeValue extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsVariantsAttributeValue extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; protected $attributeValueId; @@ -21,7 +21,7 @@ public function __construct(int $attributeId, int $attributeValueId, array $quer $this->attributeValueId = $attributeValueId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,7 +44,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -54,13 +54,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsVariantsAttributeValueNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsVariantsAttributeValueNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php index 8f04973f..f94afa26 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/GetProductsVariantsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsVariantsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -24,7 +24,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, ar $this->pricelistId = $pricelistId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -47,7 +47,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -57,13 +57,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsVariantsPricelistVolumePrice.php b/src/Api/Generated/Endpoint/GetProductsVariantsPricelistVolumePrice.php index 8fea3e51..0d919b60 100644 --- a/src/Api/Generated/Endpoint/GetProductsVariantsPricelistVolumePrice.php +++ b/src/Api/Generated/Endpoint/GetProductsVariantsPricelistVolumePrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsVariantsPricelistVolumePrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsVariantsPricelistVolumePrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -23,7 +23,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, in $this->pricelistId = $pricelistId; $this->quantity = $quantity; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -47,13 +47,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetProductsVatRate.php b/src/Api/Generated/Endpoint/GetProductsVatRate.php index 7196e80d..73c3295d 100644 --- a/src/Api/Generated/Endpoint/GetProductsVatRate.php +++ b/src/Api/Generated/Endpoint/GetProductsVatRate.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetProductsVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetProductsVatRate extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $countryCode; @@ -17,7 +17,7 @@ public function __construct(int $productId, string $countryCode) $this->productId = $productId; $this->countryCode = $countryCode; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetShippingMethod.php b/src/Api/Generated/Endpoint/GetShippingMethod.php index 6ea29062..88c1afd4 100644 --- a/src/Api/Generated/Endpoint/GetShippingMethod.php +++ b/src/Api/Generated/Endpoint/GetShippingMethod.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetShippingMethod extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetShippingMethod extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $shippingMethodId; /** @@ -14,7 +14,7 @@ public function __construct(int $shippingMethodId) { $this->shippingMethodId = $shippingMethodId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ShippingMethodModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetShippingMethodNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetShippingMethodNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetShippingMethods.php b/src/Api/Generated/Endpoint/GetShippingMethods.php index 94b8e3d6..e32f5103 100644 --- a/src/Api/Generated/Endpoint/GetShippingMethods.php +++ b/src/Api/Generated/Endpoint/GetShippingMethods.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetShippingMethods extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetShippingMethods extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ShippingMethodModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetShippingTrackingTypes.php b/src/Api/Generated/Endpoint/GetShippingTrackingTypes.php index 0c30b39a..500e814d 100644 --- a/src/Api/Generated/Endpoint/GetShippingTrackingTypes.php +++ b/src/Api/Generated/Endpoint/GetShippingTrackingTypes.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetShippingTrackingTypes extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetShippingTrackingTypes extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -27,10 +27,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ShippingTrackingTypeModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetShop.php b/src/Api/Generated/Endpoint/GetShop.php index 16753b98..025f9748 100644 --- a/src/Api/Generated/Endpoint/GetShop.php +++ b/src/Api/Generated/Endpoint/GetShop.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class GetShop extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetShop extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ShopItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ShopItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetShopNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetShopNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetStockLocation.php b/src/Api/Generated/Endpoint/GetStockLocation.php index 964b8c96..8597357e 100644 --- a/src/Api/Generated/Endpoint/GetStockLocation.php +++ b/src/Api/Generated/Endpoint/GetStockLocation.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetStockLocation extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetStockLocation extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockLocationId; /** @@ -14,7 +14,7 @@ public function __construct(int $stockLocationId) { $this->stockLocationId = $stockLocationId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetVatRate.php b/src/Api/Generated/Endpoint/GetVatRate.php index 4ea30b49..ee023eb0 100644 --- a/src/Api/Generated/Endpoint/GetVatRate.php +++ b/src/Api/Generated/Endpoint/GetVatRate.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetVatRate extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $countryCode; /** @@ -14,7 +14,7 @@ public function __construct(string $countryCode) { $this->countryCode = $countryCode; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\VatRateModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\VatRateModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetWebHook.php b/src/Api/Generated/Endpoint/GetWebHook.php index 549e61ed..836d6c8a 100644 --- a/src/Api/Generated/Endpoint/GetWebHook.php +++ b/src/Api/Generated/Endpoint/GetWebHook.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetWebHook extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetWebHook extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $webHookId; /** @@ -14,7 +14,7 @@ public function __construct(int $webHookId) { $this->webHookId = $webHookId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\WebHookModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\GetWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\GetWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/GetWebHooks.php b/src/Api/Generated/Endpoint/GetWebHooks.php index 358e3c4d..f994685e 100644 --- a/src/Api/Generated/Endpoint/GetWebHooks.php +++ b/src/Api/Generated/Endpoint/GetWebHooks.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class GetWebHooks extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class GetWebHooks extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * @@ -16,7 +16,7 @@ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -39,8 +39,8 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('sortBy', 'sortOrder')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('sortBy', array('string')); - $optionsResolver->setAllowedTypes('sortOrder', array('string')); + $optionsResolver->addAllowedTypes('sortBy', array('string')); + $optionsResolver->addAllowedTypes('sortOrder', array('string')); return $optionsResolver; } /** @@ -49,10 +49,16 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\WebHookModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListCustomers.php b/src/Api/Generated/Endpoint/ListCustomers.php index 6c425c43..515c5efb 100644 --- a/src/Api/Generated/Endpoint/ListCustomers.php +++ b/src/Api/Generated/Endpoint/ListCustomers.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListCustomers extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListCustomers extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Returns a list of customers @@ -21,7 +21,7 @@ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,13 +44,13 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page', 'sortBy', 'sortOrder', 'createdSince', 'updatedSince', 'includeWithoutAccount', 'include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); - $optionsResolver->setAllowedTypes('sortBy', array('string')); - $optionsResolver->setAllowedTypes('sortOrder', array('string')); - $optionsResolver->setAllowedTypes('createdSince', array('string')); - $optionsResolver->setAllowedTypes('updatedSince', array('string')); - $optionsResolver->setAllowedTypes('includeWithoutAccount', array('bool')); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('sortBy', array('string')); + $optionsResolver->addAllowedTypes('sortOrder', array('string')); + $optionsResolver->addAllowedTypes('createdSince', array('string')); + $optionsResolver->addAllowedTypes('updatedSince', array('string')); + $optionsResolver->addAllowedTypes('includeWithoutAccount', array('bool')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -60,13 +60,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\CustomerModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListCustomersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListCustomersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListOrderAddresses.php b/src/Api/Generated/Endpoint/ListOrderAddresses.php index 0d165b09..5b9b0163 100644 --- a/src/Api/Generated/Endpoint/ListOrderAddresses.php +++ b/src/Api/Generated/Endpoint/ListOrderAddresses.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListOrderAddresses extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListOrderAddresses extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** @@ -14,7 +14,7 @@ public function __construct(int $orderId) { $this->orderId = $orderId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -37,10 +37,16 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderAddressCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection', 'json'); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListOrders.php b/src/Api/Generated/Endpoint/ListOrders.php index 2452ace7..38870a3f 100644 --- a/src/Api/Generated/Endpoint/ListOrders.php +++ b/src/Api/Generated/Endpoint/ListOrders.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListOrders extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListOrders extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Returns a list of orders. @@ -25,7 +25,7 @@ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -48,17 +48,17 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page', 'includeNonCompletePayments', 'filterQuery', 'filterPaymentMethodId', 'filterShippingMethodId', 'ordersCreatedAfter', 'ordersCreatedBefore', 'statusFilter', 'sortBy', 'sortOrder', 'include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); - $optionsResolver->setAllowedTypes('includeNonCompletePayments', array('bool')); - $optionsResolver->setAllowedTypes('filterQuery', array('string')); - $optionsResolver->setAllowedTypes('filterPaymentMethodId', array('int')); - $optionsResolver->setAllowedTypes('filterShippingMethodId', array('int')); - $optionsResolver->setAllowedTypes('ordersCreatedAfter', array('string')); - $optionsResolver->setAllowedTypes('ordersCreatedBefore', array('string')); - $optionsResolver->setAllowedTypes('statusFilter', array('int')); - $optionsResolver->setAllowedTypes('sortBy', array('string')); - $optionsResolver->setAllowedTypes('sortOrder', array('string')); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('includeNonCompletePayments', array('bool')); + $optionsResolver->addAllowedTypes('filterQuery', array('string')); + $optionsResolver->addAllowedTypes('filterPaymentMethodId', array('int')); + $optionsResolver->addAllowedTypes('filterShippingMethodId', array('int')); + $optionsResolver->addAllowedTypes('ordersCreatedAfter', array('string')); + $optionsResolver->addAllowedTypes('ordersCreatedBefore', array('string')); + $optionsResolver->addAllowedTypes('statusFilter', array('int')); + $optionsResolver->addAllowedTypes('sortBy', array('string')); + $optionsResolver->addAllowedTypes('sortOrder', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -68,13 +68,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\OrderModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListOrdersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListOrdersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductBundledProductsPricelistPrices.php b/src/Api/Generated/Endpoint/ListProductBundledProductsPricelistPrices.php index fcf64178..67ad66be 100644 --- a/src/Api/Generated/Endpoint/ListProductBundledProductsPricelistPrices.php +++ b/src/Api/Generated/Endpoint/ListProductBundledProductsPricelistPrices.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductBundledProductsPricelistPrices extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductBundledProductsPricelistPrices extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $bundledProductId) $this->productId = $productId; $this->bundledProductId = $bundledProductId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductBundledProductsPricelistPricesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductBundledProductsPricelistPricesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductCategories.php b/src/Api/Generated/Endpoint/ListProductCategories.php index 49277728..a07beed6 100644 --- a/src/Api/Generated/Endpoint/ListProductCategories.php +++ b/src/Api/Generated/Endpoint/ListProductCategories.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductCategories extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductCategories extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Returns a list of product categories @@ -19,7 +19,7 @@ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -42,11 +42,11 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page', 'externalId', 'parent', 'filterVisible', 'include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); - $optionsResolver->setAllowedTypes('externalId', array('string')); - $optionsResolver->setAllowedTypes('parent', array('int')); - $optionsResolver->setAllowedTypes('filterVisible', array('bool')); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('externalId', array('string')); + $optionsResolver->addAllowedTypes('parent', array('int')); + $optionsResolver->addAllowedTypes('filterVisible', array('bool')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -56,13 +56,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductCategoriesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductCategoriesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductManufacturers.php b/src/Api/Generated/Endpoint/ListProductManufacturers.php index 8e9389ba..e3342205 100644 --- a/src/Api/Generated/Endpoint/ListProductManufacturers.php +++ b/src/Api/Generated/Endpoint/ListProductManufacturers.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductManufacturers extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductManufacturers extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductManufacturersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductManufacturersBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductMetaDataTypes.php b/src/Api/Generated/Endpoint/ListProductMetaDataTypes.php index ea7a4841..e3070fc9 100644 --- a/src/Api/Generated/Endpoint/ListProductMetaDataTypes.php +++ b/src/Api/Generated/Endpoint/ListProductMetaDataTypes.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductMetaDataTypes extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductMetaDataTypes extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductMetaDataTypesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductMetaDataTypesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductStockStatses.php b/src/Api/Generated/Endpoint/ListProductStockStatses.php index 35cf6f77..f753c8b3 100644 --- a/src/Api/Generated/Endpoint/ListProductStockStatses.php +++ b/src/Api/Generated/Endpoint/ListProductStockStatses.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductStockStatses extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductStockStatses extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductStockStatsesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductStockStatsesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductTagLinks.php b/src/Api/Generated/Endpoint/ListProductTagLinks.php index a499221f..22c188c3 100644 --- a/src/Api/Generated/Endpoint/ListProductTagLinks.php +++ b/src/Api/Generated/Endpoint/ListProductTagLinks.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductTagLinks extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductTagLinks extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagLinkModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductTagLinksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductTagLinksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductUnits.php b/src/Api/Generated/Endpoint/ListProductUnits.php index 10dce958..032ac242 100644 --- a/src/Api/Generated/Endpoint/ListProductUnits.php +++ b/src/Api/Generated/Endpoint/ListProductUnits.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductUnits extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductUnits extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductUnitsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductUnitsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProducts.php b/src/Api/Generated/Endpoint/ListProducts.php index c9bd96c8..79ac3ee8 100644 --- a/src/Api/Generated/Endpoint/ListProducts.php +++ b/src/Api/Generated/Endpoint/ListProducts.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProducts extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProducts extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { /** * Returns a list of products. @@ -22,7 +22,7 @@ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -45,14 +45,14 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page', 'sortBy', 'sortOrder', 'createdSince', 'updatedSince', 'filterVisible', 'filterSku', 'include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); - $optionsResolver->setAllowedTypes('sortBy', array('string')); - $optionsResolver->setAllowedTypes('sortOrder', array('string')); - $optionsResolver->setAllowedTypes('createdSince', array('string')); - $optionsResolver->setAllowedTypes('updatedSince', array('string')); - $optionsResolver->setAllowedTypes('filterVisible', array('bool')); - $optionsResolver->setAllowedTypes('filterSku', array('string')); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('sortBy', array('string')); + $optionsResolver->addAllowedTypes('sortOrder', array('string')); + $optionsResolver->addAllowedTypes('createdSince', array('string')); + $optionsResolver->addAllowedTypes('updatedSince', array('string')); + $optionsResolver->addAllowedTypes('filterVisible', array('bool')); + $optionsResolver->addAllowedTypes('filterSku', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -62,13 +62,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsAttributes.php b/src/Api/Generated/Endpoint/ListProductsAttributes.php index 91e3c266..b47036e9 100644 --- a/src/Api/Generated/Endpoint/ListProductsAttributes.php +++ b/src/Api/Generated/Endpoint/ListProductsAttributes.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsAttributes extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsAttributes extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsAttributesNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsAttributesNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsBundledProducts.php b/src/Api/Generated/Endpoint/ListProductsBundledProducts.php index 1d1921fb..c9c9914c 100644 --- a/src/Api/Generated/Endpoint/ListProductsBundledProducts.php +++ b/src/Api/Generated/Endpoint/ListProductsBundledProducts.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsBundledProducts extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsBundledProducts extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -19,7 +19,7 @@ public function __construct(int $productId, array $queryParameters = array()) $this->productId = $productId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -42,8 +42,8 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page', 'include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -53,13 +53,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsBundledProductsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsBundledProductsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsCategoryLinks.php b/src/Api/Generated/Endpoint/ListProductsCategoryLinks.php index 5d805929..2a95b4f7 100644 --- a/src/Api/Generated/Endpoint/ListProductsCategoryLinks.php +++ b/src/Api/Generated/Endpoint/ListProductsCategoryLinks.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsCategoryLinks extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsCategoryLinks extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsCategoryLinksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsCategoryLinksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsLanguages.php b/src/Api/Generated/Endpoint/ListProductsLanguages.php index c8333dc7..0837f6ff 100644 --- a/src/Api/Generated/Endpoint/ListProductsLanguages.php +++ b/src/Api/Generated/Endpoint/ListProductsLanguages.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsLanguages extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsLanguages extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsLanguagesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsLanguagesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsMediaFileLinks.php b/src/Api/Generated/Endpoint/ListProductsMediaFileLinks.php index 11b4a4eb..12e813e4 100644 --- a/src/Api/Generated/Endpoint/ListProductsMediaFileLinks.php +++ b/src/Api/Generated/Endpoint/ListProductsMediaFileLinks.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsMediaFileLinks extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsMediaFileLinks extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsMediaFileLinksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsMediaFileLinksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsMetaData.php b/src/Api/Generated/Endpoint/ListProductsMetaData.php index a73253eb..0b91ce32 100644 --- a/src/Api/Generated/Endpoint/ListProductsMetaData.php +++ b/src/Api/Generated/Endpoint/ListProductsMetaData.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsMetaData extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVariants.php b/src/Api/Generated/Endpoint/ListProductsVariants.php index 38baa991..260a7acb 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariants.php +++ b/src/Api/Generated/Endpoint/ListProductsVariants.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVariants extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVariants extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -19,7 +19,7 @@ public function __construct(int $productId, array $queryParameters = array()) $this->productId = $productId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -42,8 +42,8 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('page', 'include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('page', array('int')); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('page', array('int')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -53,13 +53,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVariantsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVariantsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/ListProductsVariantsAttributeValues.php index c288a1ee..6b1fa7c8 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/ListProductsVariantsAttributeValues.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVariantsAttributeValues extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; /** @@ -18,7 +18,7 @@ public function __construct(int $attributeId, array $queryParameters = array()) $this->attributeId = $attributeId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,7 +41,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -51,13 +51,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVariantsAttributes.php b/src/Api/Generated/Endpoint/ListProductsVariantsAttributes.php index acf17e86..da66675f 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariantsAttributes.php +++ b/src/Api/Generated/Endpoint/ListProductsVariantsAttributes.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVariantsAttributes extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVariantsAttributes extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVariantsAttributesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVariantsAttributesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php b/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php index 79538de4..f0a1419a 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php +++ b/src/Api/Generated/Endpoint/ListProductsVariantsPricelistPrices.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVariantsPricelistPrices extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVariantsPricelistPrices extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -21,7 +21,7 @@ public function __construct(int $productId, int $variantId, array $queryParamete $this->variantId = $variantId; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,7 +44,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -54,13 +54,19 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistPricesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistPricesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVariantsPricelistVolumePrices.php b/src/Api/Generated/Endpoint/ListProductsVariantsPricelistVolumePrices.php index 88ea36e0..987d762d 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariantsPricelistVolumePrices.php +++ b/src/Api/Generated/Endpoint/ListProductsVariantsPricelistVolumePrices.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVariantsPricelistVolumePrices extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVariantsPricelistVolumePrices extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -20,7 +20,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId) $this->variantId = $variantId; $this->pricelistId = $pricelistId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistVolumePricesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVariantsPricelistVolumePricesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVariantsStocks.php b/src/Api/Generated/Endpoint/ListProductsVariantsStocks.php index 29d05e00..f367822a 100644 --- a/src/Api/Generated/Endpoint/ListProductsVariantsStocks.php +++ b/src/Api/Generated/Endpoint/ListProductsVariantsStocks.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVariantsStocks extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVariantsStocks extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -17,7 +17,7 @@ public function __construct(int $productId, int $variantId) $this->productId = $productId; $this->variantId = $variantId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVariantsStocksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVariantsStocksBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListProductsVatRates.php b/src/Api/Generated/Endpoint/ListProductsVatRates.php index c5ffc5e0..9ba007b8 100644 --- a/src/Api/Generated/Endpoint/ListProductsVatRates.php +++ b/src/Api/Generated/Endpoint/ListProductsVatRates.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class ListProductsVatRates extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListProductsVatRates extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** @@ -14,7 +14,7 @@ public function __construct(int $productId) { $this->productId = $productId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -38,13 +38,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListProductsVatRatesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListProductsVatRatesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListStockLocations.php b/src/Api/Generated/Endpoint/ListStockLocations.php index 93523b88..ed52498a 100644 --- a/src/Api/Generated/Endpoint/ListStockLocations.php +++ b/src/Api/Generated/Endpoint/ListStockLocations.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListStockLocations extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListStockLocations extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\StockLocationModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListStockLocationsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListStockLocationsBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/ListVatRates.php b/src/Api/Generated/Endpoint/ListVatRates.php index ab2b78a8..3eb3c3ac 100644 --- a/src/Api/Generated/Endpoint/ListVatRates.php +++ b/src/Api/Generated/Endpoint/ListVatRates.php @@ -2,9 +2,9 @@ namespace Starweb\Api\Generated\Endpoint; -class ListVatRates extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class ListVatRates extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; @@ -28,13 +28,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\VatRateModelCollection */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\ListVatRatesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\ListVatRatesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchAttribute.php b/src/Api/Generated/Endpoint/PatchAttribute.php index ac3fdc26..dcffbca3 100644 --- a/src/Api/Generated/Endpoint/PatchAttribute.php +++ b/src/Api/Generated/Endpoint/PatchAttribute.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchAttribute extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; /** @@ -10,14 +10,14 @@ class PatchAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements Retrieves the updated `ProductVariantAttribute` object. * * @param int $attributeId The attribute value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody */ - public function __construct(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody) + public function __construct(int $attributeId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody = null) { $this->attributeId = $attributeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchAttributeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchAttributeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchCommentToOrder.php b/src/Api/Generated/Endpoint/PatchCommentToOrder.php index 412f361a..69208054 100644 --- a/src/Api/Generated/Endpoint/PatchCommentToOrder.php +++ b/src/Api/Generated/Endpoint/PatchCommentToOrder.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchCommentToOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchCommentToOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $commentId; @@ -11,15 +11,15 @@ class PatchCommentToOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint imple * * @param int $orderId The orders id * @param int $commentId The order comments id - * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderCommentModel $requestBody */ - public function __construct(int $orderId, int $commentId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody) + public function __construct(int $orderId, int $commentId, ?\Starweb\Api\Generated\Model\OrderCommentModel $requestBody = null) { $this->orderId = $orderId; $this->commentId = $commentId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -46,13 +46,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchCommentToOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchCommentToOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchCustomer.php b/src/Api/Generated/Endpoint/PatchCustomer.php index c3d13337..cf3153e6 100644 --- a/src/Api/Generated/Endpoint/PatchCustomer.php +++ b/src/Api/Generated/Endpoint/PatchCustomer.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** * Updates a customer. Retrieves the updated `Customer` object * * @param int $customerId The customers id - * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody */ - public function __construct(int $customerId, \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody) + public function __construct(int $customerId, ?\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody = null) { $this->customerId = $customerId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchCustomerAddress.php b/src/Api/Generated/Endpoint/PatchCustomerAddress.php index 21805bb6..1fa6a875 100644 --- a/src/Api/Generated/Endpoint/PatchCustomerAddress.php +++ b/src/Api/Generated/Endpoint/PatchCustomerAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchCustomerAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchCustomerAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $addressType; @@ -11,15 +11,15 @@ class PatchCustomerAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * * @param int $customerId The customers id * @param string $addressType The customer address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody */ - public function __construct(int $customerId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody) + public function __construct(int $customerId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null) { $this->customerId = $customerId; $this->addressType = $addressType; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchCustomerAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchCustomerAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchCustomerAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchCustomerAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchMediaFile.php b/src/Api/Generated/Endpoint/PatchMediaFile.php index f68ef4a0..fade3f88 100644 --- a/src/Api/Generated/Endpoint/PatchMediaFile.php +++ b/src/Api/Generated/Endpoint/PatchMediaFile.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchMediaFile extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchMediaFile extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $mediaFileId; /** * Updates a media file. Retrieves the updated `MediaFile` object * * @param int $mediaFileId The media files id - * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody + * @param null|\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody */ - public function __construct(int $mediaFileId, \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody) + public function __construct(int $mediaFileId, ?\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody = null) { $this->mediaFileId = $mediaFileId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -31,9 +31,10 @@ public function getBody(\Symfony\Component\Serializer\SerializerInterface $seria $bodyBuilder = new \Http\Message\MultipartStream\MultipartStreamBuilder($streamFactory); $formParameters = $serializer->normalize($this->body, 'json'); foreach ($formParameters as $key => $value) { + $value = is_int($value) ? (string) $value : $value; $bodyBuilder->addResource($key, $value); } - return array(array('Content-Type' => array('multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '""'))), $bodyBuilder->build()); + return array(array('Content-Type' => array('multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '"'))), $bodyBuilder->build()); } return array(array(), null); } @@ -49,16 +50,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchMediaFileBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchMediaFileBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchOrder.php b/src/Api/Generated/Endpoint/PatchOrder.php index 250a2581..411b67d2 100644 --- a/src/Api/Generated/Endpoint/PatchOrder.php +++ b/src/Api/Generated/Endpoint/PatchOrder.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** * Updates an order. Retrieves the updated `Order` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody */ - public function __construct(int $orderId, \Starweb\Api\Generated\Model\OrderUpdateModel $requestBody) + public function __construct(int $orderId, ?\Starweb\Api\Generated\Model\OrderUpdateModel $requestBody = null) { $this->orderId = $orderId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchOrderAddress.php b/src/Api/Generated/Endpoint/PatchOrderAddress.php index e9ba7d1d..b826a6da 100644 --- a/src/Api/Generated/Endpoint/PatchOrderAddress.php +++ b/src/Api/Generated/Endpoint/PatchOrderAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchOrderAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchOrderAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $addressType; @@ -11,15 +11,15 @@ class PatchOrderAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint impleme * * @param int $orderId The orders id * @param string $addressType The order address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody */ - public function __construct(int $orderId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody) + public function __construct(int $orderId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null) { $this->orderId = $orderId; $this->addressType = $addressType; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\AddressModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\AddressModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchOrderExternalService.php b/src/Api/Generated/Endpoint/PatchOrderExternalService.php index 3f45fd50..85ed28f3 100644 --- a/src/Api/Generated/Endpoint/PatchOrderExternalService.php +++ b/src/Api/Generated/Endpoint/PatchOrderExternalService.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchOrderExternalService extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $serviceName; @@ -12,15 +12,15 @@ class PatchOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint * * @param int $orderId The orders id * @param string $serviceName The service name - * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody */ - public function __construct(int $orderId, string $serviceName, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody) + public function __construct(int $orderId, string $serviceName, ?\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody = null) { $this->orderId = $orderId; $this->serviceName = $serviceName; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -48,16 +48,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderExternalServiceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderExternalServiceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchOrderItem.php b/src/Api/Generated/Endpoint/PatchOrderItem.php index c1ba4981..150a31dc 100644 --- a/src/Api/Generated/Endpoint/PatchOrderItem.php +++ b/src/Api/Generated/Endpoint/PatchOrderItem.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchOrderItem extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $orderItemId; @@ -11,15 +11,15 @@ class PatchOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements * * @param int $orderId The orders id * @param int $orderItemId The order item id - * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderItemModel $requestBody */ - public function __construct(int $orderId, int $orderItemId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody) + public function __construct(int $orderId, int $orderItemId, ?\Starweb\Api\Generated\Model\OrderItemModel $requestBody = null) { $this->orderId = $orderId; $this->orderItemId = $orderItemId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderItemBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderItemBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchOrderStatus.php b/src/Api/Generated/Endpoint/PatchOrderStatus.php index c7dee876..50337b7d 100644 --- a/src/Api/Generated/Endpoint/PatchOrderStatus.php +++ b/src/Api/Generated/Endpoint/PatchOrderStatus.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchOrderStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderStatusId; /** @@ -10,14 +10,14 @@ class PatchOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implemen NB! You are not allowed to update standard order statuses (all statuses with an idCode set) * * @param int $orderStatusId The order status id - * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderStatusModel $requestBody */ - public function __construct(int $orderStatusId, \Starweb\Api\Generated\Model\OrderStatusModel $requestBody) + public function __construct(int $orderStatusId, ?\Starweb\Api\Generated\Model\OrderStatusModel $requestBody = null) { $this->orderStatusId = $orderStatusId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -46,19 +46,25 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderStatusForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderStatusForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchPricelist.php b/src/Api/Generated/Endpoint/PatchPricelist.php index 75a40dd4..37bcea9a 100644 --- a/src/Api/Generated/Endpoint/PatchPricelist.php +++ b/src/Api/Generated/Endpoint/PatchPricelist.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchPricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchPricelist extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $pricelistId; /** * Update a pricelist. Retrieves the updated `Pricelist` object * * @param int $pricelistId The pricelist id - * @param mixed $requestBody + * @param null|mixed $requestBody */ - public function __construct(int $pricelistId, $requestBody) + public function __construct(int $pricelistId, $requestBody = null) { $this->pricelistId = $pricelistId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PricelistModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchPricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchPricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchPricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchPricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProduct.php b/src/Api/Generated/Endpoint/PatchProduct.php index e93aec7d..fe2b1b53 100644 --- a/src/Api/Generated/Endpoint/PatchProduct.php +++ b/src/Api/Generated/Endpoint/PatchProduct.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Updates a product. Retrieves the update `Product` object. * * @param int $productId The product id - * @param \Starweb\Api\Generated\Model\ProductModelPatchable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductModelPatchable $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductModelPatchable $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductModelPatchable $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductBundledProductsPricelistPrice.php b/src/Api/Generated/Endpoint/PatchProductBundledProductsPricelistPrice.php index 84d143c8..6862a2df 100644 --- a/src/Api/Generated/Endpoint/PatchProductBundledProductsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/PatchProductBundledProductsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductBundledProductsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductBundledProductsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -14,16 +14,16 @@ class PatchProductBundledProductsPricelistPrice extends \Jane\OpenApiRuntime\Cli * @param int $productId The product id * @param int $bundledProductId The bundled products id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody */ - public function __construct(int $productId, int $bundledProductId, int $pricelistId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody) + public function __construct(int $productId, int $bundledProductId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody = null) { $this->productId = $productId; $this->bundledProductId = $bundledProductId; $this->pricelistId = $pricelistId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -51,16 +51,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductCategory.php b/src/Api/Generated/Endpoint/PatchProductCategory.php index 1cf5c6ed..5a7d33d5 100644 --- a/src/Api/Generated/Endpoint/PatchProductCategory.php +++ b/src/Api/Generated/Endpoint/PatchProductCategory.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductCategory extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductCategory extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $categoryId; /** * Update a product category. Retrieves the updated `ProductCategory` object * * @param int $categoryId The product category id - * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody */ - public function __construct(int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody) + public function __construct(int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody = null) { $this->categoryId = $categoryId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductCategoryBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductCategoryBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductManufacturer.php b/src/Api/Generated/Endpoint/PatchProductManufacturer.php index 99d05f5e..89f71c65 100644 --- a/src/Api/Generated/Endpoint/PatchProductManufacturer.php +++ b/src/Api/Generated/Endpoint/PatchProductManufacturer.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductManufacturer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductManufacturer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $manufacturerId; /** * Updates the `ProductManufacturer` object. * * @param int $manufacturerId The manufacturers id - * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody */ - public function __construct(int $manufacturerId, \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody) + public function __construct(int $manufacturerId, ?\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody = null) { $this->manufacturerId = $manufacturerId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductMetaDataType.php b/src/Api/Generated/Endpoint/PatchProductMetaDataType.php index 019f9f74..bad045c8 100644 --- a/src/Api/Generated/Endpoint/PatchProductMetaDataType.php +++ b/src/Api/Generated/Endpoint/PatchProductMetaDataType.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductMetaDataType extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductMetaDataType extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $metaDataTypeId; /** * Update a product meta data type. Retrieves the updated `ProductMetaDataType` object * * @param int $metaDataTypeId The meta data types id - * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody */ - public function __construct(int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody) + public function __construct(int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody = null) { $this->metaDataTypeId = $metaDataTypeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductStockStatus.php b/src/Api/Generated/Endpoint/PatchProductStockStatus.php index 62923c94..3f4b277d 100644 --- a/src/Api/Generated/Endpoint/PatchProductStockStatus.php +++ b/src/Api/Generated/Endpoint/PatchProductStockStatus.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductStockStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockStatusId; /** * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody */ - public function __construct(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody) + public function __construct(int $stockStatusId, ?\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody = null) { $this->stockStatusId = $stockStatusId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductStockStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductStockStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductTag.php b/src/Api/Generated/Endpoint/PatchProductTag.php index f441e8d0..e69042be 100644 --- a/src/Api/Generated/Endpoint/PatchProductTag.php +++ b/src/Api/Generated/Endpoint/PatchProductTag.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; /** * Partially updates a product tag. Retrieves the updated `ProductTag` object * * @param int $productTagId The product tag id - * @param \Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody */ - public function __construct(int $productTagId, \Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody) + public function __construct(int $productTagId, ?\Starweb\Api\Generated\Model\ProductTagPatchRequestModel $requestBody = null) { $this->productTagId = $productTagId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductTagBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductTagBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductTagOption.php b/src/Api/Generated/Endpoint/PatchProductTagOption.php index 9070c403..54359bb5 100644 --- a/src/Api/Generated/Endpoint/PatchProductTagOption.php +++ b/src/Api/Generated/Endpoint/PatchProductTagOption.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductTagOption extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductTagOption extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; protected $productTagOptionId; @@ -11,15 +11,15 @@ class PatchProductTagOption extends \Jane\OpenApiRuntime\Client\BaseEndpoint imp * * @param int $productTagId The product tag id * @param int $productTagOptionId The product tag option id - * @param \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody */ - public function __construct(int $productTagId, int $productTagOptionId, \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody) + public function __construct(int $productTagId, int $productTagOptionId, ?\Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel $requestBody = null) { $this->productTagId = $productTagId; $this->productTagOptionId = $productTagOptionId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -48,19 +48,25 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductTagOptionBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductTagOptionBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductTagOptionNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductTagOptionNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (405 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (405 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductUnit.php b/src/Api/Generated/Endpoint/PatchProductUnit.php index e6bb8a7f..8ed0ced9 100644 --- a/src/Api/Generated/Endpoint/PatchProductUnit.php +++ b/src/Api/Generated/Endpoint/PatchProductUnit.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductUnit extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $unitId; /** * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody */ - public function __construct(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody) + public function __construct(int $unitId, ?\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody = null) { $this->unitId = $unitId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductVariantStock.php b/src/Api/Generated/Endpoint/PatchProductVariantStock.php index cfa95f73..fc5b781e 100644 --- a/src/Api/Generated/Endpoint/PatchProductVariantStock.php +++ b/src/Api/Generated/Endpoint/PatchProductVariantStock.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductVariantStock extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductVariantStock extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -14,16 +14,16 @@ class PatchProductVariantStock extends \Jane\OpenApiRuntime\Client\BaseEndpoint * @param int $productId The product id * @param int $variantId The products variants id * @param int $stockLocationId The stock location id - * @param \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody */ - public function __construct(int $productId, int $variantId, int $stockLocationId, \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody) + public function __construct(int $productId, int $variantId, int $stockLocationId, ?\Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; $this->stockLocationId = $stockLocationId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -51,16 +51,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductVariantStockBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductVariantStockBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsBundledProduct.php b/src/Api/Generated/Endpoint/PatchProductsBundledProduct.php index ac8f1619..1e0785e7 100644 --- a/src/Api/Generated/Endpoint/PatchProductsBundledProduct.php +++ b/src/Api/Generated/Endpoint/PatchProductsBundledProduct.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsBundledProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsBundledProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -11,15 +11,15 @@ class PatchProductsBundledProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoi * * @param int $productId The product id * @param int $bundledProductId The bundled products id - * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody + * @param null|\Starweb\Api\Generated\Model\BundledProductsModel $requestBody */ - public function __construct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody) + public function __construct(int $productId, int $bundledProductId, ?\Starweb\Api\Generated\Model\BundledProductsModel $requestBody = null) { $this->productId = $productId; $this->bundledProductId = $bundledProductId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsBundledProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsBundledProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsBundledProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsBundledProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsCategoryLink.php b/src/Api/Generated/Endpoint/PatchProductsCategoryLink.php index 56d3d79e..3cf9a215 100644 --- a/src/Api/Generated/Endpoint/PatchProductsCategoryLink.php +++ b/src/Api/Generated/Endpoint/PatchProductsCategoryLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsCategoryLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $categoryId; @@ -11,15 +11,15 @@ class PatchProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint * * @param int $productId The product id * @param int $categoryId The category id - * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody */ - public function __construct(int $productId, int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody) + public function __construct(int $productId, int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody = null) { $this->productId = $productId; $this->categoryId = $categoryId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsLanguage.php b/src/Api/Generated/Endpoint/PatchProductsLanguage.php index 471a8d94..6753636b 100644 --- a/src/Api/Generated/Endpoint/PatchProductsLanguage.php +++ b/src/Api/Generated/Endpoint/PatchProductsLanguage.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsLanguage extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $langCode; @@ -11,15 +11,15 @@ class PatchProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint imp * * @param int $productId The product id * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es - * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody */ - public function __construct(int $productId, string $langCode, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody) + public function __construct(int $productId, string $langCode, ?\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody = null) { $this->productId = $productId; $this->langCode = $langCode; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsLanguageBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsLanguageBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsMediaFileLink.php b/src/Api/Generated/Endpoint/PatchProductsMediaFileLink.php index b77be178..4937eec6 100644 --- a/src/Api/Generated/Endpoint/PatchProductsMediaFileLink.php +++ b/src/Api/Generated/Endpoint/PatchProductsMediaFileLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsMediaFileLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $mediaFileId; @@ -12,15 +12,15 @@ class PatchProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoin * * @param int $productId The product id * @param int $mediaFileId The media file id of the link you want to fetch/change - * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody */ - public function __construct(int $productId, int $mediaFileId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody) + public function __construct(int $productId, int $mediaFileId, ?\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody = null) { $this->productId = $productId; $this->mediaFileId = $mediaFileId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -48,16 +48,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsMetaData.php b/src/Api/Generated/Endpoint/PatchProductsMetaData.php index c054d9a9..85a441ea 100644 --- a/src/Api/Generated/Endpoint/PatchProductsMetaData.php +++ b/src/Api/Generated/Endpoint/PatchProductsMetaData.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsMetaData extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $metaDataTypeId; @@ -11,15 +11,15 @@ class PatchProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint imp * * @param int $productId The product id * @param int $metaDataTypeId The meta data type id - * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody */ - public function __construct(int $productId, int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody) + public function __construct(int $productId, int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody = null) { $this->productId = $productId; $this->metaDataTypeId = $metaDataTypeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsVariant.php b/src/Api/Generated/Endpoint/PatchProductsVariant.php index ccbc35fa..3a510e3f 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariant.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariant.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsVariant extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -11,15 +11,15 @@ class PatchProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody */ - public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody) + public function __construct(int $productId, int $variantId, ?\Starweb\Api\Generated\Model\ProductVariantPatchRequestModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php index 95260e3e..882a8bef 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariantsAttributeValues.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsVariantsAttributeValues extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; protected $attributeValueId; @@ -12,15 +12,15 @@ class PatchProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\B * * @param int $attributeId The attribute id * @param int $attributeValueId The attribe value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody */ - public function __construct(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody) + public function __construct(int $attributeId, int $attributeValueId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody = null) { $this->attributeId = $attributeId; $this->attributeValueId = $attributeValueId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,13 +47,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php index 9e4f44c9..bb7876f3 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsVariantsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -14,12 +14,12 @@ class PatchProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\Ba * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody * @param array $queryParameters { * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices * } */ - public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array()) + public function __construct(int $productId, int $variantId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody = null, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; @@ -27,7 +27,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, \S $this->body = $requestBody; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -53,7 +53,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -64,16 +64,22 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistVolumePrice.php b/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistVolumePrice.php index e6c80aa1..756210b3 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistVolumePrice.php +++ b/src/Api/Generated/Endpoint/PatchProductsVariantsPricelistVolumePrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsVariantsPricelistVolumePrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsVariantsPricelistVolumePrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -16,9 +16,9 @@ class PatchProductsVariantsPricelistVolumePrice extends \Jane\OpenApiRuntime\Cli * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param int $quantity The volume quantity - * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody */ - public function __construct(int $productId, int $variantId, int $pricelistId, int $quantity, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody) + public function __construct(int $productId, int $variantId, int $pricelistId, int $quantity, ?\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; @@ -26,7 +26,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, in $this->quantity = $quantity; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -54,16 +54,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchProductsVatRate.php b/src/Api/Generated/Endpoint/PatchProductsVatRate.php index 79a9df0a..5de836b1 100644 --- a/src/Api/Generated/Endpoint/PatchProductsVatRate.php +++ b/src/Api/Generated/Endpoint/PatchProductsVatRate.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchProductsVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchProductsVatRate extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $countryCode; @@ -11,15 +11,15 @@ class PatchProductsVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * * @param int $productId The product id * @param string $countryCode The country code for the vat rate to fetch/manipulate - * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody */ - public function __construct(int $productId, string $countryCode, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody) + public function __construct(int $productId, string $countryCode, ?\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody = null) { $this->productId = $productId; $this->countryCode = $countryCode; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVatRateBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVatRateBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchStockLocation.php b/src/Api/Generated/Endpoint/PatchStockLocation.php index 2cad2dd3..8d09267d 100644 --- a/src/Api/Generated/Endpoint/PatchStockLocation.php +++ b/src/Api/Generated/Endpoint/PatchStockLocation.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchStockLocation extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchStockLocation extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockLocationId; /** * Update a stock location partially. Retrieves the updated `StockLocation` object * * @param int $stockLocationId The stock location id - * @param mixed $requestBody + * @param null|mixed $requestBody */ - public function __construct(int $stockLocationId, $requestBody) + public function __construct(int $stockLocationId, $requestBody = null) { $this->stockLocationId = $stockLocationId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -45,19 +45,25 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchStockLocationBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchStockLocationBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PatchWebHook.php b/src/Api/Generated/Endpoint/PatchWebHook.php index e1569629..9e7426d7 100644 --- a/src/Api/Generated/Endpoint/PatchWebHook.php +++ b/src/Api/Generated/Endpoint/PatchWebHook.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PatchWebHook extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PatchWebHook extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $webHookId; /** * * * @param int $webHookId The web hook id - * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody + * @param null|\Starweb\Api\Generated\Model\WebHookModel $requestBody */ - public function __construct(int $webHookId, \Starweb\Api\Generated\Model\WebHookModel $requestBody) + public function __construct(int $webHookId, ?\Starweb\Api\Generated\Model\WebHookModel $requestBody = null) { $this->webHookId = $webHookId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PATCH'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\WebHookModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchWebHookBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchWebHookBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PatchWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PatchWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutAttribute.php b/src/Api/Generated/Endpoint/PutAttribute.php index f911a650..c3727902 100644 --- a/src/Api/Generated/Endpoint/PutAttribute.php +++ b/src/Api/Generated/Endpoint/PutAttribute.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutAttribute extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; /** @@ -10,14 +10,14 @@ class PutAttribute extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \ Retrieves the updated `ProductVariantAttribute` object. * * @param int $attributeId The attribute value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody */ - public function __construct(int $attributeId, \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody) + public function __construct(int $attributeId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable $requestBody = null) { $this->attributeId = $attributeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,13 +44,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutAttributeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutAttributeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutCustomer.php b/src/Api/Generated/Endpoint/PutCustomer.php index 8ca42da8..65dca2fc 100644 --- a/src/Api/Generated/Endpoint/PutCustomer.php +++ b/src/Api/Generated/Endpoint/PutCustomer.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; /** * Updates a customer. Retrieves the updated `Customer` object * * @param int $customerId The customers id - * @param \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody */ - public function __construct(int $customerId, \Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody) + public function __construct(int $customerId, ?\Starweb\Api\Generated\Model\CustomerUpdateModel $requestBody = null) { $this->customerId = $customerId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutCustomerBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutCustomerAddress.php b/src/Api/Generated/Endpoint/PutCustomerAddress.php index a4b985ec..0f200229 100644 --- a/src/Api/Generated/Endpoint/PutCustomerAddress.php +++ b/src/Api/Generated/Endpoint/PutCustomerAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutCustomerAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutCustomerAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $addressType; @@ -11,15 +11,15 @@ class PutCustomerAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem * * @param int $customerId The customers id * @param string $addressType The customer address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody */ - public function __construct(int $customerId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody) + public function __construct(int $customerId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null) { $this->customerId = $customerId; $this->addressType = $addressType; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\CustomerAddressesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutCustomerAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutCustomerAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutCustomerAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutCustomerAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutMediaFile.php b/src/Api/Generated/Endpoint/PutMediaFile.php index f234d13b..f319bd72 100644 --- a/src/Api/Generated/Endpoint/PutMediaFile.php +++ b/src/Api/Generated/Endpoint/PutMediaFile.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutMediaFile extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutMediaFile extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $mediaFileId; /** * Updates a media file. Retrieves the updated `MediaFile` object * * @param int $mediaFileId The media files id - * @param \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody + * @param null|\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody */ - public function __construct(int $mediaFileId, \Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody) + public function __construct(int $mediaFileId, ?\Starweb\Api\Generated\Model\MediaFileUploadModel $requestBody = null) { $this->mediaFileId = $mediaFileId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -31,9 +31,10 @@ public function getBody(\Symfony\Component\Serializer\SerializerInterface $seria $bodyBuilder = new \Http\Message\MultipartStream\MultipartStreamBuilder($streamFactory); $formParameters = $serializer->normalize($this->body, 'json'); foreach ($formParameters as $key => $value) { + $value = is_int($value) ? (string) $value : $value; $bodyBuilder->addResource($key, $value); } - return array(array('Content-Type' => array('multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '""'))), $bodyBuilder->build()); + return array(array('Content-Type' => array('multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '"'))), $bodyBuilder->build()); } return array(array(), null); } @@ -49,16 +50,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\MediaFileModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutMediaFileBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutMediaFileBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutMediaFileNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutOrder.php b/src/Api/Generated/Endpoint/PutOrder.php index 141f38cb..b3d28b04 100644 --- a/src/Api/Generated/Endpoint/PutOrder.php +++ b/src/Api/Generated/Endpoint/PutOrder.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; /** * Updates an order. Retrieves the updated `Order` object * * @param int $orderId The orders id - * @param \Starweb\Api\Generated\Model\OrderPutModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderPutModel $requestBody */ - public function __construct(int $orderId, \Starweb\Api\Generated\Model\OrderPutModel $requestBody) + public function __construct(int $orderId, ?\Starweb\Api\Generated\Model\OrderPutModel $requestBody = null) { $this->orderId = $orderId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutOrderAddress.php b/src/Api/Generated/Endpoint/PutOrderAddress.php index 6832f5d6..5fccbb89 100644 --- a/src/Api/Generated/Endpoint/PutOrderAddress.php +++ b/src/Api/Generated/Endpoint/PutOrderAddress.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutOrderAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutOrderAddress extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $addressType; @@ -11,15 +11,15 @@ class PutOrderAddress extends \Jane\OpenApiRuntime\Client\BaseEndpoint implement * * @param int $orderId The orders id * @param string $addressType The order address type - * @param \Starweb\Api\Generated\Model\AddressModel $requestBody + * @param null|\Starweb\Api\Generated\Model\AddressModel $requestBody */ - public function __construct(int $orderId, string $addressType, \Starweb\Api\Generated\Model\AddressModel $requestBody) + public function __construct(int $orderId, string $addressType, ?\Starweb\Api\Generated\Model\AddressModel $requestBody = null) { $this->orderId = $orderId; $this->addressType = $addressType; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\AddressModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\AddressModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderAddressBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderAddressNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutOrderExternalService.php b/src/Api/Generated/Endpoint/PutOrderExternalService.php index 1e8a2c7c..0eb34066 100644 --- a/src/Api/Generated/Endpoint/PutOrderExternalService.php +++ b/src/Api/Generated/Endpoint/PutOrderExternalService.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutOrderExternalService extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $serviceName; @@ -12,15 +12,15 @@ class PutOrderExternalService extends \Jane\OpenApiRuntime\Client\BaseEndpoint i * * @param int $orderId The orders id * @param string $serviceName The service name - * @param \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody */ - public function __construct(int $orderId, string $serviceName, \Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody) + public function __construct(int $orderId, string $serviceName, ?\Starweb\Api\Generated\Model\OrderExternalServiceModel $requestBody = null) { $this->orderId = $orderId; $this->serviceName = $serviceName; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -48,16 +48,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderExternalServicesModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderExternalServiceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderExternalServiceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderExternalServiceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutOrderItem.php b/src/Api/Generated/Endpoint/PutOrderItem.php index f9d19b3b..3acb2c4e 100644 --- a/src/Api/Generated/Endpoint/PutOrderItem.php +++ b/src/Api/Generated/Endpoint/PutOrderItem.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutOrderItem extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $orderItemId; @@ -11,15 +11,15 @@ class PutOrderItem extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \ * * @param int $orderId The orders id * @param int $orderItemId The order item id - * @param \Starweb\Api\Generated\Model\OrderItemModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderItemModel $requestBody */ - public function __construct(int $orderId, int $orderItemId, \Starweb\Api\Generated\Model\OrderItemModel $requestBody) + public function __construct(int $orderId, int $orderItemId, ?\Starweb\Api\Generated\Model\OrderItemModel $requestBody = null) { $this->orderId = $orderId; $this->orderItemId = $orderItemId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderItemModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderItemBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderItemBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderItemNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutOrderStatus.php b/src/Api/Generated/Endpoint/PutOrderStatus.php index 7853da9f..d0ce3a5b 100644 --- a/src/Api/Generated/Endpoint/PutOrderStatus.php +++ b/src/Api/Generated/Endpoint/PutOrderStatus.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutOrderStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderStatusId; /** @@ -10,14 +10,14 @@ class PutOrderStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements NB! You are not allowed to update standard order statuses (all statuses with an idCode set) * * @param int $orderStatusId The order status id - * @param \Starweb\Api\Generated\Model\OrderStatusModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderStatusModel $requestBody */ - public function __construct(int $orderStatusId, \Starweb\Api\Generated\Model\OrderStatusModel $requestBody) + public function __construct(int $orderStatusId, ?\Starweb\Api\Generated\Model\OrderStatusModel $requestBody = null) { $this->orderStatusId = $orderStatusId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -46,19 +46,25 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderStatusForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderStatusForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutOrderStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutPricelist.php b/src/Api/Generated/Endpoint/PutPricelist.php index 05f4b036..2b82a6af 100644 --- a/src/Api/Generated/Endpoint/PutPricelist.php +++ b/src/Api/Generated/Endpoint/PutPricelist.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutPricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutPricelist extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $pricelistId; /** * Update a pricelist. Retrieves the updated `Pricelist` object * * @param int $pricelistId The pricelist id - * @param mixed $requestBody + * @param null|mixed $requestBody */ - public function __construct(int $pricelistId, $requestBody) + public function __construct(int $pricelistId, $requestBody = null) { $this->pricelistId = $pricelistId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\PricelistModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PricelistModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutPricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutPricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutPricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutPricelistNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProduct.php b/src/Api/Generated/Endpoint/PutProduct.php index 9806b19f..d2ab3866 100644 --- a/src/Api/Generated/Endpoint/PutProduct.php +++ b/src/Api/Generated/Endpoint/PutProduct.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; /** * Updates a product. Retrieves the update `Product` object. * * @param int $productId The product id - * @param \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody */ - public function __construct(int $productId, \Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody) + public function __construct(int $productId, ?\Starweb\Api\Generated\Model\ProductModelUpdatable $requestBody = null) { $this->productId = $productId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductBundledProductsPricelistPrice.php b/src/Api/Generated/Endpoint/PutProductBundledProductsPricelistPrice.php index 91dbd370..4a0bfd60 100644 --- a/src/Api/Generated/Endpoint/PutProductBundledProductsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/PutProductBundledProductsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductBundledProductsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductBundledProductsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -14,16 +14,16 @@ class PutProductBundledProductsPricelistPrice extends \Jane\OpenApiRuntime\Clien * @param int $productId The product id * @param int $bundledProductId The bundled products id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody */ - public function __construct(int $productId, int $bundledProductId, int $pricelistId, \Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody) + public function __construct(int $productId, int $bundledProductId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductBundleProductPriceModel $requestBody = null) { $this->productId = $productId; $this->bundledProductId = $bundledProductId; $this->pricelistId = $pricelistId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -51,16 +51,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductBundledProductsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductCategory.php b/src/Api/Generated/Endpoint/PutProductCategory.php index 4129dc33..956ceb53 100644 --- a/src/Api/Generated/Endpoint/PutProductCategory.php +++ b/src/Api/Generated/Endpoint/PutProductCategory.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductCategory extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductCategory extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $categoryId; /** * Update a product category. Retrieves the updated `ProductCategory` object * * @param int $categoryId The product category id - * @param \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody */ - public function __construct(int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody) + public function __construct(int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryModelUpdatable $requestBody = null) { $this->categoryId = $categoryId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductCategoryBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductCategoryBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductCategoryNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductManufacturer.php b/src/Api/Generated/Endpoint/PutProductManufacturer.php index 60fb41d7..a7d85660 100644 --- a/src/Api/Generated/Endpoint/PutProductManufacturer.php +++ b/src/Api/Generated/Endpoint/PutProductManufacturer.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductManufacturer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductManufacturer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $manufacturerId; /** * Updates the `ProductManufacturer` object. * * @param int $manufacturerId The manufacturers id - * @param \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody */ - public function __construct(int $manufacturerId, \Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody) + public function __construct(int $manufacturerId, ?\Starweb\Api\Generated\Model\ProductManufacturerModel $requestBody = null) { $this->manufacturerId = $manufacturerId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductManufacturerModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductManufacturerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductMetaDataType.php b/src/Api/Generated/Endpoint/PutProductMetaDataType.php index 37d843ae..31b9860c 100644 --- a/src/Api/Generated/Endpoint/PutProductMetaDataType.php +++ b/src/Api/Generated/Endpoint/PutProductMetaDataType.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductMetaDataType extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductMetaDataType extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $metaDataTypeId; /** * Update a product meta data type. Retrieves the updated `ProductMetaDataType` object * * @param int $metaDataTypeId The meta data types id - * @param \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody */ - public function __construct(int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody) + public function __construct(int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable $requestBody = null) { $this->metaDataTypeId = $metaDataTypeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductMetaDataTypeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductMetaDataTypeBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductMetaDataTypeNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductStockStatus.php b/src/Api/Generated/Endpoint/PutProductStockStatus.php index 7da9e447..c1290e16 100644 --- a/src/Api/Generated/Endpoint/PutProductStockStatus.php +++ b/src/Api/Generated/Endpoint/PutProductStockStatus.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductStockStatus extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductStockStatus extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockStatusId; /** * Updates a product stock status. Retrieves the update `ProductStockStatus` object. * * @param int $stockStatusId The stock status id - * @param \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody */ - public function __construct(int $stockStatusId, \Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody) + public function __construct(int $stockStatusId, ?\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody = null) { $this->stockStatusId = $stockStatusId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductStockStatusModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductStockStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductStockStatusBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductStockStatusNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductTag.php b/src/Api/Generated/Endpoint/PutProductTag.php index 889afe42..0b7ec504 100644 --- a/src/Api/Generated/Endpoint/PutProductTag.php +++ b/src/Api/Generated/Endpoint/PutProductTag.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductTag extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductTag extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; /** * Update a product tag. Retrieves the updated `ProductTag` object * * @param int $productTagId The product tag id - * @param \Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody */ - public function __construct(int $productTagId, \Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody) + public function __construct(int $productTagId, ?\Starweb\Api\Generated\Model\ProductTagPutRequestModel $requestBody = null) { $this->productTagId = $productTagId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductTagBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductTagBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductTagNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductTagOption.php b/src/Api/Generated/Endpoint/PutProductTagOption.php index 75a2571d..fdc44945 100644 --- a/src/Api/Generated/Endpoint/PutProductTagOption.php +++ b/src/Api/Generated/Endpoint/PutProductTagOption.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductTagOption extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductTagOption extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productTagId; protected $productTagOptionId; @@ -11,15 +11,15 @@ class PutProductTagOption extends \Jane\OpenApiRuntime\Client\BaseEndpoint imple * * @param int $productTagId The product tag id * @param int $productTagOptionId The product tag option id - * @param \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody */ - public function __construct(int $productTagId, int $productTagOptionId, \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody) + public function __construct(int $productTagId, int $productTagOptionId, ?\Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel $requestBody = null) { $this->productTagId = $productTagId; $this->productTagOptionId = $productTagOptionId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -48,19 +48,25 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductTagOptionModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductTagOptionBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductTagOptionBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductTagOptionNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductTagOptionNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (405 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (405 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductTagOptionMethodNotAllowedException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductUnit.php b/src/Api/Generated/Endpoint/PutProductUnit.php index 4161b3e5..9cb11053 100644 --- a/src/Api/Generated/Endpoint/PutProductUnit.php +++ b/src/Api/Generated/Endpoint/PutProductUnit.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductUnit extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductUnit extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $unitId; /** * Updates the `ProductUnit` object. * * @param int $unitId The units id - * @param \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody */ - public function __construct(int $unitId, \Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody) + public function __construct(int $unitId, ?\Starweb\Api\Generated\Model\ProductUnitModelUpdatable $requestBody = null) { $this->unitId = $unitId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -43,13 +43,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductUnitModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json'); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductUnitNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductVariantStock.php b/src/Api/Generated/Endpoint/PutProductVariantStock.php index ebbded6b..61686c76 100644 --- a/src/Api/Generated/Endpoint/PutProductVariantStock.php +++ b/src/Api/Generated/Endpoint/PutProductVariantStock.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductVariantStock extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductVariantStock extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -14,16 +14,16 @@ class PutProductVariantStock extends \Jane\OpenApiRuntime\Client\BaseEndpoint im * @param int $productId The product id * @param int $variantId The products variants id * @param int $stockLocationId The stock location id - * @param \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody */ - public function __construct(int $productId, int $variantId, int $stockLocationId, \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody) + public function __construct(int $productId, int $variantId, int $stockLocationId, ?\Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; $this->stockLocationId = $stockLocationId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -51,16 +51,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantStockModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductVariantStockBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductVariantStockBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductVariantStockNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsBundledProduct.php b/src/Api/Generated/Endpoint/PutProductsBundledProduct.php index f1b76eaf..90829d14 100644 --- a/src/Api/Generated/Endpoint/PutProductsBundledProduct.php +++ b/src/Api/Generated/Endpoint/PutProductsBundledProduct.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsBundledProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsBundledProduct extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $bundledProductId; @@ -11,15 +11,15 @@ class PutProductsBundledProduct extends \Jane\OpenApiRuntime\Client\BaseEndpoint * * @param int $productId The product id * @param int $bundledProductId The bundled products id - * @param \Starweb\Api\Generated\Model\BundledProductsModel $requestBody + * @param null|\Starweb\Api\Generated\Model\BundledProductsModel $requestBody */ - public function __construct(int $productId, int $bundledProductId, \Starweb\Api\Generated\Model\BundledProductsModel $requestBody) + public function __construct(int $productId, int $bundledProductId, ?\Starweb\Api\Generated\Model\BundledProductsModel $requestBody = null) { $this->productId = $productId; $this->bundledProductId = $bundledProductId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\BundledProductsModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsBundledProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsBundledProductBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsBundledProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsBundledProductNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsCategoryLink.php b/src/Api/Generated/Endpoint/PutProductsCategoryLink.php index 985b0526..b9c5871c 100644 --- a/src/Api/Generated/Endpoint/PutProductsCategoryLink.php +++ b/src/Api/Generated/Endpoint/PutProductsCategoryLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsCategoryLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $categoryId; @@ -11,15 +11,15 @@ class PutProductsCategoryLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint i * * @param int $productId The product id * @param int $categoryId The category id - * @param \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody */ - public function __construct(int $productId, int $categoryId, \Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody) + public function __construct(int $productId, int $categoryId, ?\Starweb\Api\Generated\Model\ProductCategoryLinkModel $requestBody = null) { $this->productId = $productId; $this->categoryId = $categoryId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductCategoryLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsCategoryLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsCategoryLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsCategoryLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsLanguage.php b/src/Api/Generated/Endpoint/PutProductsLanguage.php index b3fa9924..997e7e6d 100644 --- a/src/Api/Generated/Endpoint/PutProductsLanguage.php +++ b/src/Api/Generated/Endpoint/PutProductsLanguage.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsLanguage extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $langCode; @@ -11,15 +11,15 @@ class PutProductsLanguage extends \Jane\OpenApiRuntime\Client\BaseEndpoint imple * * @param int $productId The product id * @param string $langCode The language code you want to fetch/change. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es - * @param \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody */ - public function __construct(int $productId, string $langCode, \Starweb\Api\Generated\Model\ProductLanguageModel $requestBody) + public function __construct(int $productId, string $langCode, ?\Starweb\Api\Generated\Model\ProductLanguageModel $requestBody = null) { $this->productId = $productId; $this->langCode = $langCode; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductLanguageModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsLanguageBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsLanguageBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsLanguageNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsMediaFileLink.php b/src/Api/Generated/Endpoint/PutProductsMediaFileLink.php index 0d70e261..8fd6684f 100644 --- a/src/Api/Generated/Endpoint/PutProductsMediaFileLink.php +++ b/src/Api/Generated/Endpoint/PutProductsMediaFileLink.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsMediaFileLink extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $mediaFileId; @@ -12,15 +12,15 @@ class PutProductsMediaFileLink extends \Jane\OpenApiRuntime\Client\BaseEndpoint * * @param int $productId The product id * @param int $mediaFileId The media file id of the link you want to fetch/change - * @param \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody */ - public function __construct(int $productId, int $mediaFileId, \Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody) + public function __construct(int $productId, int $mediaFileId, ?\Starweb\Api\Generated\Model\ProductMediaFileLinkModel $requestBody = null) { $this->productId = $productId; $this->mediaFileId = $mediaFileId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -48,16 +48,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsMediaFileLinkNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsMetaData.php b/src/Api/Generated/Endpoint/PutProductsMetaData.php index bdd9140b..c6a39cd2 100644 --- a/src/Api/Generated/Endpoint/PutProductsMetaData.php +++ b/src/Api/Generated/Endpoint/PutProductsMetaData.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsMetaData extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $metaDataTypeId; @@ -11,15 +11,15 @@ class PutProductsMetaData extends \Jane\OpenApiRuntime\Client\BaseEndpoint imple * * @param int $productId The product id * @param int $metaDataTypeId The meta data type id - * @param \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody */ - public function __construct(int $productId, int $metaDataTypeId, \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody) + public function __construct(int $productId, int $metaDataTypeId, ?\Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable $requestBody = null) { $this->productId = $productId; $this->metaDataTypeId = $metaDataTypeId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductMetaDataModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsMetaDataBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsMetaDataNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsVariant.php b/src/Api/Generated/Endpoint/PutProductsVariant.php index ff109238..15a6b6ca 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariant.php +++ b/src/Api/Generated/Endpoint/PutProductsVariant.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsVariant extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -11,15 +11,15 @@ class PutProductsVariant extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem * * @param int $productId The product id * @param int $variantId The products variants id - * @param \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody */ - public function __construct(int $productId, int $variantId, \Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody) + public function __construct(int $productId, int $variantId, ?\Starweb\Api\Generated\Model\ProductVariantPutRequestModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php b/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php index 59307c91..47625832 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php +++ b/src/Api/Generated/Endpoint/PutProductsVariantsAttributeValues.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsVariantsAttributeValues extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $attributeId; protected $attributeValueId; @@ -12,15 +12,15 @@ class PutProductsVariantsAttributeValues extends \Jane\OpenApiRuntime\Client\Bas * * @param int $attributeId The attribute id * @param int $attributeValueId The attribe value id - * @param \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody */ - public function __construct(int $attributeId, int $attributeValueId, \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody) + public function __construct(int $attributeId, int $attributeValueId, ?\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable $requestBody = null) { $this->attributeId = $attributeId; $this->attributeValueId = $attributeValueId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,13 +47,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantsAttributeValuesBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php b/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php index 2f300601..ed8a89d0 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php +++ b/src/Api/Generated/Endpoint/PutProductsVariantsPricelistPrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsVariantsPricelistPrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -14,12 +14,12 @@ class PutProductsVariantsPricelistPrice extends \Jane\OpenApiRuntime\Client\Base * @param int $productId The product id * @param int $variantId The products variants id * @param int $pricelistId The pricelist id - * @param \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody * @param array $queryParameters { * @var string $include If you want to include child data in the result. Example: ?include=volumePrices (to include variants volume prices). Available includes: volumePrices * } */ - public function __construct(int $productId, int $variantId, int $pricelistId, \Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody, array $queryParameters = array()) + public function __construct(int $productId, int $variantId, int $pricelistId, ?\Starweb\Api\Generated\Model\ProductVariantPriceModel $requestBody = null, array $queryParameters = array()) { $this->productId = $productId; $this->variantId = $variantId; @@ -27,7 +27,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, \S $this->body = $requestBody; $this->queryParameters = $queryParameters; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -53,7 +53,7 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve $optionsResolver->setDefined(array('include')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array()); - $optionsResolver->setAllowedTypes('include', array('string')); + $optionsResolver->addAllowedTypes('include', array('string')); return $optionsResolver; } /** @@ -64,16 +64,22 @@ protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolve * * @return null|\Starweb\Api\Generated\Model\ProductVariantPriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistPriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsVariantsPricelistVolumePrice.php b/src/Api/Generated/Endpoint/PutProductsVariantsPricelistVolumePrice.php index 59fe2825..2b69a787 100644 --- a/src/Api/Generated/Endpoint/PutProductsVariantsPricelistVolumePrice.php +++ b/src/Api/Generated/Endpoint/PutProductsVariantsPricelistVolumePrice.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsVariantsPricelistVolumePrice extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsVariantsPricelistVolumePrice extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $variantId; @@ -16,9 +16,9 @@ class PutProductsVariantsPricelistVolumePrice extends \Jane\OpenApiRuntime\Clien * @param int $variantId The products variants id * @param int $pricelistId The pricelist id * @param int $quantity The volume quantity - * @param \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody */ - public function __construct(int $productId, int $variantId, int $pricelistId, int $quantity, \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody) + public function __construct(int $productId, int $variantId, int $pricelistId, int $quantity, ?\Starweb\Api\Generated\Model\ProductVariantVolumePriceModel $requestBody = null) { $this->productId = $productId; $this->variantId = $variantId; @@ -26,7 +26,7 @@ public function __construct(int $productId, int $variantId, int $pricelistId, in $this->quantity = $quantity; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -54,16 +54,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVariantsPricelistVolumePriceNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutProductsVatRate.php b/src/Api/Generated/Endpoint/PutProductsVatRate.php index 2a6999c7..9ece1b35 100644 --- a/src/Api/Generated/Endpoint/PutProductsVatRate.php +++ b/src/Api/Generated/Endpoint/PutProductsVatRate.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class PutProductsVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutProductsVatRate extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $productId; protected $countryCode; @@ -11,15 +11,15 @@ class PutProductsVatRate extends \Jane\OpenApiRuntime\Client\BaseEndpoint implem * * @param int $productId The product id * @param string $countryCode The country code for the vat rate to fetch/manipulate - * @param \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody + * @param null|\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody */ - public function __construct(int $productId, string $countryCode, \Starweb\Api\Generated\Model\ProductVatRateModel $requestBody) + public function __construct(int $productId, string $countryCode, ?\Starweb\Api\Generated\Model\ProductVatRateModel $requestBody = null) { $this->productId = $productId; $this->countryCode = $countryCode; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -47,16 +47,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\ProductVatRateModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVatRateBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVatRateBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutProductsVatRateNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutStockLocation.php b/src/Api/Generated/Endpoint/PutStockLocation.php index 4106b465..b67ec3f5 100644 --- a/src/Api/Generated/Endpoint/PutStockLocation.php +++ b/src/Api/Generated/Endpoint/PutStockLocation.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutStockLocation extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutStockLocation extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $stockLocationId; /** * Update a stock location. Retrieves the updated `StockLocation` object * * @param int $stockLocationId The stock location id - * @param \Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody + * @param null|\Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody */ - public function __construct(int $stockLocationId, \Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody) + public function __construct(int $stockLocationId, ?\Starweb\Api\Generated\Model\StockLocationPutRequestModel $requestBody = null) { $this->stockLocationId = $stockLocationId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -45,19 +45,25 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\StockLocationModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutStockLocationBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutStockLocationBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutStockLocationForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutStockLocationNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/PutWebHook.php b/src/Api/Generated/Endpoint/PutWebHook.php index f0f78d0c..c7d5d2f9 100644 --- a/src/Api/Generated/Endpoint/PutWebHook.php +++ b/src/Api/Generated/Endpoint/PutWebHook.php @@ -2,21 +2,21 @@ namespace Starweb\Api\Generated\Endpoint; -class PutWebHook extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class PutWebHook extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $webHookId; /** * * * @param int $webHookId The web hook id - * @param \Starweb\Api\Generated\Model\WebHookModel $requestBody + * @param null|\Starweb\Api\Generated\Model\WebHookModel $requestBody */ - public function __construct(int $webHookId, \Starweb\Api\Generated\Model\WebHookModel $requestBody) + public function __construct(int $webHookId, ?\Starweb\Api\Generated\Model\WebHookModel $requestBody = null) { $this->webHookId = $webHookId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -44,16 +44,22 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\WebHookModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\WebHookModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutWebHookBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutWebHookBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\PutWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\PutWebHookNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/RemoveAddressFromCustomer.php b/src/Api/Generated/Endpoint/RemoveAddressFromCustomer.php index 2acbaa23..471f8f5a 100644 --- a/src/Api/Generated/Endpoint/RemoveAddressFromCustomer.php +++ b/src/Api/Generated/Endpoint/RemoveAddressFromCustomer.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class RemoveAddressFromCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class RemoveAddressFromCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $addressType; @@ -17,7 +17,7 @@ public function __construct(int $customerId, string $addressType) $this->customerId = $customerId; $this->addressType = $addressType; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -42,16 +42,22 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (403 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\RemoveAddressFromCustomerForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\RemoveAddressFromCustomerForbiddenException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\RemoveAddressFromCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\RemoveAddressFromCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/RemoveCommentFromOrder.php b/src/Api/Generated/Endpoint/RemoveCommentFromOrder.php index 957af27a..d7b3f216 100644 --- a/src/Api/Generated/Endpoint/RemoveCommentFromOrder.php +++ b/src/Api/Generated/Endpoint/RemoveCommentFromOrder.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class RemoveCommentFromOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class RemoveCommentFromOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $commentId; @@ -17,7 +17,7 @@ public function __construct(int $orderId, int $commentId) $this->orderId = $orderId; $this->commentId = $commentId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\RemoveCommentFromOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\RemoveCommentFromOrderNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/RemoveTagFromCustomer.php b/src/Api/Generated/Endpoint/RemoveTagFromCustomer.php index f3dfd48a..27712c4f 100644 --- a/src/Api/Generated/Endpoint/RemoveTagFromCustomer.php +++ b/src/Api/Generated/Endpoint/RemoveTagFromCustomer.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class RemoveTagFromCustomer extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class RemoveTagFromCustomer extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $customerId; protected $tagId; @@ -17,7 +17,7 @@ public function __construct(int $customerId, int $tagId) $this->customerId = $customerId; $this->tagId = $tagId; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'DELETE'; @@ -41,13 +41,19 @@ public function getExtraHeaders() : array * * @return null */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); if (204 === $status) { return null; } - if (404 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\RemoveTagFromCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\RemoveTagFromCustomerNotFoundException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Endpoint/UpdateCommentToOrder.php b/src/Api/Generated/Endpoint/UpdateCommentToOrder.php index 0ed64aed..a69e78da 100644 --- a/src/Api/Generated/Endpoint/UpdateCommentToOrder.php +++ b/src/Api/Generated/Endpoint/UpdateCommentToOrder.php @@ -2,7 +2,7 @@ namespace Starweb\Api\Generated\Endpoint; -class UpdateCommentToOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint +class UpdateCommentToOrder extends \Starweb\Api\Generated\Runtime\Client\BaseEndpoint implements \Starweb\Api\Generated\Runtime\Client\Endpoint { protected $orderId; protected $commentId; @@ -11,15 +11,15 @@ class UpdateCommentToOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint impl * * @param int $orderId The orders id * @param int $commentId The order comments id - * @param \Starweb\Api\Generated\Model\OrderCommentModel $requestBody + * @param null|\Starweb\Api\Generated\Model\OrderCommentModel $requestBody */ - public function __construct(int $orderId, int $commentId, \Starweb\Api\Generated\Model\OrderCommentModel $requestBody) + public function __construct(int $orderId, int $commentId, ?\Starweb\Api\Generated\Model\OrderCommentModel $requestBody = null) { $this->orderId = $orderId; $this->commentId = $commentId; $this->body = $requestBody; } - use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; + use \Starweb\Api\Generated\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'PUT'; @@ -46,13 +46,19 @@ public function getExtraHeaders() : array * * @return null|\Starweb\Api\Generated\Model\OrderCommentModelItem */ - protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { - if (200 === $status && mb_strpos($contentType, 'application/json') !== false) { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem', 'json'); } - if (400 === $status && mb_strpos($contentType, 'application/json') !== false) { - throw new \Starweb\Api\Generated\Exception\UpdateCommentToOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); + if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { + throw new \Starweb\Api\Generated\Exception\UpdateCommentToOrderBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json'), $response); } } + public function getAuthenticationScopes() : array + { + return array('oauth2'); + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/AddCommentToOrderBadRequestException.php b/src/Api/Generated/Exception/AddCommentToOrderBadRequestException.php index df829198..0e246abc 100644 --- a/src/Api/Generated/Exception/AddCommentToOrderBadRequestException.php +++ b/src/Api/Generated/Exception/AddCommentToOrderBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class AddCommentToOrderBadRequestException extends \RuntimeException implements ClientException +class AddCommentToOrderBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/AddTagToCustomerBadRequestException.php b/src/Api/Generated/Exception/AddTagToCustomerBadRequestException.php index cf099cab..50c92d9d 100644 --- a/src/Api/Generated/Exception/AddTagToCustomerBadRequestException.php +++ b/src/Api/Generated/Exception/AddTagToCustomerBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class AddTagToCustomerBadRequestException extends \RuntimeException implements ClientException +class AddTagToCustomerBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/BadRequestException.php b/src/Api/Generated/Exception/BadRequestException.php new file mode 100644 index 00000000..f676356c --- /dev/null +++ b/src/Api/Generated/Exception/BadRequestException.php @@ -0,0 +1,11 @@ +errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateCustomerBadRequestException.php b/src/Api/Generated/Exception/CreateCustomerBadRequestException.php index d4c10a98..34f5e006 100644 --- a/src/Api/Generated/Exception/CreateCustomerBadRequestException.php +++ b/src/Api/Generated/Exception/CreateCustomerBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateCustomerBadRequestException extends \RuntimeException implements ClientException +class CreateCustomerBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateMediaFileBadRequestException.php b/src/Api/Generated/Exception/CreateMediaFileBadRequestException.php index c6315cb2..a620cd3d 100644 --- a/src/Api/Generated/Exception/CreateMediaFileBadRequestException.php +++ b/src/Api/Generated/Exception/CreateMediaFileBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateMediaFileBadRequestException extends \RuntimeException implements ClientException +class CreateMediaFileBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateOrderBadRequestException.php b/src/Api/Generated/Exception/CreateOrderBadRequestException.php index 23c97c37..c1a59505 100644 --- a/src/Api/Generated/Exception/CreateOrderBadRequestException.php +++ b/src/Api/Generated/Exception/CreateOrderBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateOrderBadRequestException extends \RuntimeException implements ClientException +class CreateOrderBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateOrderExternalServiceBadRequestException.php b/src/Api/Generated/Exception/CreateOrderExternalServiceBadRequestException.php index 16a86be2..86dd7bfc 100644 --- a/src/Api/Generated/Exception/CreateOrderExternalServiceBadRequestException.php +++ b/src/Api/Generated/Exception/CreateOrderExternalServiceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateOrderExternalServiceBadRequestException extends \RuntimeException implements ClientException +class CreateOrderExternalServiceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateOrderItemBadRequestException.php b/src/Api/Generated/Exception/CreateOrderItemBadRequestException.php index 0c887976..e63346d0 100644 --- a/src/Api/Generated/Exception/CreateOrderItemBadRequestException.php +++ b/src/Api/Generated/Exception/CreateOrderItemBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateOrderItemBadRequestException extends \RuntimeException implements ClientException +class CreateOrderItemBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateOrderStatusBadRequestException.php b/src/Api/Generated/Exception/CreateOrderStatusBadRequestException.php index ea7fd1d5..9ad34512 100644 --- a/src/Api/Generated/Exception/CreateOrderStatusBadRequestException.php +++ b/src/Api/Generated/Exception/CreateOrderStatusBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateOrderStatusBadRequestException extends \RuntimeException implements ClientException +class CreateOrderStatusBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreatePricelistBadRequestException.php b/src/Api/Generated/Exception/CreatePricelistBadRequestException.php index 0a655d41..9b61c47c 100644 --- a/src/Api/Generated/Exception/CreatePricelistBadRequestException.php +++ b/src/Api/Generated/Exception/CreatePricelistBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreatePricelistBadRequestException extends \RuntimeException implements ClientException +class CreatePricelistBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductBadRequestException.php b/src/Api/Generated/Exception/CreateProductBadRequestException.php index 57de6a1b..e8109039 100644 --- a/src/Api/Generated/Exception/CreateProductBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductBadRequestException extends \RuntimeException implements ClientException +class CreateProductBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductBundleProductPricelistPriceBadRequestException.php b/src/Api/Generated/Exception/CreateProductBundleProductPricelistPriceBadRequestException.php index 0f138234..155aad26 100644 --- a/src/Api/Generated/Exception/CreateProductBundleProductPricelistPriceBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductBundleProductPricelistPriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductBundleProductPricelistPriceBadRequestException extends \RuntimeException implements ClientException +class CreateProductBundleProductPricelistPriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductBundledProductBadRequestException.php b/src/Api/Generated/Exception/CreateProductBundledProductBadRequestException.php index 15a2cd48..e295a873 100644 --- a/src/Api/Generated/Exception/CreateProductBundledProductBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductBundledProductBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductBundledProductBadRequestException extends \RuntimeException implements ClientException +class CreateProductBundledProductBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductCategoryBadRequestException.php b/src/Api/Generated/Exception/CreateProductCategoryBadRequestException.php index d2efe46a..0e6794cb 100644 --- a/src/Api/Generated/Exception/CreateProductCategoryBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductCategoryBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductCategoryBadRequestException extends \RuntimeException implements ClientException +class CreateProductCategoryBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php b/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php index 5b1a1ec6..60547c44 100644 --- a/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductManufacturerBadRequestException extends \RuntimeException implements ClientException +class CreateProductManufacturerBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductMetaDataTypeBadRequestException.php b/src/Api/Generated/Exception/CreateProductMetaDataTypeBadRequestException.php index 6d66fd2c..291315e1 100644 --- a/src/Api/Generated/Exception/CreateProductMetaDataTypeBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductMetaDataTypeBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductMetaDataTypeBadRequestException extends \RuntimeException implements ClientException +class CreateProductMetaDataTypeBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductStockStatusBadRequestException.php b/src/Api/Generated/Exception/CreateProductStockStatusBadRequestException.php index 50e14f12..45df09e8 100644 --- a/src/Api/Generated/Exception/CreateProductStockStatusBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductStockStatusBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductStockStatusBadRequestException extends \RuntimeException implements ClientException +class CreateProductStockStatusBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductTagBadRequestException.php b/src/Api/Generated/Exception/CreateProductTagBadRequestException.php index f5595d21..13e309a0 100644 --- a/src/Api/Generated/Exception/CreateProductTagBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductTagBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductTagBadRequestException extends \RuntimeException implements ClientException +class CreateProductTagBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductTagLinkBadRequestException.php b/src/Api/Generated/Exception/CreateProductTagLinkBadRequestException.php index fc8c7fbc..e566431e 100644 --- a/src/Api/Generated/Exception/CreateProductTagLinkBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductTagLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductTagLinkBadRequestException extends \RuntimeException implements ClientException +class CreateProductTagLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductTagOptionBadRequestException.php b/src/Api/Generated/Exception/CreateProductTagOptionBadRequestException.php index 1e05de88..4a5f9c7d 100644 --- a/src/Api/Generated/Exception/CreateProductTagOptionBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductTagOptionBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductTagOptionBadRequestException extends \RuntimeException implements ClientException +class CreateProductTagOptionBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductTagOptionMethodNotAllowedException.php b/src/Api/Generated/Exception/CreateProductTagOptionMethodNotAllowedException.php index f27bc690..1d68c31f 100644 --- a/src/Api/Generated/Exception/CreateProductTagOptionMethodNotAllowedException.php +++ b/src/Api/Generated/Exception/CreateProductTagOptionMethodNotAllowedException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductTagOptionMethodNotAllowedException extends \RuntimeException implements ClientException +class CreateProductTagOptionMethodNotAllowedException extends MethodNotAllowedException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Method Not Allowed', 405); + parent::__construct('Method Not Allowed'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php b/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php index d69fca74..c73f0ba2 100644 --- a/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductUnitBadRequestException extends \RuntimeException implements ClientException +class CreateProductUnitBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductVariantBadRequestException.php b/src/Api/Generated/Exception/CreateProductVariantBadRequestException.php index 1ca1dc56..91a881b1 100644 --- a/src/Api/Generated/Exception/CreateProductVariantBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductVariantBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductVariantBadRequestException extends \RuntimeException implements ClientException +class CreateProductVariantBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductVariantPricelistPriceBadRequestException.php b/src/Api/Generated/Exception/CreateProductVariantPricelistPriceBadRequestException.php index 0f20128a..c5b8e053 100644 --- a/src/Api/Generated/Exception/CreateProductVariantPricelistPriceBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductVariantPricelistPriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductVariantPricelistPriceBadRequestException extends \RuntimeException implements ClientException +class CreateProductVariantPricelistPriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductVariantPricelistVolumePriceBadRequestException.php b/src/Api/Generated/Exception/CreateProductVariantPricelistVolumePriceBadRequestException.php index b19306c5..9570df4d 100644 --- a/src/Api/Generated/Exception/CreateProductVariantPricelistVolumePriceBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductVariantPricelistVolumePriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductVariantPricelistVolumePriceBadRequestException extends \RuntimeException implements ClientException +class CreateProductVariantPricelistVolumePriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductVatRateBadRequestException.php b/src/Api/Generated/Exception/CreateProductVatRateBadRequestException.php index 7d1aa98b..85a36d58 100644 --- a/src/Api/Generated/Exception/CreateProductVatRateBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductVatRateBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductVatRateBadRequestException extends \RuntimeException implements ClientException +class CreateProductVatRateBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductsCategoryLinkBadRequestException.php b/src/Api/Generated/Exception/CreateProductsCategoryLinkBadRequestException.php index 9029d6b6..9a56b2fc 100644 --- a/src/Api/Generated/Exception/CreateProductsCategoryLinkBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductsCategoryLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductsCategoryLinkBadRequestException extends \RuntimeException implements ClientException +class CreateProductsCategoryLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductsLanguageBadRequestException.php b/src/Api/Generated/Exception/CreateProductsLanguageBadRequestException.php index 853a1d66..819c852e 100644 --- a/src/Api/Generated/Exception/CreateProductsLanguageBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductsLanguageBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductsLanguageBadRequestException extends \RuntimeException implements ClientException +class CreateProductsLanguageBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductsMediaFileLinkBadRequestException.php b/src/Api/Generated/Exception/CreateProductsMediaFileLinkBadRequestException.php index 9728436c..5cd50896 100644 --- a/src/Api/Generated/Exception/CreateProductsMediaFileLinkBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductsMediaFileLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductsMediaFileLinkBadRequestException extends \RuntimeException implements ClientException +class CreateProductsMediaFileLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductsMetaDataBadRequestException.php b/src/Api/Generated/Exception/CreateProductsMetaDataBadRequestException.php index 53f91ab1..ea891a06 100644 --- a/src/Api/Generated/Exception/CreateProductsMetaDataBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductsMetaDataBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductsMetaDataBadRequestException extends \RuntimeException implements ClientException +class CreateProductsMetaDataBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateProductsVariantsAttributeValuesBadRequestException.php b/src/Api/Generated/Exception/CreateProductsVariantsAttributeValuesBadRequestException.php index 36b46232..c9b0e149 100644 --- a/src/Api/Generated/Exception/CreateProductsVariantsAttributeValuesBadRequestException.php +++ b/src/Api/Generated/Exception/CreateProductsVariantsAttributeValuesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateProductsVariantsAttributeValuesBadRequestException extends \RuntimeException implements ClientException +class CreateProductsVariantsAttributeValuesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateStockLocationBadRequestException.php b/src/Api/Generated/Exception/CreateStockLocationBadRequestException.php index 512d0df2..f509e098 100644 --- a/src/Api/Generated/Exception/CreateStockLocationBadRequestException.php +++ b/src/Api/Generated/Exception/CreateStockLocationBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateStockLocationBadRequestException extends \RuntimeException implements ClientException +class CreateStockLocationBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateStockLocationForbiddenException.php b/src/Api/Generated/Exception/CreateStockLocationForbiddenException.php index 146586af..8232e10c 100644 --- a/src/Api/Generated/Exception/CreateStockLocationForbiddenException.php +++ b/src/Api/Generated/Exception/CreateStockLocationForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateStockLocationForbiddenException extends \RuntimeException implements ClientException +class CreateStockLocationForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Forbidden', 403); + parent::__construct('Forbidden'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/CreateWebHookBadRequestException.php b/src/Api/Generated/Exception/CreateWebHookBadRequestException.php index 1b21aff9..e90ada22 100644 --- a/src/Api/Generated/Exception/CreateWebHookBadRequestException.php +++ b/src/Api/Generated/Exception/CreateWebHookBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class CreateWebHookBadRequestException extends \RuntimeException implements ClientException +class CreateWebHookBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteAttributeNotFoundException.php b/src/Api/Generated/Exception/DeleteAttributeNotFoundException.php index fefcb0ef..f83a4135 100644 --- a/src/Api/Generated/Exception/DeleteAttributeNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteAttributeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteAttributeNotFoundException extends \RuntimeException implements ClientException +class DeleteAttributeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteAttributeValueNotFoundException.php b/src/Api/Generated/Exception/DeleteAttributeValueNotFoundException.php index 3731f9b1..d943b726 100644 --- a/src/Api/Generated/Exception/DeleteAttributeValueNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteAttributeValueNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteAttributeValueNotFoundException extends \RuntimeException implements ClientException +class DeleteAttributeValueNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteCustomerNotFoundException.php b/src/Api/Generated/Exception/DeleteCustomerNotFoundException.php index aea58662..58e56cba 100644 --- a/src/Api/Generated/Exception/DeleteCustomerNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteCustomerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteCustomerNotFoundException extends \RuntimeException implements ClientException +class DeleteCustomerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteMediaFileNotFoundException.php b/src/Api/Generated/Exception/DeleteMediaFileNotFoundException.php index 38e148c0..e06df05d 100644 --- a/src/Api/Generated/Exception/DeleteMediaFileNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteMediaFileNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteMediaFileNotFoundException extends \RuntimeException implements ClientException +class DeleteMediaFileNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteOrderAddressNotFoundException.php b/src/Api/Generated/Exception/DeleteOrderAddressNotFoundException.php index 12b77391..a133309a 100644 --- a/src/Api/Generated/Exception/DeleteOrderAddressNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteOrderAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteOrderAddressNotFoundException extends \RuntimeException implements ClientException +class DeleteOrderAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteOrderExternalServiceNotFoundException.php b/src/Api/Generated/Exception/DeleteOrderExternalServiceNotFoundException.php index f0958bd5..2c619c62 100644 --- a/src/Api/Generated/Exception/DeleteOrderExternalServiceNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteOrderExternalServiceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteOrderExternalServiceNotFoundException extends \RuntimeException implements ClientException +class DeleteOrderExternalServiceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteOrderItemNotFoundException.php b/src/Api/Generated/Exception/DeleteOrderItemNotFoundException.php index 0a8aebe0..7f4d06ef 100644 --- a/src/Api/Generated/Exception/DeleteOrderItemNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteOrderItemNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteOrderItemNotFoundException extends \RuntimeException implements ClientException +class DeleteOrderItemNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteOrderNotFoundException.php b/src/Api/Generated/Exception/DeleteOrderNotFoundException.php index cdc4ca8d..2815c7ae 100644 --- a/src/Api/Generated/Exception/DeleteOrderNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteOrderNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteOrderNotFoundException extends \RuntimeException implements ClientException +class DeleteOrderNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteOrderStatusForbiddenException.php b/src/Api/Generated/Exception/DeleteOrderStatusForbiddenException.php index 6aec7b02..18537b84 100644 --- a/src/Api/Generated/Exception/DeleteOrderStatusForbiddenException.php +++ b/src/Api/Generated/Exception/DeleteOrderStatusForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteOrderStatusForbiddenException extends \RuntimeException implements ClientException +class DeleteOrderStatusForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 403); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteOrderStatusNotFoundException.php b/src/Api/Generated/Exception/DeleteOrderStatusNotFoundException.php index 2117209a..29e28bfb 100644 --- a/src/Api/Generated/Exception/DeleteOrderStatusNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteOrderStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteOrderStatusNotFoundException extends \RuntimeException implements ClientException +class DeleteOrderStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeletePricelistForbiddenException.php b/src/Api/Generated/Exception/DeletePricelistForbiddenException.php index 8a06e404..62cca9e1 100644 --- a/src/Api/Generated/Exception/DeletePricelistForbiddenException.php +++ b/src/Api/Generated/Exception/DeletePricelistForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeletePricelistForbiddenException extends \RuntimeException implements ClientException +class DeletePricelistForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Forbidden', 403); + parent::__construct('Forbidden'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeletePricelistNotFoundException.php b/src/Api/Generated/Exception/DeletePricelistNotFoundException.php index 2f3bb821..487c9b59 100644 --- a/src/Api/Generated/Exception/DeletePricelistNotFoundException.php +++ b/src/Api/Generated/Exception/DeletePricelistNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeletePricelistNotFoundException extends \RuntimeException implements ClientException +class DeletePricelistNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductBundledProductsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/DeleteProductBundledProductsPricelistPriceNotFoundException.php index f8c528c6..2000ab5c 100644 --- a/src/Api/Generated/Exception/DeleteProductBundledProductsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductBundledProductsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductBundledProductsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class DeleteProductBundledProductsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductCategoryNotFoundException.php b/src/Api/Generated/Exception/DeleteProductCategoryNotFoundException.php index 7090ae4f..c9632cec 100644 --- a/src/Api/Generated/Exception/DeleteProductCategoryNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductCategoryNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductCategoryNotFoundException extends \RuntimeException implements ClientException +class DeleteProductCategoryNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductManufacturerNotFoundException.php b/src/Api/Generated/Exception/DeleteProductManufacturerNotFoundException.php index 6adec184..45e48443 100644 --- a/src/Api/Generated/Exception/DeleteProductManufacturerNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductManufacturerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductManufacturerNotFoundException extends \RuntimeException implements ClientException +class DeleteProductManufacturerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductMetaDataTypeNotFoundException.php b/src/Api/Generated/Exception/DeleteProductMetaDataTypeNotFoundException.php index b2acdc9f..b2a18c12 100644 --- a/src/Api/Generated/Exception/DeleteProductMetaDataTypeNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductMetaDataTypeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductMetaDataTypeNotFoundException extends \RuntimeException implements ClientException +class DeleteProductMetaDataTypeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductNotFoundException.php b/src/Api/Generated/Exception/DeleteProductNotFoundException.php index cac3dc48..53f80644 100644 --- a/src/Api/Generated/Exception/DeleteProductNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductNotFoundException extends \RuntimeException implements ClientException +class DeleteProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductStockStatusNotFoundException.php b/src/Api/Generated/Exception/DeleteProductStockStatusNotFoundException.php index ec8ba4ed..94922b48 100644 --- a/src/Api/Generated/Exception/DeleteProductStockStatusNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductStockStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductStockStatusNotFoundException extends \RuntimeException implements ClientException +class DeleteProductStockStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductTagLinkNotFoundException.php b/src/Api/Generated/Exception/DeleteProductTagLinkNotFoundException.php index 42b7a0d8..ce248a43 100644 --- a/src/Api/Generated/Exception/DeleteProductTagLinkNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductTagLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductTagLinkNotFoundException extends \RuntimeException implements ClientException +class DeleteProductTagLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductTagNotFoundException.php b/src/Api/Generated/Exception/DeleteProductTagNotFoundException.php index d83e9a55..ea9bc382 100644 --- a/src/Api/Generated/Exception/DeleteProductTagNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductTagNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductTagNotFoundException extends \RuntimeException implements ClientException +class DeleteProductTagNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductTagOptionMethodNotAllowedException.php b/src/Api/Generated/Exception/DeleteProductTagOptionMethodNotAllowedException.php index 157b14ad..4ca32435 100644 --- a/src/Api/Generated/Exception/DeleteProductTagOptionMethodNotAllowedException.php +++ b/src/Api/Generated/Exception/DeleteProductTagOptionMethodNotAllowedException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductTagOptionMethodNotAllowedException extends \RuntimeException implements ClientException +class DeleteProductTagOptionMethodNotAllowedException extends MethodNotAllowedException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Method Not Allowed', 405); + parent::__construct('Method Not Allowed'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductTagOptionNotFoundException.php b/src/Api/Generated/Exception/DeleteProductTagOptionNotFoundException.php index 8417ca78..a32b8fb2 100644 --- a/src/Api/Generated/Exception/DeleteProductTagOptionNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductTagOptionNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductTagOptionNotFoundException extends \RuntimeException implements ClientException +class DeleteProductTagOptionNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php b/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php index f7942474..22f5b412 100644 --- a/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductUnitNotFoundException extends \RuntimeException implements ClientException +class DeleteProductUnitNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductVariantStocksNotFoundException.php b/src/Api/Generated/Exception/DeleteProductVariantStocksNotFoundException.php index 51bb1f51..dca8e716 100644 --- a/src/Api/Generated/Exception/DeleteProductVariantStocksNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductVariantStocksNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductVariantStocksNotFoundException extends \RuntimeException implements ClientException +class DeleteProductVariantStocksNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsBundledProductNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsBundledProductNotFoundException.php index 520eaae1..28c4f7b7 100644 --- a/src/Api/Generated/Exception/DeleteProductsBundledProductNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsBundledProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsBundledProductNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsBundledProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsCategoryLinkNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsCategoryLinkNotFoundException.php index 077fe0e5..1a0a3c75 100644 --- a/src/Api/Generated/Exception/DeleteProductsCategoryLinkNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsCategoryLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsCategoryLinkNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsCategoryLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsLanguageNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsLanguageNotFoundException.php index 95d22112..10369174 100644 --- a/src/Api/Generated/Exception/DeleteProductsLanguageNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsLanguageNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsLanguageNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsLanguageNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsMediaFileLinkNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsMediaFileLinkNotFoundException.php index 6575ef3d..966a3965 100644 --- a/src/Api/Generated/Exception/DeleteProductsMediaFileLinkNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsMediaFileLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsMediaFileLinkNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsMediaFileLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsMetaDataNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsMetaDataNotFoundException.php index e16801f7..873ab797 100644 --- a/src/Api/Generated/Exception/DeleteProductsMetaDataNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsMetaDataNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsMetaDataNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsMetaDataNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsVariantNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsVariantNotFoundException.php index a9d6d0ee..eb04a644 100644 --- a/src/Api/Generated/Exception/DeleteProductsVariantNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsVariantNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsVariantNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsVariantNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsVariantsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsVariantsPricelistPriceNotFoundException.php index 2914776f..fe1735bf 100644 --- a/src/Api/Generated/Exception/DeleteProductsVariantsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsVariantsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsVariantsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsVariantsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsVariantsPricelistVolumePriceNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsVariantsPricelistVolumePriceNotFoundException.php index ffd4e3f2..a67c3776 100644 --- a/src/Api/Generated/Exception/DeleteProductsVariantsPricelistVolumePriceNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsVariantsPricelistVolumePriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsVariantsPricelistVolumePriceNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsVariantsPricelistVolumePriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteProductsVatRateNotFoundException.php b/src/Api/Generated/Exception/DeleteProductsVatRateNotFoundException.php index 4be38483..05b148d4 100644 --- a/src/Api/Generated/Exception/DeleteProductsVatRateNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteProductsVatRateNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteProductsVatRateNotFoundException extends \RuntimeException implements ClientException +class DeleteProductsVatRateNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteStockLocationForbiddenException.php b/src/Api/Generated/Exception/DeleteStockLocationForbiddenException.php index 14b20db5..67f16e2c 100644 --- a/src/Api/Generated/Exception/DeleteStockLocationForbiddenException.php +++ b/src/Api/Generated/Exception/DeleteStockLocationForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteStockLocationForbiddenException extends \RuntimeException implements ClientException +class DeleteStockLocationForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Forbidden', 403); + parent::__construct('Forbidden'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteStockLocationNotFoundException.php b/src/Api/Generated/Exception/DeleteStockLocationNotFoundException.php index a5aa3aa5..3d287530 100644 --- a/src/Api/Generated/Exception/DeleteStockLocationNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteStockLocationNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteStockLocationNotFoundException extends \RuntimeException implements ClientException +class DeleteStockLocationNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/DeleteWebHookNotFoundException.php b/src/Api/Generated/Exception/DeleteWebHookNotFoundException.php index e2748d53..95d13ef3 100644 --- a/src/Api/Generated/Exception/DeleteWebHookNotFoundException.php +++ b/src/Api/Generated/Exception/DeleteWebHookNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class DeleteWebHookNotFoundException extends \RuntimeException implements ClientException +class DeleteWebHookNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ForbiddenException.php b/src/Api/Generated/Exception/ForbiddenException.php new file mode 100644 index 00000000..33b26819 --- /dev/null +++ b/src/Api/Generated/Exception/ForbiddenException.php @@ -0,0 +1,11 @@ +errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetCurrencyNotFoundException.php b/src/Api/Generated/Exception/GetCurrencyNotFoundException.php index 4a017a4b..e9f4bf42 100644 --- a/src/Api/Generated/Exception/GetCurrencyNotFoundException.php +++ b/src/Api/Generated/Exception/GetCurrencyNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetCurrencyNotFoundException extends \RuntimeException implements ClientException +class GetCurrencyNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetCustomerAddressNotFoundException.php b/src/Api/Generated/Exception/GetCustomerAddressNotFoundException.php index ce60c258..1effd40e 100644 --- a/src/Api/Generated/Exception/GetCustomerAddressNotFoundException.php +++ b/src/Api/Generated/Exception/GetCustomerAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetCustomerAddressNotFoundException extends \RuntimeException implements ClientException +class GetCustomerAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetCustomerExternalServiceNotFoundException.php b/src/Api/Generated/Exception/GetCustomerExternalServiceNotFoundException.php index 84efc325..18b1be05 100644 --- a/src/Api/Generated/Exception/GetCustomerExternalServiceNotFoundException.php +++ b/src/Api/Generated/Exception/GetCustomerExternalServiceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetCustomerExternalServiceNotFoundException extends \RuntimeException implements ClientException +class GetCustomerExternalServiceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetCustomerNotFoundException.php b/src/Api/Generated/Exception/GetCustomerNotFoundException.php index a1ee4023..7cc9aa68 100644 --- a/src/Api/Generated/Exception/GetCustomerNotFoundException.php +++ b/src/Api/Generated/Exception/GetCustomerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetCustomerNotFoundException extends \RuntimeException implements ClientException +class GetCustomerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetCustomerTagNotFoundException.php b/src/Api/Generated/Exception/GetCustomerTagNotFoundException.php index 03043abf..940129c9 100644 --- a/src/Api/Generated/Exception/GetCustomerTagNotFoundException.php +++ b/src/Api/Generated/Exception/GetCustomerTagNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetCustomerTagNotFoundException extends \RuntimeException implements ClientException +class GetCustomerTagNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetCustomersTagNotFoundException.php b/src/Api/Generated/Exception/GetCustomersTagNotFoundException.php index a39f8048..bac78ab3 100644 --- a/src/Api/Generated/Exception/GetCustomersTagNotFoundException.php +++ b/src/Api/Generated/Exception/GetCustomersTagNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetCustomersTagNotFoundException extends \RuntimeException implements ClientException +class GetCustomersTagNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetMediaFileNotFoundException.php b/src/Api/Generated/Exception/GetMediaFileNotFoundException.php index 8345c5d3..edfb469c 100644 --- a/src/Api/Generated/Exception/GetMediaFileNotFoundException.php +++ b/src/Api/Generated/Exception/GetMediaFileNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetMediaFileNotFoundException extends \RuntimeException implements ClientException +class GetMediaFileNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetOrderAddressNotFoundException.php b/src/Api/Generated/Exception/GetOrderAddressNotFoundException.php index 2c39d90e..eac2782b 100644 --- a/src/Api/Generated/Exception/GetOrderAddressNotFoundException.php +++ b/src/Api/Generated/Exception/GetOrderAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetOrderAddressNotFoundException extends \RuntimeException implements ClientException +class GetOrderAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetOrderCommentNotFoundException.php b/src/Api/Generated/Exception/GetOrderCommentNotFoundException.php index d6d1c4e9..f6006e00 100644 --- a/src/Api/Generated/Exception/GetOrderCommentNotFoundException.php +++ b/src/Api/Generated/Exception/GetOrderCommentNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetOrderCommentNotFoundException extends \RuntimeException implements ClientException +class GetOrderCommentNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetOrderExternalServiceNotFoundException.php b/src/Api/Generated/Exception/GetOrderExternalServiceNotFoundException.php index 898e99db..61235cd0 100644 --- a/src/Api/Generated/Exception/GetOrderExternalServiceNotFoundException.php +++ b/src/Api/Generated/Exception/GetOrderExternalServiceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetOrderExternalServiceNotFoundException extends \RuntimeException implements ClientException +class GetOrderExternalServiceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetOrderItemNotFoundException.php b/src/Api/Generated/Exception/GetOrderItemNotFoundException.php index 1cb0255b..567acaf4 100644 --- a/src/Api/Generated/Exception/GetOrderItemNotFoundException.php +++ b/src/Api/Generated/Exception/GetOrderItemNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetOrderItemNotFoundException extends \RuntimeException implements ClientException +class GetOrderItemNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetOrderNotFoundException.php b/src/Api/Generated/Exception/GetOrderNotFoundException.php index 43eb6e88..012d3d5f 100644 --- a/src/Api/Generated/Exception/GetOrderNotFoundException.php +++ b/src/Api/Generated/Exception/GetOrderNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetOrderNotFoundException extends \RuntimeException implements ClientException +class GetOrderNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetOrderStatusNotFoundException.php b/src/Api/Generated/Exception/GetOrderStatusNotFoundException.php index a6f1ead1..bec7d33f 100644 --- a/src/Api/Generated/Exception/GetOrderStatusNotFoundException.php +++ b/src/Api/Generated/Exception/GetOrderStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetOrderStatusNotFoundException extends \RuntimeException implements ClientException +class GetOrderStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetPaymentMethodNotFoundException.php b/src/Api/Generated/Exception/GetPaymentMethodNotFoundException.php index 5c964bee..3cc66bb3 100644 --- a/src/Api/Generated/Exception/GetPaymentMethodNotFoundException.php +++ b/src/Api/Generated/Exception/GetPaymentMethodNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetPaymentMethodNotFoundException extends \RuntimeException implements ClientException +class GetPaymentMethodNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetPricelistNotFoundException.php b/src/Api/Generated/Exception/GetPricelistNotFoundException.php index 5ed20c4c..768c8369 100644 --- a/src/Api/Generated/Exception/GetPricelistNotFoundException.php +++ b/src/Api/Generated/Exception/GetPricelistNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetPricelistNotFoundException extends \RuntimeException implements ClientException +class GetPricelistNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductBundledProductsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/GetProductBundledProductsPricelistPriceNotFoundException.php index 286b2188..01947e0e 100644 --- a/src/Api/Generated/Exception/GetProductBundledProductsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductBundledProductsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductBundledProductsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class GetProductBundledProductsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductCategoryNotFoundException.php b/src/Api/Generated/Exception/GetProductCategoryNotFoundException.php index a276238d..f1bef768 100644 --- a/src/Api/Generated/Exception/GetProductCategoryNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductCategoryNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductCategoryNotFoundException extends \RuntimeException implements ClientException +class GetProductCategoryNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductManufacturerNotFoundException.php b/src/Api/Generated/Exception/GetProductManufacturerNotFoundException.php index fe47aaac..5c975540 100644 --- a/src/Api/Generated/Exception/GetProductManufacturerNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductManufacturerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductManufacturerNotFoundException extends \RuntimeException implements ClientException +class GetProductManufacturerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductMetaDataTypeNotFoundException.php b/src/Api/Generated/Exception/GetProductMetaDataTypeNotFoundException.php index b6cb2d28..a05194a3 100644 --- a/src/Api/Generated/Exception/GetProductMetaDataTypeNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductMetaDataTypeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductMetaDataTypeNotFoundException extends \RuntimeException implements ClientException +class GetProductMetaDataTypeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductNotFoundException.php b/src/Api/Generated/Exception/GetProductNotFoundException.php index ccd067ec..3c8c77a5 100644 --- a/src/Api/Generated/Exception/GetProductNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductNotFoundException extends \RuntimeException implements ClientException +class GetProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductStockStatusNotFoundException.php b/src/Api/Generated/Exception/GetProductStockStatusNotFoundException.php index 733a6a3a..2c491389 100644 --- a/src/Api/Generated/Exception/GetProductStockStatusNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductStockStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductStockStatusNotFoundException extends \RuntimeException implements ClientException +class GetProductStockStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductTagLinkNotFoundException.php b/src/Api/Generated/Exception/GetProductTagLinkNotFoundException.php index a5aee7b8..e9b9ebf6 100644 --- a/src/Api/Generated/Exception/GetProductTagLinkNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductTagLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductTagLinkNotFoundException extends \RuntimeException implements ClientException +class GetProductTagLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductTagOptionsNotFoundException.php b/src/Api/Generated/Exception/GetProductTagOptionsNotFoundException.php index fc660e89..d78df5bb 100644 --- a/src/Api/Generated/Exception/GetProductTagOptionsNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductTagOptionsNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductTagOptionsNotFoundException extends \RuntimeException implements ClientException +class GetProductTagOptionsNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductUnitNotFoundException.php b/src/Api/Generated/Exception/GetProductUnitNotFoundException.php index 39eed835..5daa34cf 100644 --- a/src/Api/Generated/Exception/GetProductUnitNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductUnitNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductUnitNotFoundException extends \RuntimeException implements ClientException +class GetProductUnitNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductVariantStockNotFoundException.php b/src/Api/Generated/Exception/GetProductVariantStockNotFoundException.php index 3458c760..6ccb7a1d 100644 --- a/src/Api/Generated/Exception/GetProductVariantStockNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductVariantStockNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductVariantStockNotFoundException extends \RuntimeException implements ClientException +class GetProductVariantStockNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsAttributeNotFoundException.php b/src/Api/Generated/Exception/GetProductsAttributeNotFoundException.php index da3afea1..e14c22f8 100644 --- a/src/Api/Generated/Exception/GetProductsAttributeNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsAttributeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsAttributeNotFoundException extends \RuntimeException implements ClientException +class GetProductsAttributeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsBundledProductsNotFoundException.php b/src/Api/Generated/Exception/GetProductsBundledProductsNotFoundException.php index 74d6f623..4b57f2ab 100644 --- a/src/Api/Generated/Exception/GetProductsBundledProductsNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsBundledProductsNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsBundledProductsNotFoundException extends \RuntimeException implements ClientException +class GetProductsBundledProductsNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsCategoryLinkNotFoundException.php b/src/Api/Generated/Exception/GetProductsCategoryLinkNotFoundException.php index 5dc9ac87..a7c7135d 100644 --- a/src/Api/Generated/Exception/GetProductsCategoryLinkNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsCategoryLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsCategoryLinkNotFoundException extends \RuntimeException implements ClientException +class GetProductsCategoryLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsLanguageNotFoundException.php b/src/Api/Generated/Exception/GetProductsLanguageNotFoundException.php index 217c70b5..7cfd1683 100644 --- a/src/Api/Generated/Exception/GetProductsLanguageNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsLanguageNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsLanguageNotFoundException extends \RuntimeException implements ClientException +class GetProductsLanguageNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsMediaFileLinkNotFoundException.php b/src/Api/Generated/Exception/GetProductsMediaFileLinkNotFoundException.php index c5fc0096..085e38ea 100644 --- a/src/Api/Generated/Exception/GetProductsMediaFileLinkNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsMediaFileLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsMediaFileLinkNotFoundException extends \RuntimeException implements ClientException +class GetProductsMediaFileLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsMetaDataNotFoundException.php b/src/Api/Generated/Exception/GetProductsMetaDataNotFoundException.php index 809005b0..9aac85d9 100644 --- a/src/Api/Generated/Exception/GetProductsMetaDataNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsMetaDataNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsMetaDataNotFoundException extends \RuntimeException implements ClientException +class GetProductsMetaDataNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsTagNotFoundException.php b/src/Api/Generated/Exception/GetProductsTagNotFoundException.php index dad49c3c..75de832f 100644 --- a/src/Api/Generated/Exception/GetProductsTagNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsTagNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsTagNotFoundException extends \RuntimeException implements ClientException +class GetProductsTagNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsVariantNotFoundException.php b/src/Api/Generated/Exception/GetProductsVariantNotFoundException.php index d144a809..1ed429d5 100644 --- a/src/Api/Generated/Exception/GetProductsVariantNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsVariantNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsVariantNotFoundException extends \RuntimeException implements ClientException +class GetProductsVariantNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsVariantsAttributeNotFoundException.php b/src/Api/Generated/Exception/GetProductsVariantsAttributeNotFoundException.php index 2781d0ff..1bbbb5bc 100644 --- a/src/Api/Generated/Exception/GetProductsVariantsAttributeNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsVariantsAttributeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsVariantsAttributeNotFoundException extends \RuntimeException implements ClientException +class GetProductsVariantsAttributeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsVariantsAttributeValueNotFoundException.php b/src/Api/Generated/Exception/GetProductsVariantsAttributeValueNotFoundException.php index da5c8d77..5855c790 100644 --- a/src/Api/Generated/Exception/GetProductsVariantsAttributeValueNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsVariantsAttributeValueNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsVariantsAttributeValueNotFoundException extends \RuntimeException implements ClientException +class GetProductsVariantsAttributeValueNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsVariantsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/GetProductsVariantsPricelistPriceNotFoundException.php index 9ef3f424..3907ae84 100644 --- a/src/Api/Generated/Exception/GetProductsVariantsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsVariantsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsVariantsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class GetProductsVariantsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsVariantsPricelistVolumePriceNotFoundException.php b/src/Api/Generated/Exception/GetProductsVariantsPricelistVolumePriceNotFoundException.php index 5eb0578f..459fd2bf 100644 --- a/src/Api/Generated/Exception/GetProductsVariantsPricelistVolumePriceNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsVariantsPricelistVolumePriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsVariantsPricelistVolumePriceNotFoundException extends \RuntimeException implements ClientException +class GetProductsVariantsPricelistVolumePriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetProductsVatRateNotFoundException.php b/src/Api/Generated/Exception/GetProductsVatRateNotFoundException.php index 82847332..bda8938d 100644 --- a/src/Api/Generated/Exception/GetProductsVatRateNotFoundException.php +++ b/src/Api/Generated/Exception/GetProductsVatRateNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetProductsVatRateNotFoundException extends \RuntimeException implements ClientException +class GetProductsVatRateNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetShippingMethodNotFoundException.php b/src/Api/Generated/Exception/GetShippingMethodNotFoundException.php index af6f17be..14fc30d4 100644 --- a/src/Api/Generated/Exception/GetShippingMethodNotFoundException.php +++ b/src/Api/Generated/Exception/GetShippingMethodNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetShippingMethodNotFoundException extends \RuntimeException implements ClientException +class GetShippingMethodNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetShopNotFoundException.php b/src/Api/Generated/Exception/GetShopNotFoundException.php index ece30083..0aade493 100644 --- a/src/Api/Generated/Exception/GetShopNotFoundException.php +++ b/src/Api/Generated/Exception/GetShopNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetShopNotFoundException extends \RuntimeException implements ClientException +class GetShopNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetStockLocationNotFoundException.php b/src/Api/Generated/Exception/GetStockLocationNotFoundException.php index 0a2797ac..63730a39 100644 --- a/src/Api/Generated/Exception/GetStockLocationNotFoundException.php +++ b/src/Api/Generated/Exception/GetStockLocationNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetStockLocationNotFoundException extends \RuntimeException implements ClientException +class GetStockLocationNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetVatRateNotFoundException.php b/src/Api/Generated/Exception/GetVatRateNotFoundException.php index 4c1a29f2..aed1e6cc 100644 --- a/src/Api/Generated/Exception/GetVatRateNotFoundException.php +++ b/src/Api/Generated/Exception/GetVatRateNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetVatRateNotFoundException extends \RuntimeException implements ClientException +class GetVatRateNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/GetWebHookNotFoundException.php b/src/Api/Generated/Exception/GetWebHookNotFoundException.php index fa7d7e4b..ec8d8911 100644 --- a/src/Api/Generated/Exception/GetWebHookNotFoundException.php +++ b/src/Api/Generated/Exception/GetWebHookNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class GetWebHookNotFoundException extends \RuntimeException implements ClientException +class GetWebHookNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListCustomersBadRequestException.php b/src/Api/Generated/Exception/ListCustomersBadRequestException.php index a7774e74..503a754b 100644 --- a/src/Api/Generated/Exception/ListCustomersBadRequestException.php +++ b/src/Api/Generated/Exception/ListCustomersBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListCustomersBadRequestException extends \RuntimeException implements ClientException +class ListCustomersBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListOrdersBadRequestException.php b/src/Api/Generated/Exception/ListOrdersBadRequestException.php index efe2c0bf..f774614e 100644 --- a/src/Api/Generated/Exception/ListOrdersBadRequestException.php +++ b/src/Api/Generated/Exception/ListOrdersBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListOrdersBadRequestException extends \RuntimeException implements ClientException +class ListOrdersBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductBundledProductsPricelistPricesBadRequestException.php b/src/Api/Generated/Exception/ListProductBundledProductsPricelistPricesBadRequestException.php index 410300a3..ea39a4a0 100644 --- a/src/Api/Generated/Exception/ListProductBundledProductsPricelistPricesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductBundledProductsPricelistPricesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductBundledProductsPricelistPricesBadRequestException extends \RuntimeException implements ClientException +class ListProductBundledProductsPricelistPricesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductCategoriesBadRequestException.php b/src/Api/Generated/Exception/ListProductCategoriesBadRequestException.php index 67f0722a..663b9bb0 100644 --- a/src/Api/Generated/Exception/ListProductCategoriesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductCategoriesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductCategoriesBadRequestException extends \RuntimeException implements ClientException +class ListProductCategoriesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductManufacturersBadRequestException.php b/src/Api/Generated/Exception/ListProductManufacturersBadRequestException.php index d6068564..897c5c72 100644 --- a/src/Api/Generated/Exception/ListProductManufacturersBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductManufacturersBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductManufacturersBadRequestException extends \RuntimeException implements ClientException +class ListProductManufacturersBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductMetaDataTypesBadRequestException.php b/src/Api/Generated/Exception/ListProductMetaDataTypesBadRequestException.php index 6245c6ab..32917991 100644 --- a/src/Api/Generated/Exception/ListProductMetaDataTypesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductMetaDataTypesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductMetaDataTypesBadRequestException extends \RuntimeException implements ClientException +class ListProductMetaDataTypesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductStockStatsesBadRequestException.php b/src/Api/Generated/Exception/ListProductStockStatsesBadRequestException.php index 3fc998fe..4cdbe65b 100644 --- a/src/Api/Generated/Exception/ListProductStockStatsesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductStockStatsesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductStockStatsesBadRequestException extends \RuntimeException implements ClientException +class ListProductStockStatsesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductTagLinksBadRequestException.php b/src/Api/Generated/Exception/ListProductTagLinksBadRequestException.php index a5e5df50..a0d145f9 100644 --- a/src/Api/Generated/Exception/ListProductTagLinksBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductTagLinksBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductTagLinksBadRequestException extends \RuntimeException implements ClientException +class ListProductTagLinksBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductUnitsBadRequestException.php b/src/Api/Generated/Exception/ListProductUnitsBadRequestException.php index cdf7e9e5..169a6f82 100644 --- a/src/Api/Generated/Exception/ListProductUnitsBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductUnitsBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductUnitsBadRequestException extends \RuntimeException implements ClientException +class ListProductUnitsBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsAttributesNotFoundException.php b/src/Api/Generated/Exception/ListProductsAttributesNotFoundException.php index 13b2ed11..19d4aecb 100644 --- a/src/Api/Generated/Exception/ListProductsAttributesNotFoundException.php +++ b/src/Api/Generated/Exception/ListProductsAttributesNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsAttributesNotFoundException extends \RuntimeException implements ClientException +class ListProductsAttributesNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 404); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsBadRequestException.php b/src/Api/Generated/Exception/ListProductsBadRequestException.php index eb09376b..491ce653 100644 --- a/src/Api/Generated/Exception/ListProductsBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsBadRequestException extends \RuntimeException implements ClientException +class ListProductsBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsBundledProductsBadRequestException.php b/src/Api/Generated/Exception/ListProductsBundledProductsBadRequestException.php index dfde8648..850a4f3e 100644 --- a/src/Api/Generated/Exception/ListProductsBundledProductsBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsBundledProductsBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsBundledProductsBadRequestException extends \RuntimeException implements ClientException +class ListProductsBundledProductsBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsCategoryLinksBadRequestException.php b/src/Api/Generated/Exception/ListProductsCategoryLinksBadRequestException.php index d1527707..6451e260 100644 --- a/src/Api/Generated/Exception/ListProductsCategoryLinksBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsCategoryLinksBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsCategoryLinksBadRequestException extends \RuntimeException implements ClientException +class ListProductsCategoryLinksBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsLanguagesBadRequestException.php b/src/Api/Generated/Exception/ListProductsLanguagesBadRequestException.php index 61f556dc..3200c972 100644 --- a/src/Api/Generated/Exception/ListProductsLanguagesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsLanguagesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsLanguagesBadRequestException extends \RuntimeException implements ClientException +class ListProductsLanguagesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsMediaFileLinksBadRequestException.php b/src/Api/Generated/Exception/ListProductsMediaFileLinksBadRequestException.php index 37f577fd..625c41a4 100644 --- a/src/Api/Generated/Exception/ListProductsMediaFileLinksBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsMediaFileLinksBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsMediaFileLinksBadRequestException extends \RuntimeException implements ClientException +class ListProductsMediaFileLinksBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsMetaDataBadRequestException.php b/src/Api/Generated/Exception/ListProductsMetaDataBadRequestException.php index 2861bc2e..ff3a3b46 100644 --- a/src/Api/Generated/Exception/ListProductsMetaDataBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsMetaDataBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsMetaDataBadRequestException extends \RuntimeException implements ClientException +class ListProductsMetaDataBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVariantsAttributeValuesBadRequestException.php b/src/Api/Generated/Exception/ListProductsVariantsAttributeValuesBadRequestException.php index 3efd90a6..c9095169 100644 --- a/src/Api/Generated/Exception/ListProductsVariantsAttributeValuesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVariantsAttributeValuesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVariantsAttributeValuesBadRequestException extends \RuntimeException implements ClientException +class ListProductsVariantsAttributeValuesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVariantsAttributesBadRequestException.php b/src/Api/Generated/Exception/ListProductsVariantsAttributesBadRequestException.php index 30b532f5..8effb334 100644 --- a/src/Api/Generated/Exception/ListProductsVariantsAttributesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVariantsAttributesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVariantsAttributesBadRequestException extends \RuntimeException implements ClientException +class ListProductsVariantsAttributesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVariantsBadRequestException.php b/src/Api/Generated/Exception/ListProductsVariantsBadRequestException.php index 4c7c0635..e1316092 100644 --- a/src/Api/Generated/Exception/ListProductsVariantsBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVariantsBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVariantsBadRequestException extends \RuntimeException implements ClientException +class ListProductsVariantsBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVariantsPricelistPricesBadRequestException.php b/src/Api/Generated/Exception/ListProductsVariantsPricelistPricesBadRequestException.php index d9e58ecf..94e93732 100644 --- a/src/Api/Generated/Exception/ListProductsVariantsPricelistPricesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVariantsPricelistPricesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVariantsPricelistPricesBadRequestException extends \RuntimeException implements ClientException +class ListProductsVariantsPricelistPricesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVariantsPricelistVolumePricesBadRequestException.php b/src/Api/Generated/Exception/ListProductsVariantsPricelistVolumePricesBadRequestException.php index 832edd04..9f93aae0 100644 --- a/src/Api/Generated/Exception/ListProductsVariantsPricelistVolumePricesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVariantsPricelistVolumePricesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVariantsPricelistVolumePricesBadRequestException extends \RuntimeException implements ClientException +class ListProductsVariantsPricelistVolumePricesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVariantsStocksBadRequestException.php b/src/Api/Generated/Exception/ListProductsVariantsStocksBadRequestException.php index 2e0dd1a1..9a3ca2f4 100644 --- a/src/Api/Generated/Exception/ListProductsVariantsStocksBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVariantsStocksBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVariantsStocksBadRequestException extends \RuntimeException implements ClientException +class ListProductsVariantsStocksBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListProductsVatRatesBadRequestException.php b/src/Api/Generated/Exception/ListProductsVatRatesBadRequestException.php index db8596b4..9d48131d 100644 --- a/src/Api/Generated/Exception/ListProductsVatRatesBadRequestException.php +++ b/src/Api/Generated/Exception/ListProductsVatRatesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListProductsVatRatesBadRequestException extends \RuntimeException implements ClientException +class ListProductsVatRatesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListStockLocationsBadRequestException.php b/src/Api/Generated/Exception/ListStockLocationsBadRequestException.php index 0d663eda..c9bfa7e2 100644 --- a/src/Api/Generated/Exception/ListStockLocationsBadRequestException.php +++ b/src/Api/Generated/Exception/ListStockLocationsBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListStockLocationsBadRequestException extends \RuntimeException implements ClientException +class ListStockLocationsBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/ListVatRatesBadRequestException.php b/src/Api/Generated/Exception/ListVatRatesBadRequestException.php index 215573e7..b7c704d2 100644 --- a/src/Api/Generated/Exception/ListVatRatesBadRequestException.php +++ b/src/Api/Generated/Exception/ListVatRatesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class ListVatRatesBadRequestException extends \RuntimeException implements ClientException +class ListVatRatesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/MethodNotAllowedException.php b/src/Api/Generated/Exception/MethodNotAllowedException.php new file mode 100644 index 00000000..d1c75dac --- /dev/null +++ b/src/Api/Generated/Exception/MethodNotAllowedException.php @@ -0,0 +1,11 @@ +errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchCommentToOrderBadRequestException.php b/src/Api/Generated/Exception/PatchCommentToOrderBadRequestException.php index c20edda3..522087bb 100644 --- a/src/Api/Generated/Exception/PatchCommentToOrderBadRequestException.php +++ b/src/Api/Generated/Exception/PatchCommentToOrderBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchCommentToOrderBadRequestException extends \RuntimeException implements ClientException +class PatchCommentToOrderBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchCustomerAddressBadRequestException.php b/src/Api/Generated/Exception/PatchCustomerAddressBadRequestException.php index 381e04de..2c9ac8f3 100644 --- a/src/Api/Generated/Exception/PatchCustomerAddressBadRequestException.php +++ b/src/Api/Generated/Exception/PatchCustomerAddressBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchCustomerAddressBadRequestException extends \RuntimeException implements ClientException +class PatchCustomerAddressBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchCustomerAddressNotFoundException.php b/src/Api/Generated/Exception/PatchCustomerAddressNotFoundException.php index a08a856a..412056da 100644 --- a/src/Api/Generated/Exception/PatchCustomerAddressNotFoundException.php +++ b/src/Api/Generated/Exception/PatchCustomerAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchCustomerAddressNotFoundException extends \RuntimeException implements ClientException +class PatchCustomerAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchCustomerBadRequestException.php b/src/Api/Generated/Exception/PatchCustomerBadRequestException.php index 68c924e4..8215034e 100644 --- a/src/Api/Generated/Exception/PatchCustomerBadRequestException.php +++ b/src/Api/Generated/Exception/PatchCustomerBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchCustomerBadRequestException extends \RuntimeException implements ClientException +class PatchCustomerBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchCustomerNotFoundException.php b/src/Api/Generated/Exception/PatchCustomerNotFoundException.php index 7c5ef389..501de2ef 100644 --- a/src/Api/Generated/Exception/PatchCustomerNotFoundException.php +++ b/src/Api/Generated/Exception/PatchCustomerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchCustomerNotFoundException extends \RuntimeException implements ClientException +class PatchCustomerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchMediaFileBadRequestException.php b/src/Api/Generated/Exception/PatchMediaFileBadRequestException.php index bad88a16..f2a23898 100644 --- a/src/Api/Generated/Exception/PatchMediaFileBadRequestException.php +++ b/src/Api/Generated/Exception/PatchMediaFileBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchMediaFileBadRequestException extends \RuntimeException implements ClientException +class PatchMediaFileBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchMediaFileNotFoundException.php b/src/Api/Generated/Exception/PatchMediaFileNotFoundException.php index 75d1c138..06a50e0b 100644 --- a/src/Api/Generated/Exception/PatchMediaFileNotFoundException.php +++ b/src/Api/Generated/Exception/PatchMediaFileNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchMediaFileNotFoundException extends \RuntimeException implements ClientException +class PatchMediaFileNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderAddressBadRequestException.php b/src/Api/Generated/Exception/PatchOrderAddressBadRequestException.php index e705844a..923c7bd0 100644 --- a/src/Api/Generated/Exception/PatchOrderAddressBadRequestException.php +++ b/src/Api/Generated/Exception/PatchOrderAddressBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderAddressBadRequestException extends \RuntimeException implements ClientException +class PatchOrderAddressBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderAddressNotFoundException.php b/src/Api/Generated/Exception/PatchOrderAddressNotFoundException.php index dec60066..daf81e8a 100644 --- a/src/Api/Generated/Exception/PatchOrderAddressNotFoundException.php +++ b/src/Api/Generated/Exception/PatchOrderAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderAddressNotFoundException extends \RuntimeException implements ClientException +class PatchOrderAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderBadRequestException.php b/src/Api/Generated/Exception/PatchOrderBadRequestException.php index fccc75e4..3563b5c3 100644 --- a/src/Api/Generated/Exception/PatchOrderBadRequestException.php +++ b/src/Api/Generated/Exception/PatchOrderBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderBadRequestException extends \RuntimeException implements ClientException +class PatchOrderBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderExternalServiceBadRequestException.php b/src/Api/Generated/Exception/PatchOrderExternalServiceBadRequestException.php index b8a45949..614caf56 100644 --- a/src/Api/Generated/Exception/PatchOrderExternalServiceBadRequestException.php +++ b/src/Api/Generated/Exception/PatchOrderExternalServiceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderExternalServiceBadRequestException extends \RuntimeException implements ClientException +class PatchOrderExternalServiceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderExternalServiceNotFoundException.php b/src/Api/Generated/Exception/PatchOrderExternalServiceNotFoundException.php index 8a361fea..cc4966e9 100644 --- a/src/Api/Generated/Exception/PatchOrderExternalServiceNotFoundException.php +++ b/src/Api/Generated/Exception/PatchOrderExternalServiceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderExternalServiceNotFoundException extends \RuntimeException implements ClientException +class PatchOrderExternalServiceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderItemBadRequestException.php b/src/Api/Generated/Exception/PatchOrderItemBadRequestException.php index 90fe93b6..65e1c0aa 100644 --- a/src/Api/Generated/Exception/PatchOrderItemBadRequestException.php +++ b/src/Api/Generated/Exception/PatchOrderItemBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderItemBadRequestException extends \RuntimeException implements ClientException +class PatchOrderItemBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderItemNotFoundException.php b/src/Api/Generated/Exception/PatchOrderItemNotFoundException.php index 007b7ea2..c29b2bd0 100644 --- a/src/Api/Generated/Exception/PatchOrderItemNotFoundException.php +++ b/src/Api/Generated/Exception/PatchOrderItemNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderItemNotFoundException extends \RuntimeException implements ClientException +class PatchOrderItemNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderNotFoundException.php b/src/Api/Generated/Exception/PatchOrderNotFoundException.php index 60cd2578..1fdef915 100644 --- a/src/Api/Generated/Exception/PatchOrderNotFoundException.php +++ b/src/Api/Generated/Exception/PatchOrderNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderNotFoundException extends \RuntimeException implements ClientException +class PatchOrderNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderStatusBadRequestException.php b/src/Api/Generated/Exception/PatchOrderStatusBadRequestException.php index e78258dc..36495d83 100644 --- a/src/Api/Generated/Exception/PatchOrderStatusBadRequestException.php +++ b/src/Api/Generated/Exception/PatchOrderStatusBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderStatusBadRequestException extends \RuntimeException implements ClientException +class PatchOrderStatusBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderStatusForbiddenException.php b/src/Api/Generated/Exception/PatchOrderStatusForbiddenException.php index 2a7e86ec..38349d4c 100644 --- a/src/Api/Generated/Exception/PatchOrderStatusForbiddenException.php +++ b/src/Api/Generated/Exception/PatchOrderStatusForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderStatusForbiddenException extends \RuntimeException implements ClientException +class PatchOrderStatusForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 403); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchOrderStatusNotFoundException.php b/src/Api/Generated/Exception/PatchOrderStatusNotFoundException.php index 8d98c1d1..41ce9da8 100644 --- a/src/Api/Generated/Exception/PatchOrderStatusNotFoundException.php +++ b/src/Api/Generated/Exception/PatchOrderStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchOrderStatusNotFoundException extends \RuntimeException implements ClientException +class PatchOrderStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchPricelistBadRequestException.php b/src/Api/Generated/Exception/PatchPricelistBadRequestException.php index 9ee2f510..169e5873 100644 --- a/src/Api/Generated/Exception/PatchPricelistBadRequestException.php +++ b/src/Api/Generated/Exception/PatchPricelistBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchPricelistBadRequestException extends \RuntimeException implements ClientException +class PatchPricelistBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchPricelistNotFoundException.php b/src/Api/Generated/Exception/PatchPricelistNotFoundException.php index a9bf6bc5..210b3795 100644 --- a/src/Api/Generated/Exception/PatchPricelistNotFoundException.php +++ b/src/Api/Generated/Exception/PatchPricelistNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchPricelistNotFoundException extends \RuntimeException implements ClientException +class PatchPricelistNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductBadRequestException.php b/src/Api/Generated/Exception/PatchProductBadRequestException.php index bf3eba8a..1b38419d 100644 --- a/src/Api/Generated/Exception/PatchProductBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductBadRequestException extends \RuntimeException implements ClientException +class PatchProductBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceBadRequestException.php b/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceBadRequestException.php index b66243c9..8cec63a9 100644 --- a/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductBundledProductsPricelistPriceBadRequestException extends \RuntimeException implements ClientException +class PatchProductBundledProductsPricelistPriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceNotFoundException.php index 2ee1b9f2..a7ff0bd3 100644 --- a/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductBundledProductsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductBundledProductsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class PatchProductBundledProductsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductCategoryBadRequestException.php b/src/Api/Generated/Exception/PatchProductCategoryBadRequestException.php index 38f5622a..3a8a286b 100644 --- a/src/Api/Generated/Exception/PatchProductCategoryBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductCategoryBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductCategoryBadRequestException extends \RuntimeException implements ClientException +class PatchProductCategoryBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductCategoryNotFoundException.php b/src/Api/Generated/Exception/PatchProductCategoryNotFoundException.php index 1c4bed0e..adfd42a2 100644 --- a/src/Api/Generated/Exception/PatchProductCategoryNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductCategoryNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductCategoryNotFoundException extends \RuntimeException implements ClientException +class PatchProductCategoryNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductManufacturerNotFoundException.php b/src/Api/Generated/Exception/PatchProductManufacturerNotFoundException.php index ce1b8385..4dbf4365 100644 --- a/src/Api/Generated/Exception/PatchProductManufacturerNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductManufacturerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductManufacturerNotFoundException extends \RuntimeException implements ClientException +class PatchProductManufacturerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductMetaDataTypeBadRequestException.php b/src/Api/Generated/Exception/PatchProductMetaDataTypeBadRequestException.php index 518b1fed..48f4ca41 100644 --- a/src/Api/Generated/Exception/PatchProductMetaDataTypeBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductMetaDataTypeBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductMetaDataTypeBadRequestException extends \RuntimeException implements ClientException +class PatchProductMetaDataTypeBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductMetaDataTypeNotFoundException.php b/src/Api/Generated/Exception/PatchProductMetaDataTypeNotFoundException.php index e575f3ef..a1eb9572 100644 --- a/src/Api/Generated/Exception/PatchProductMetaDataTypeNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductMetaDataTypeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductMetaDataTypeNotFoundException extends \RuntimeException implements ClientException +class PatchProductMetaDataTypeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductNotFoundException.php b/src/Api/Generated/Exception/PatchProductNotFoundException.php index 68247cc8..3bb97b0a 100644 --- a/src/Api/Generated/Exception/PatchProductNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductNotFoundException extends \RuntimeException implements ClientException +class PatchProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductStockStatusBadRequestException.php b/src/Api/Generated/Exception/PatchProductStockStatusBadRequestException.php index 43cde103..357f31b2 100644 --- a/src/Api/Generated/Exception/PatchProductStockStatusBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductStockStatusBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductStockStatusBadRequestException extends \RuntimeException implements ClientException +class PatchProductStockStatusBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductStockStatusNotFoundException.php b/src/Api/Generated/Exception/PatchProductStockStatusNotFoundException.php index 24ebcb2d..b7102e45 100644 --- a/src/Api/Generated/Exception/PatchProductStockStatusNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductStockStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductStockStatusNotFoundException extends \RuntimeException implements ClientException +class PatchProductStockStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductTagBadRequestException.php b/src/Api/Generated/Exception/PatchProductTagBadRequestException.php index 5b9a1c0b..c9c3925d 100644 --- a/src/Api/Generated/Exception/PatchProductTagBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductTagBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductTagBadRequestException extends \RuntimeException implements ClientException +class PatchProductTagBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductTagNotFoundException.php b/src/Api/Generated/Exception/PatchProductTagNotFoundException.php index bcb9f520..400a6d27 100644 --- a/src/Api/Generated/Exception/PatchProductTagNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductTagNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductTagNotFoundException extends \RuntimeException implements ClientException +class PatchProductTagNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductTagOptionBadRequestException.php b/src/Api/Generated/Exception/PatchProductTagOptionBadRequestException.php index 3a8b927c..255f98d7 100644 --- a/src/Api/Generated/Exception/PatchProductTagOptionBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductTagOptionBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductTagOptionBadRequestException extends \RuntimeException implements ClientException +class PatchProductTagOptionBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductTagOptionMethodNotAllowedException.php b/src/Api/Generated/Exception/PatchProductTagOptionMethodNotAllowedException.php index 6825d2eb..d04d0769 100644 --- a/src/Api/Generated/Exception/PatchProductTagOptionMethodNotAllowedException.php +++ b/src/Api/Generated/Exception/PatchProductTagOptionMethodNotAllowedException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductTagOptionMethodNotAllowedException extends \RuntimeException implements ClientException +class PatchProductTagOptionMethodNotAllowedException extends MethodNotAllowedException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Method Not Allowed', 405); + parent::__construct('Method Not Allowed'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductTagOptionNotFoundException.php b/src/Api/Generated/Exception/PatchProductTagOptionNotFoundException.php index 611f6974..85092253 100644 --- a/src/Api/Generated/Exception/PatchProductTagOptionNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductTagOptionNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductTagOptionNotFoundException extends \RuntimeException implements ClientException +class PatchProductTagOptionNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php b/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php index 0b895524..8af75275 100644 --- a/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductUnitNotFoundException extends \RuntimeException implements ClientException +class PatchProductUnitNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php b/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php index 46287dcc..3a93bbde 100644 --- a/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductVariantStockBadRequestException extends \RuntimeException implements ClientException +class PatchProductVariantStockBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php b/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php index 01895e8d..f7b03ccd 100644 --- a/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductVariantStockNotFoundException extends \RuntimeException implements ClientException +class PatchProductVariantStockNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsBundledProductBadRequestException.php b/src/Api/Generated/Exception/PatchProductsBundledProductBadRequestException.php index 25754000..edcf3ff0 100644 --- a/src/Api/Generated/Exception/PatchProductsBundledProductBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsBundledProductBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsBundledProductBadRequestException extends \RuntimeException implements ClientException +class PatchProductsBundledProductBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsBundledProductNotFoundException.php b/src/Api/Generated/Exception/PatchProductsBundledProductNotFoundException.php index bc99bcb6..b212a800 100644 --- a/src/Api/Generated/Exception/PatchProductsBundledProductNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsBundledProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsBundledProductNotFoundException extends \RuntimeException implements ClientException +class PatchProductsBundledProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsCategoryLinkBadRequestException.php b/src/Api/Generated/Exception/PatchProductsCategoryLinkBadRequestException.php index 3a5eab0c..64a493af 100644 --- a/src/Api/Generated/Exception/PatchProductsCategoryLinkBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsCategoryLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsCategoryLinkBadRequestException extends \RuntimeException implements ClientException +class PatchProductsCategoryLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsCategoryLinkNotFoundException.php b/src/Api/Generated/Exception/PatchProductsCategoryLinkNotFoundException.php index 4a782cfc..3424b4ae 100644 --- a/src/Api/Generated/Exception/PatchProductsCategoryLinkNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsCategoryLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsCategoryLinkNotFoundException extends \RuntimeException implements ClientException +class PatchProductsCategoryLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsLanguageBadRequestException.php b/src/Api/Generated/Exception/PatchProductsLanguageBadRequestException.php index 7fa5424d..8c2f190a 100644 --- a/src/Api/Generated/Exception/PatchProductsLanguageBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsLanguageBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsLanguageBadRequestException extends \RuntimeException implements ClientException +class PatchProductsLanguageBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsLanguageNotFoundException.php b/src/Api/Generated/Exception/PatchProductsLanguageNotFoundException.php index aa8bc061..060cd96e 100644 --- a/src/Api/Generated/Exception/PatchProductsLanguageNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsLanguageNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsLanguageNotFoundException extends \RuntimeException implements ClientException +class PatchProductsLanguageNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsMediaFileLinkBadRequestException.php b/src/Api/Generated/Exception/PatchProductsMediaFileLinkBadRequestException.php index 2cde0cfd..7131828f 100644 --- a/src/Api/Generated/Exception/PatchProductsMediaFileLinkBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsMediaFileLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsMediaFileLinkBadRequestException extends \RuntimeException implements ClientException +class PatchProductsMediaFileLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsMediaFileLinkNotFoundException.php b/src/Api/Generated/Exception/PatchProductsMediaFileLinkNotFoundException.php index 3a67795e..850a93e1 100644 --- a/src/Api/Generated/Exception/PatchProductsMediaFileLinkNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsMediaFileLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsMediaFileLinkNotFoundException extends \RuntimeException implements ClientException +class PatchProductsMediaFileLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsMetaDataBadRequestException.php b/src/Api/Generated/Exception/PatchProductsMetaDataBadRequestException.php index ffb0ad61..52926922 100644 --- a/src/Api/Generated/Exception/PatchProductsMetaDataBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsMetaDataBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsMetaDataBadRequestException extends \RuntimeException implements ClientException +class PatchProductsMetaDataBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsMetaDataNotFoundException.php b/src/Api/Generated/Exception/PatchProductsMetaDataNotFoundException.php index 9fc784c5..3fb3ee83 100644 --- a/src/Api/Generated/Exception/PatchProductsMetaDataNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsMetaDataNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsMetaDataNotFoundException extends \RuntimeException implements ClientException +class PatchProductsMetaDataNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantBadRequestException.php b/src/Api/Generated/Exception/PatchProductsVariantBadRequestException.php index 30786e64..ed4cbbe7 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantBadRequestException extends \RuntimeException implements ClientException +class PatchProductsVariantBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantNotFoundException.php b/src/Api/Generated/Exception/PatchProductsVariantNotFoundException.php index 442dc4b9..57b7ac37 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantNotFoundException extends \RuntimeException implements ClientException +class PatchProductsVariantNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantsAttributeValuesBadRequestException.php b/src/Api/Generated/Exception/PatchProductsVariantsAttributeValuesBadRequestException.php index 7dbf3b58..e3c9dab4 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantsAttributeValuesBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantsAttributeValuesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantsAttributeValuesBadRequestException extends \RuntimeException implements ClientException +class PatchProductsVariantsAttributeValuesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceBadRequestException.php b/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceBadRequestException.php index 3c72173f..9cc0793a 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantsPricelistPriceBadRequestException extends \RuntimeException implements ClientException +class PatchProductsVariantsPricelistPriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceNotFoundException.php index 7dcfbbef..fe37f260 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class PatchProductsVariantsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceBadRequestException.php b/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceBadRequestException.php index 79136cf7..7729062e 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantsPricelistVolumePriceBadRequestException extends \RuntimeException implements ClientException +class PatchProductsVariantsPricelistVolumePriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceNotFoundException.php b/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceNotFoundException.php index 02631836..082d58fd 100644 --- a/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsVariantsPricelistVolumePriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVariantsPricelistVolumePriceNotFoundException extends \RuntimeException implements ClientException +class PatchProductsVariantsPricelistVolumePriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVatRateBadRequestException.php b/src/Api/Generated/Exception/PatchProductsVatRateBadRequestException.php index 349ef450..b2027ee8 100644 --- a/src/Api/Generated/Exception/PatchProductsVatRateBadRequestException.php +++ b/src/Api/Generated/Exception/PatchProductsVatRateBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVatRateBadRequestException extends \RuntimeException implements ClientException +class PatchProductsVatRateBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchProductsVatRateNotFoundException.php b/src/Api/Generated/Exception/PatchProductsVatRateNotFoundException.php index ff86aca8..57b1911d 100644 --- a/src/Api/Generated/Exception/PatchProductsVatRateNotFoundException.php +++ b/src/Api/Generated/Exception/PatchProductsVatRateNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchProductsVatRateNotFoundException extends \RuntimeException implements ClientException +class PatchProductsVatRateNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchStockLocationBadRequestException.php b/src/Api/Generated/Exception/PatchStockLocationBadRequestException.php index a7d25413..e5183cb5 100644 --- a/src/Api/Generated/Exception/PatchStockLocationBadRequestException.php +++ b/src/Api/Generated/Exception/PatchStockLocationBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchStockLocationBadRequestException extends \RuntimeException implements ClientException +class PatchStockLocationBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchStockLocationForbiddenException.php b/src/Api/Generated/Exception/PatchStockLocationForbiddenException.php index c88bc1c1..39092bf3 100644 --- a/src/Api/Generated/Exception/PatchStockLocationForbiddenException.php +++ b/src/Api/Generated/Exception/PatchStockLocationForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchStockLocationForbiddenException extends \RuntimeException implements ClientException +class PatchStockLocationForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Forbidden', 403); + parent::__construct('Forbidden'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchStockLocationNotFoundException.php b/src/Api/Generated/Exception/PatchStockLocationNotFoundException.php index a86f0d40..1d5370ec 100644 --- a/src/Api/Generated/Exception/PatchStockLocationNotFoundException.php +++ b/src/Api/Generated/Exception/PatchStockLocationNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchStockLocationNotFoundException extends \RuntimeException implements ClientException +class PatchStockLocationNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchWebHookBadRequestException.php b/src/Api/Generated/Exception/PatchWebHookBadRequestException.php index c9f0553e..35acceb4 100644 --- a/src/Api/Generated/Exception/PatchWebHookBadRequestException.php +++ b/src/Api/Generated/Exception/PatchWebHookBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchWebHookBadRequestException extends \RuntimeException implements ClientException +class PatchWebHookBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PatchWebHookNotFoundException.php b/src/Api/Generated/Exception/PatchWebHookNotFoundException.php index c532fbcf..25d83430 100644 --- a/src/Api/Generated/Exception/PatchWebHookNotFoundException.php +++ b/src/Api/Generated/Exception/PatchWebHookNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PatchWebHookNotFoundException extends \RuntimeException implements ClientException +class PatchWebHookNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutAttributeBadRequestException.php b/src/Api/Generated/Exception/PutAttributeBadRequestException.php index 95f806c0..3e71a80f 100644 --- a/src/Api/Generated/Exception/PutAttributeBadRequestException.php +++ b/src/Api/Generated/Exception/PutAttributeBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutAttributeBadRequestException extends \RuntimeException implements ClientException +class PutAttributeBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutCustomerAddressBadRequestException.php b/src/Api/Generated/Exception/PutCustomerAddressBadRequestException.php index 184de59f..ac1bf5d5 100644 --- a/src/Api/Generated/Exception/PutCustomerAddressBadRequestException.php +++ b/src/Api/Generated/Exception/PutCustomerAddressBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutCustomerAddressBadRequestException extends \RuntimeException implements ClientException +class PutCustomerAddressBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutCustomerAddressNotFoundException.php b/src/Api/Generated/Exception/PutCustomerAddressNotFoundException.php index 60a5f5b0..00cbc057 100644 --- a/src/Api/Generated/Exception/PutCustomerAddressNotFoundException.php +++ b/src/Api/Generated/Exception/PutCustomerAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutCustomerAddressNotFoundException extends \RuntimeException implements ClientException +class PutCustomerAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutCustomerBadRequestException.php b/src/Api/Generated/Exception/PutCustomerBadRequestException.php index 7a74a428..bf241697 100644 --- a/src/Api/Generated/Exception/PutCustomerBadRequestException.php +++ b/src/Api/Generated/Exception/PutCustomerBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutCustomerBadRequestException extends \RuntimeException implements ClientException +class PutCustomerBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutCustomerNotFoundException.php b/src/Api/Generated/Exception/PutCustomerNotFoundException.php index 87dc31ec..b5d43269 100644 --- a/src/Api/Generated/Exception/PutCustomerNotFoundException.php +++ b/src/Api/Generated/Exception/PutCustomerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutCustomerNotFoundException extends \RuntimeException implements ClientException +class PutCustomerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutMediaFileBadRequestException.php b/src/Api/Generated/Exception/PutMediaFileBadRequestException.php index 008704c7..5a028bee 100644 --- a/src/Api/Generated/Exception/PutMediaFileBadRequestException.php +++ b/src/Api/Generated/Exception/PutMediaFileBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutMediaFileBadRequestException extends \RuntimeException implements ClientException +class PutMediaFileBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutMediaFileNotFoundException.php b/src/Api/Generated/Exception/PutMediaFileNotFoundException.php index e9153d16..bf04b9cd 100644 --- a/src/Api/Generated/Exception/PutMediaFileNotFoundException.php +++ b/src/Api/Generated/Exception/PutMediaFileNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutMediaFileNotFoundException extends \RuntimeException implements ClientException +class PutMediaFileNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderAddressBadRequestException.php b/src/Api/Generated/Exception/PutOrderAddressBadRequestException.php index 8147fc8a..2c475c15 100644 --- a/src/Api/Generated/Exception/PutOrderAddressBadRequestException.php +++ b/src/Api/Generated/Exception/PutOrderAddressBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderAddressBadRequestException extends \RuntimeException implements ClientException +class PutOrderAddressBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderAddressNotFoundException.php b/src/Api/Generated/Exception/PutOrderAddressNotFoundException.php index c2223caf..4620c43f 100644 --- a/src/Api/Generated/Exception/PutOrderAddressNotFoundException.php +++ b/src/Api/Generated/Exception/PutOrderAddressNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderAddressNotFoundException extends \RuntimeException implements ClientException +class PutOrderAddressNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderBadRequestException.php b/src/Api/Generated/Exception/PutOrderBadRequestException.php index d1bbcd29..5fd02b10 100644 --- a/src/Api/Generated/Exception/PutOrderBadRequestException.php +++ b/src/Api/Generated/Exception/PutOrderBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderBadRequestException extends \RuntimeException implements ClientException +class PutOrderBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderExternalServiceBadRequestException.php b/src/Api/Generated/Exception/PutOrderExternalServiceBadRequestException.php index fde2d36c..c5858732 100644 --- a/src/Api/Generated/Exception/PutOrderExternalServiceBadRequestException.php +++ b/src/Api/Generated/Exception/PutOrderExternalServiceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderExternalServiceBadRequestException extends \RuntimeException implements ClientException +class PutOrderExternalServiceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderExternalServiceNotFoundException.php b/src/Api/Generated/Exception/PutOrderExternalServiceNotFoundException.php index 99daf23e..3da57190 100644 --- a/src/Api/Generated/Exception/PutOrderExternalServiceNotFoundException.php +++ b/src/Api/Generated/Exception/PutOrderExternalServiceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderExternalServiceNotFoundException extends \RuntimeException implements ClientException +class PutOrderExternalServiceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderItemBadRequestException.php b/src/Api/Generated/Exception/PutOrderItemBadRequestException.php index d5f6fe00..7eb9a59c 100644 --- a/src/Api/Generated/Exception/PutOrderItemBadRequestException.php +++ b/src/Api/Generated/Exception/PutOrderItemBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderItemBadRequestException extends \RuntimeException implements ClientException +class PutOrderItemBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderItemNotFoundException.php b/src/Api/Generated/Exception/PutOrderItemNotFoundException.php index 0db6eb46..d4539893 100644 --- a/src/Api/Generated/Exception/PutOrderItemNotFoundException.php +++ b/src/Api/Generated/Exception/PutOrderItemNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderItemNotFoundException extends \RuntimeException implements ClientException +class PutOrderItemNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderNotFoundException.php b/src/Api/Generated/Exception/PutOrderNotFoundException.php index 1751b9ae..b778159c 100644 --- a/src/Api/Generated/Exception/PutOrderNotFoundException.php +++ b/src/Api/Generated/Exception/PutOrderNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderNotFoundException extends \RuntimeException implements ClientException +class PutOrderNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderStatusBadRequestException.php b/src/Api/Generated/Exception/PutOrderStatusBadRequestException.php index d69a95b1..bf7b2ca5 100644 --- a/src/Api/Generated/Exception/PutOrderStatusBadRequestException.php +++ b/src/Api/Generated/Exception/PutOrderStatusBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderStatusBadRequestException extends \RuntimeException implements ClientException +class PutOrderStatusBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderStatusForbiddenException.php b/src/Api/Generated/Exception/PutOrderStatusForbiddenException.php index c30741e0..f7228a77 100644 --- a/src/Api/Generated/Exception/PutOrderStatusForbiddenException.php +++ b/src/Api/Generated/Exception/PutOrderStatusForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderStatusForbiddenException extends \RuntimeException implements ClientException +class PutOrderStatusForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 403); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutOrderStatusNotFoundException.php b/src/Api/Generated/Exception/PutOrderStatusNotFoundException.php index 40406d4c..63b041e4 100644 --- a/src/Api/Generated/Exception/PutOrderStatusNotFoundException.php +++ b/src/Api/Generated/Exception/PutOrderStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutOrderStatusNotFoundException extends \RuntimeException implements ClientException +class PutOrderStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutPricelistBadRequestException.php b/src/Api/Generated/Exception/PutPricelistBadRequestException.php index ca74486e..47b6b297 100644 --- a/src/Api/Generated/Exception/PutPricelistBadRequestException.php +++ b/src/Api/Generated/Exception/PutPricelistBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutPricelistBadRequestException extends \RuntimeException implements ClientException +class PutPricelistBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutPricelistNotFoundException.php b/src/Api/Generated/Exception/PutPricelistNotFoundException.php index a970cd6b..5670d6a8 100644 --- a/src/Api/Generated/Exception/PutPricelistNotFoundException.php +++ b/src/Api/Generated/Exception/PutPricelistNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutPricelistNotFoundException extends \RuntimeException implements ClientException +class PutPricelistNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductBadRequestException.php b/src/Api/Generated/Exception/PutProductBadRequestException.php index 857256f5..e413c600 100644 --- a/src/Api/Generated/Exception/PutProductBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductBadRequestException extends \RuntimeException implements ClientException +class PutProductBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceBadRequestException.php b/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceBadRequestException.php index d62ddb36..7f9e88d8 100644 --- a/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductBundledProductsPricelistPriceBadRequestException extends \RuntimeException implements ClientException +class PutProductBundledProductsPricelistPriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceNotFoundException.php index 8d0794fd..b77cf916 100644 --- a/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductBundledProductsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductBundledProductsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class PutProductBundledProductsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductCategoryBadRequestException.php b/src/Api/Generated/Exception/PutProductCategoryBadRequestException.php index b34c7272..ba320272 100644 --- a/src/Api/Generated/Exception/PutProductCategoryBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductCategoryBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductCategoryBadRequestException extends \RuntimeException implements ClientException +class PutProductCategoryBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductCategoryNotFoundException.php b/src/Api/Generated/Exception/PutProductCategoryNotFoundException.php index 3232d480..fb4ec9ae 100644 --- a/src/Api/Generated/Exception/PutProductCategoryNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductCategoryNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductCategoryNotFoundException extends \RuntimeException implements ClientException +class PutProductCategoryNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductManufacturerNotFoundException.php b/src/Api/Generated/Exception/PutProductManufacturerNotFoundException.php index 47fc6483..4c36e9c0 100644 --- a/src/Api/Generated/Exception/PutProductManufacturerNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductManufacturerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductManufacturerNotFoundException extends \RuntimeException implements ClientException +class PutProductManufacturerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductMetaDataTypeBadRequestException.php b/src/Api/Generated/Exception/PutProductMetaDataTypeBadRequestException.php index 45994b82..fd67b3fc 100644 --- a/src/Api/Generated/Exception/PutProductMetaDataTypeBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductMetaDataTypeBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductMetaDataTypeBadRequestException extends \RuntimeException implements ClientException +class PutProductMetaDataTypeBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductMetaDataTypeNotFoundException.php b/src/Api/Generated/Exception/PutProductMetaDataTypeNotFoundException.php index acc7a376..afefe396 100644 --- a/src/Api/Generated/Exception/PutProductMetaDataTypeNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductMetaDataTypeNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductMetaDataTypeNotFoundException extends \RuntimeException implements ClientException +class PutProductMetaDataTypeNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductNotFoundException.php b/src/Api/Generated/Exception/PutProductNotFoundException.php index 9590957e..b6ee2b85 100644 --- a/src/Api/Generated/Exception/PutProductNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductNotFoundException extends \RuntimeException implements ClientException +class PutProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductStockStatusBadRequestException.php b/src/Api/Generated/Exception/PutProductStockStatusBadRequestException.php index 3724acba..27735ef3 100644 --- a/src/Api/Generated/Exception/PutProductStockStatusBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductStockStatusBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductStockStatusBadRequestException extends \RuntimeException implements ClientException +class PutProductStockStatusBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductStockStatusNotFoundException.php b/src/Api/Generated/Exception/PutProductStockStatusNotFoundException.php index 9f5d5a38..40e10891 100644 --- a/src/Api/Generated/Exception/PutProductStockStatusNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductStockStatusNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductStockStatusNotFoundException extends \RuntimeException implements ClientException +class PutProductStockStatusNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductTagBadRequestException.php b/src/Api/Generated/Exception/PutProductTagBadRequestException.php index 3c2f7abd..89b3844c 100644 --- a/src/Api/Generated/Exception/PutProductTagBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductTagBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductTagBadRequestException extends \RuntimeException implements ClientException +class PutProductTagBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductTagNotFoundException.php b/src/Api/Generated/Exception/PutProductTagNotFoundException.php index 3ef19774..f1d8fd00 100644 --- a/src/Api/Generated/Exception/PutProductTagNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductTagNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductTagNotFoundException extends \RuntimeException implements ClientException +class PutProductTagNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductTagOptionBadRequestException.php b/src/Api/Generated/Exception/PutProductTagOptionBadRequestException.php index b6bcdbfb..22ce68aa 100644 --- a/src/Api/Generated/Exception/PutProductTagOptionBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductTagOptionBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductTagOptionBadRequestException extends \RuntimeException implements ClientException +class PutProductTagOptionBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductTagOptionMethodNotAllowedException.php b/src/Api/Generated/Exception/PutProductTagOptionMethodNotAllowedException.php index 96bb9e31..8bee8ed2 100644 --- a/src/Api/Generated/Exception/PutProductTagOptionMethodNotAllowedException.php +++ b/src/Api/Generated/Exception/PutProductTagOptionMethodNotAllowedException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductTagOptionMethodNotAllowedException extends \RuntimeException implements ClientException +class PutProductTagOptionMethodNotAllowedException extends MethodNotAllowedException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Method Not Allowed', 405); + parent::__construct('Method Not Allowed'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductTagOptionNotFoundException.php b/src/Api/Generated/Exception/PutProductTagOptionNotFoundException.php index 9410c30f..7bb24deb 100644 --- a/src/Api/Generated/Exception/PutProductTagOptionNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductTagOptionNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductTagOptionNotFoundException extends \RuntimeException implements ClientException +class PutProductTagOptionNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductUnitNotFoundException.php b/src/Api/Generated/Exception/PutProductUnitNotFoundException.php index 15dcb367..390fcd46 100644 --- a/src/Api/Generated/Exception/PutProductUnitNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductUnitNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductUnitNotFoundException extends \RuntimeException implements ClientException +class PutProductUnitNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductVariantStockBadRequestException.php b/src/Api/Generated/Exception/PutProductVariantStockBadRequestException.php index 441e4e7d..42f75da1 100644 --- a/src/Api/Generated/Exception/PutProductVariantStockBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductVariantStockBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductVariantStockBadRequestException extends \RuntimeException implements ClientException +class PutProductVariantStockBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductVariantStockNotFoundException.php b/src/Api/Generated/Exception/PutProductVariantStockNotFoundException.php index a963c296..4bbc0a0d 100644 --- a/src/Api/Generated/Exception/PutProductVariantStockNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductVariantStockNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductVariantStockNotFoundException extends \RuntimeException implements ClientException +class PutProductVariantStockNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsBundledProductBadRequestException.php b/src/Api/Generated/Exception/PutProductsBundledProductBadRequestException.php index 1f1b93f5..73231818 100644 --- a/src/Api/Generated/Exception/PutProductsBundledProductBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsBundledProductBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsBundledProductBadRequestException extends \RuntimeException implements ClientException +class PutProductsBundledProductBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsBundledProductNotFoundException.php b/src/Api/Generated/Exception/PutProductsBundledProductNotFoundException.php index 0bac329c..8c23b590 100644 --- a/src/Api/Generated/Exception/PutProductsBundledProductNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsBundledProductNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsBundledProductNotFoundException extends \RuntimeException implements ClientException +class PutProductsBundledProductNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsCategoryLinkBadRequestException.php b/src/Api/Generated/Exception/PutProductsCategoryLinkBadRequestException.php index 00bb05a5..5bd81d52 100644 --- a/src/Api/Generated/Exception/PutProductsCategoryLinkBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsCategoryLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsCategoryLinkBadRequestException extends \RuntimeException implements ClientException +class PutProductsCategoryLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsCategoryLinkNotFoundException.php b/src/Api/Generated/Exception/PutProductsCategoryLinkNotFoundException.php index 4ca6ba5a..5527da32 100644 --- a/src/Api/Generated/Exception/PutProductsCategoryLinkNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsCategoryLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsCategoryLinkNotFoundException extends \RuntimeException implements ClientException +class PutProductsCategoryLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsLanguageBadRequestException.php b/src/Api/Generated/Exception/PutProductsLanguageBadRequestException.php index 5eeb22e3..3038cdb9 100644 --- a/src/Api/Generated/Exception/PutProductsLanguageBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsLanguageBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsLanguageBadRequestException extends \RuntimeException implements ClientException +class PutProductsLanguageBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsLanguageNotFoundException.php b/src/Api/Generated/Exception/PutProductsLanguageNotFoundException.php index 8d651ec5..a8a65d5e 100644 --- a/src/Api/Generated/Exception/PutProductsLanguageNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsLanguageNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsLanguageNotFoundException extends \RuntimeException implements ClientException +class PutProductsLanguageNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsMediaFileLinkBadRequestException.php b/src/Api/Generated/Exception/PutProductsMediaFileLinkBadRequestException.php index 628a5aee..b9486f07 100644 --- a/src/Api/Generated/Exception/PutProductsMediaFileLinkBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsMediaFileLinkBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsMediaFileLinkBadRequestException extends \RuntimeException implements ClientException +class PutProductsMediaFileLinkBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsMediaFileLinkNotFoundException.php b/src/Api/Generated/Exception/PutProductsMediaFileLinkNotFoundException.php index 68f4ff14..f64be1e9 100644 --- a/src/Api/Generated/Exception/PutProductsMediaFileLinkNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsMediaFileLinkNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsMediaFileLinkNotFoundException extends \RuntimeException implements ClientException +class PutProductsMediaFileLinkNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsMetaDataBadRequestException.php b/src/Api/Generated/Exception/PutProductsMetaDataBadRequestException.php index 7e6156cf..1c706392 100644 --- a/src/Api/Generated/Exception/PutProductsMetaDataBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsMetaDataBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsMetaDataBadRequestException extends \RuntimeException implements ClientException +class PutProductsMetaDataBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsMetaDataNotFoundException.php b/src/Api/Generated/Exception/PutProductsMetaDataNotFoundException.php index 88c15607..bf6e31b3 100644 --- a/src/Api/Generated/Exception/PutProductsMetaDataNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsMetaDataNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsMetaDataNotFoundException extends \RuntimeException implements ClientException +class PutProductsMetaDataNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantBadRequestException.php b/src/Api/Generated/Exception/PutProductsVariantBadRequestException.php index dba1f1c0..cbbb133a 100644 --- a/src/Api/Generated/Exception/PutProductsVariantBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsVariantBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantBadRequestException extends \RuntimeException implements ClientException +class PutProductsVariantBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantNotFoundException.php b/src/Api/Generated/Exception/PutProductsVariantNotFoundException.php index ba7dcd3e..2bc2ac6c 100644 --- a/src/Api/Generated/Exception/PutProductsVariantNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsVariantNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantNotFoundException extends \RuntimeException implements ClientException +class PutProductsVariantNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantsAttributeValuesBadRequestException.php b/src/Api/Generated/Exception/PutProductsVariantsAttributeValuesBadRequestException.php index 636c6c43..d1f4f381 100644 --- a/src/Api/Generated/Exception/PutProductsVariantsAttributeValuesBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsVariantsAttributeValuesBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantsAttributeValuesBadRequestException extends \RuntimeException implements ClientException +class PutProductsVariantsAttributeValuesBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceBadRequestException.php b/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceBadRequestException.php index d0d36cb9..faf8881c 100644 --- a/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantsPricelistPriceBadRequestException extends \RuntimeException implements ClientException +class PutProductsVariantsPricelistPriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceNotFoundException.php b/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceNotFoundException.php index 1527ff3a..52f29f04 100644 --- a/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsVariantsPricelistPriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantsPricelistPriceNotFoundException extends \RuntimeException implements ClientException +class PutProductsVariantsPricelistPriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceBadRequestException.php b/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceBadRequestException.php index de75cdf3..e18db64a 100644 --- a/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantsPricelistVolumePriceBadRequestException extends \RuntimeException implements ClientException +class PutProductsVariantsPricelistVolumePriceBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceNotFoundException.php b/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceNotFoundException.php index 5d3f1eff..cdfbfb1a 100644 --- a/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsVariantsPricelistVolumePriceNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVariantsPricelistVolumePriceNotFoundException extends \RuntimeException implements ClientException +class PutProductsVariantsPricelistVolumePriceNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVatRateBadRequestException.php b/src/Api/Generated/Exception/PutProductsVatRateBadRequestException.php index 63f4698b..20e304d3 100644 --- a/src/Api/Generated/Exception/PutProductsVatRateBadRequestException.php +++ b/src/Api/Generated/Exception/PutProductsVatRateBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVatRateBadRequestException extends \RuntimeException implements ClientException +class PutProductsVatRateBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutProductsVatRateNotFoundException.php b/src/Api/Generated/Exception/PutProductsVatRateNotFoundException.php index 8b488403..8eb9ee83 100644 --- a/src/Api/Generated/Exception/PutProductsVatRateNotFoundException.php +++ b/src/Api/Generated/Exception/PutProductsVatRateNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutProductsVatRateNotFoundException extends \RuntimeException implements ClientException +class PutProductsVatRateNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutStockLocationBadRequestException.php b/src/Api/Generated/Exception/PutStockLocationBadRequestException.php index ac072d53..4f21a173 100644 --- a/src/Api/Generated/Exception/PutStockLocationBadRequestException.php +++ b/src/Api/Generated/Exception/PutStockLocationBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutStockLocationBadRequestException extends \RuntimeException implements ClientException +class PutStockLocationBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutStockLocationForbiddenException.php b/src/Api/Generated/Exception/PutStockLocationForbiddenException.php index 2292a721..abd5ef6a 100644 --- a/src/Api/Generated/Exception/PutStockLocationForbiddenException.php +++ b/src/Api/Generated/Exception/PutStockLocationForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutStockLocationForbiddenException extends \RuntimeException implements ClientException +class PutStockLocationForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Forbidden', 403); + parent::__construct('Forbidden'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutStockLocationNotFoundException.php b/src/Api/Generated/Exception/PutStockLocationNotFoundException.php index 1b543149..39731e7d 100644 --- a/src/Api/Generated/Exception/PutStockLocationNotFoundException.php +++ b/src/Api/Generated/Exception/PutStockLocationNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutStockLocationNotFoundException extends \RuntimeException implements ClientException +class PutStockLocationNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutWebHookBadRequestException.php b/src/Api/Generated/Exception/PutWebHookBadRequestException.php index 9f2169bb..d0618d48 100644 --- a/src/Api/Generated/Exception/PutWebHookBadRequestException.php +++ b/src/Api/Generated/Exception/PutWebHookBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutWebHookBadRequestException extends \RuntimeException implements ClientException +class PutWebHookBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/PutWebHookNotFoundException.php b/src/Api/Generated/Exception/PutWebHookNotFoundException.php index 891add9c..d8558fdd 100644 --- a/src/Api/Generated/Exception/PutWebHookNotFoundException.php +++ b/src/Api/Generated/Exception/PutWebHookNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class PutWebHookNotFoundException extends \RuntimeException implements ClientException +class PutWebHookNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/RemoveAddressFromCustomerForbiddenException.php b/src/Api/Generated/Exception/RemoveAddressFromCustomerForbiddenException.php index e2bde6b4..6174ef77 100644 --- a/src/Api/Generated/Exception/RemoveAddressFromCustomerForbiddenException.php +++ b/src/Api/Generated/Exception/RemoveAddressFromCustomerForbiddenException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class RemoveAddressFromCustomerForbiddenException extends \RuntimeException implements ClientException +class RemoveAddressFromCustomerForbiddenException extends ForbiddenException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Forbidden', 403); + parent::__construct('Forbidden'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/RemoveAddressFromCustomerNotFoundException.php b/src/Api/Generated/Exception/RemoveAddressFromCustomerNotFoundException.php index d7839c87..ff178e78 100644 --- a/src/Api/Generated/Exception/RemoveAddressFromCustomerNotFoundException.php +++ b/src/Api/Generated/Exception/RemoveAddressFromCustomerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class RemoveAddressFromCustomerNotFoundException extends \RuntimeException implements ClientException +class RemoveAddressFromCustomerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/RemoveCommentFromOrderNotFoundException.php b/src/Api/Generated/Exception/RemoveCommentFromOrderNotFoundException.php index 1691c8b8..7b8b04a6 100644 --- a/src/Api/Generated/Exception/RemoveCommentFromOrderNotFoundException.php +++ b/src/Api/Generated/Exception/RemoveCommentFromOrderNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class RemoveCommentFromOrderNotFoundException extends \RuntimeException implements ClientException +class RemoveCommentFromOrderNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/RemoveTagFromCustomerNotFoundException.php b/src/Api/Generated/Exception/RemoveTagFromCustomerNotFoundException.php index e81191fe..cd690e84 100644 --- a/src/Api/Generated/Exception/RemoveTagFromCustomerNotFoundException.php +++ b/src/Api/Generated/Exception/RemoveTagFromCustomerNotFoundException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class RemoveTagFromCustomerNotFoundException extends \RuntimeException implements ClientException +class RemoveTagFromCustomerNotFoundException extends NotFoundException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Entity not found', 404); + parent::__construct('Entity not found'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Exception/UpdateCommentToOrderBadRequestException.php b/src/Api/Generated/Exception/UpdateCommentToOrderBadRequestException.php index d169a8c4..10b48434 100644 --- a/src/Api/Generated/Exception/UpdateCommentToOrderBadRequestException.php +++ b/src/Api/Generated/Exception/UpdateCommentToOrderBadRequestException.php @@ -2,16 +2,28 @@ namespace Starweb\Api\Generated\Exception; -class UpdateCommentToOrderBadRequestException extends \RuntimeException implements ClientException +class UpdateCommentToOrderBadRequestException extends BadRequestException { + /** + * @var \Starweb\Api\Generated\Model\ErrorModel + */ private $errorModel; - public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel) + /** + * @var \Psr\Http\Message\ResponseInterface + */ + private $response; + public function __construct(\Starweb\Api\Generated\Model\ErrorModel $errorModel, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Bad request', 400); + parent::__construct('Bad request'); $this->errorModel = $errorModel; + $this->response = $response; } - public function getErrorModel() + public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel { return $this->errorModel; } + public function getResponse() : \Psr\Http\Message\ResponseInterface + { + return $this->response; + } } \ No newline at end of file diff --git a/src/Api/Generated/Model/AddressModel.php b/src/Api/Generated/Model/AddressModel.php index 76300196..44b48350 100644 --- a/src/Api/Generated/Model/AddressModel.php +++ b/src/Api/Generated/Model/AddressModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class AddressModel +class AddressModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Company name * @@ -100,6 +108,7 @@ public function getCompanyName() : ?string */ public function setCompanyName(?string $companyName) : self { + $this->initialized['companyName'] = true; $this->companyName = $companyName; return $this; } @@ -121,6 +130,7 @@ public function getFirstName() : ?string */ public function setFirstName(?string $firstName) : self { + $this->initialized['firstName'] = true; $this->firstName = $firstName; return $this; } @@ -142,6 +152,7 @@ public function getLastName() : ?string */ public function setLastName(?string $lastName) : self { + $this->initialized['lastName'] = true; $this->lastName = $lastName; return $this; } @@ -163,6 +174,7 @@ public function getCareOf() : ?string */ public function setCareOf(?string $careOf) : self { + $this->initialized['careOf'] = true; $this->careOf = $careOf; return $this; } @@ -184,6 +196,7 @@ public function getAttention() : ?string */ public function setAttention(?string $attention) : self { + $this->initialized['attention'] = true; $this->attention = $attention; return $this; } @@ -205,6 +218,7 @@ public function getReference() : ?string */ public function setReference(?string $reference) : self { + $this->initialized['reference'] = true; $this->reference = $reference; return $this; } @@ -226,6 +240,7 @@ public function getAddress() : ?string */ public function setAddress(?string $address) : self { + $this->initialized['address'] = true; $this->address = $address; return $this; } @@ -247,6 +262,7 @@ public function getPostalCode() : ?string */ public function setPostalCode(?string $postalCode) : self { + $this->initialized['postalCode'] = true; $this->postalCode = $postalCode; return $this; } @@ -268,6 +284,7 @@ public function getCity() : ?string */ public function setCity(?string $city) : self { + $this->initialized['city'] = true; $this->city = $city; return $this; } @@ -289,6 +306,7 @@ public function getState() : ?string */ public function setState(?string $state) : self { + $this->initialized['state'] = true; $this->state = $state; return $this; } @@ -310,6 +328,7 @@ public function getCountryCode() : ?string */ public function setCountryCode(?string $countryCode) : self { + $this->initialized['countryCode'] = true; $this->countryCode = $countryCode; return $this; } @@ -331,6 +350,7 @@ public function getPhoneNo() : ?string */ public function setPhoneNo(?string $phoneNo) : self { + $this->initialized['phoneNo'] = true; $this->phoneNo = $phoneNo; return $this; } @@ -352,6 +372,7 @@ public function getMobilePhoneNo() : ?string */ public function setMobilePhoneNo(?string $mobilePhoneNo) : self { + $this->initialized['mobilePhoneNo'] = true; $this->mobilePhoneNo = $mobilePhoneNo; return $this; } diff --git a/src/Api/Generated/Model/AddressModelItem.php b/src/Api/Generated/Model/AddressModelItem.php index 018e58f5..3fe04c26 100644 --- a/src/Api/Generated/Model/AddressModelItem.php +++ b/src/Api/Generated/Model/AddressModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class AddressModelItem +class AddressModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?AddressModel */ public function setData(?AddressModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/BundledProductsModel.php b/src/Api/Generated/Model/BundledProductsModel.php index cbd2598c..8a74ce86 100644 --- a/src/Api/Generated/Model/BundledProductsModel.php +++ b/src/Api/Generated/Model/BundledProductsModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class BundledProductsModel +class BundledProductsModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Bundled product only valid for a single variant * @@ -58,6 +66,7 @@ public function getSingleVariant() : ?bool */ public function setSingleVariant(?bool $singleVariant) : self { + $this->initialized['singleVariant'] = true; $this->singleVariant = $singleVariant; return $this; } @@ -79,6 +88,7 @@ public function getBundledProductId() : ?int */ public function setBundledProductId(?int $bundledProductId) : self { + $this->initialized['bundledProductId'] = true; $this->bundledProductId = $bundledProductId; return $this; } @@ -100,6 +110,7 @@ public function getVariantSku() : ?string */ public function setVariantSku(?string $variantSku) : self { + $this->initialized['variantSku'] = true; $this->variantSku = $variantSku; return $this; } @@ -121,6 +132,7 @@ public function getQuantity() : ?int */ public function setQuantity(?int $quantity) : self { + $this->initialized['quantity'] = true; $this->quantity = $quantity; return $this; } @@ -142,6 +154,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -163,6 +176,7 @@ public function getPrices() : ?array */ public function setPrices(?array $prices) : self { + $this->initialized['prices'] = true; $this->prices = $prices; return $this; } diff --git a/src/Api/Generated/Model/BundledProductsModelCollection.php b/src/Api/Generated/Model/BundledProductsModelCollection.php index 64080188..2bcffd9e 100644 --- a/src/Api/Generated/Model/BundledProductsModelCollection.php +++ b/src/Api/Generated/Model/BundledProductsModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class BundledProductsModelCollection +class BundledProductsModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of bundled products * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/BundledProductsModelItem.php b/src/Api/Generated/Model/BundledProductsModelItem.php index bb75211b..ec6eabdd 100644 --- a/src/Api/Generated/Model/BundledProductsModelItem.php +++ b/src/Api/Generated/Model/BundledProductsModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class BundledProductsModelItem +class BundledProductsModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?BundledProductsModel */ public function setData(?BundledProductsModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ClientCredentialModel.php b/src/Api/Generated/Model/ClientCredentialModel.php index 333eb801..aadd0383 100644 --- a/src/Api/Generated/Model/ClientCredentialModel.php +++ b/src/Api/Generated/Model/ClientCredentialModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ClientCredentialModel +class ClientCredentialModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The grant type to use for the request. At this time, only client_credentials is allowed * @@ -40,6 +48,7 @@ public function getGrantType() : ?string */ public function setGrantType(?string $grantType) : self { + $this->initialized['grantType'] = true; $this->grantType = $grantType; return $this; } @@ -61,6 +70,7 @@ public function getClientId() : ?string */ public function setClientId(?string $clientId) : self { + $this->initialized['clientId'] = true; $this->clientId = $clientId; return $this; } @@ -82,6 +92,7 @@ public function getClientSecret() : ?string */ public function setClientSecret(?string $clientSecret) : self { + $this->initialized['clientSecret'] = true; $this->clientSecret = $clientSecret; return $this; } diff --git a/src/Api/Generated/Model/CurrencyCollection.php b/src/Api/Generated/Model/CurrencyCollection.php index 4f9d2b98..65cd0295 100644 --- a/src/Api/Generated/Model/CurrencyCollection.php +++ b/src/Api/Generated/Model/CurrencyCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CurrencyCollection +class CurrencyCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of currencies * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CurrencyModel.php b/src/Api/Generated/Model/CurrencyModel.php index d925d165..e98c2418 100644 --- a/src/Api/Generated/Model/CurrencyModel.php +++ b/src/Api/Generated/Model/CurrencyModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CurrencyModel +class CurrencyModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The currency code * @@ -40,6 +48,7 @@ public function getCode() : ?string */ public function setCode(?string $code) : self { + $this->initialized['code'] = true; $this->code = $code; return $this; } @@ -61,6 +70,7 @@ public function getExchangeRate() : ?float */ public function setExchangeRate(?float $exchangeRate) : self { + $this->initialized['exchangeRate'] = true; $this->exchangeRate = $exchangeRate; return $this; } @@ -82,6 +92,7 @@ public function getPrecision() : ?int */ public function setPrecision(?int $precision) : self { + $this->initialized['precision'] = true; $this->precision = $precision; return $this; } diff --git a/src/Api/Generated/Model/CurrencyModelItem.php b/src/Api/Generated/Model/CurrencyModelItem.php index 0a06725c..b852303d 100644 --- a/src/Api/Generated/Model/CurrencyModelItem.php +++ b/src/Api/Generated/Model/CurrencyModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CurrencyModelItem +class CurrencyModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CurrencyModel */ public function setData(?CurrencyModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerAddedTagModel.php b/src/Api/Generated/Model/CustomerAddedTagModel.php index 09217e13..758533e6 100644 --- a/src/Api/Generated/Model/CustomerAddedTagModel.php +++ b/src/Api/Generated/Model/CustomerAddedTagModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerAddedTagModel +class CustomerAddedTagModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id of the tag * @@ -34,6 +42,7 @@ public function getTagId() : ?int */ public function setTagId(?int $tagId) : self { + $this->initialized['tagId'] = true; $this->tagId = $tagId; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/CustomerAddedTagModelCollection.php b/src/Api/Generated/Model/CustomerAddedTagModelCollection.php index 6df00abf..cb298760 100644 --- a/src/Api/Generated/Model/CustomerAddedTagModelCollection.php +++ b/src/Api/Generated/Model/CustomerAddedTagModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerAddedTagModelCollection +class CustomerAddedTagModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of customer tags * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerAddedTagModelItem.php b/src/Api/Generated/Model/CustomerAddedTagModelItem.php index 5e3bd619..bcb27d3f 100644 --- a/src/Api/Generated/Model/CustomerAddedTagModelItem.php +++ b/src/Api/Generated/Model/CustomerAddedTagModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerAddedTagModelItem +class CustomerAddedTagModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CustomerAddedTagModel */ public function setData(?CustomerAddedTagModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerAddressesModelCollection.php b/src/Api/Generated/Model/CustomerAddressesModelCollection.php index ad830b29..97b19e5e 100644 --- a/src/Api/Generated/Model/CustomerAddressesModelCollection.php +++ b/src/Api/Generated/Model/CustomerAddressesModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerAddressesModelCollection +class CustomerAddressesModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CustomerAddressesModelCollectionData */ public function setData(?CustomerAddressesModelCollectionData $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php b/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php index e857e079..771cc649 100644 --- a/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php +++ b/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerAddressesModelCollectionData +class CustomerAddressesModelCollectionData extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -34,6 +42,7 @@ public function getInvoice() : ?AddressModel */ public function setInvoice(?AddressModel $invoice) : self { + $this->initialized['invoice'] = true; $this->invoice = $invoice; return $this; } @@ -55,6 +64,7 @@ public function getDelivery() : ?AddressModel */ public function setDelivery(?AddressModel $delivery) : self { + $this->initialized['delivery'] = true; $this->delivery = $delivery; return $this; } diff --git a/src/Api/Generated/Model/CustomerAddressesModelItem.php b/src/Api/Generated/Model/CustomerAddressesModelItem.php index 547ef8e9..cbd91703 100644 --- a/src/Api/Generated/Model/CustomerAddressesModelItem.php +++ b/src/Api/Generated/Model/CustomerAddressesModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerAddressesModelItem +class CustomerAddressesModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?AddressModel */ public function setData(?AddressModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerCreatedModel.php b/src/Api/Generated/Model/CustomerCreatedModel.php index b02b7193..f8d1fe06 100644 --- a/src/Api/Generated/Model/CustomerCreatedModel.php +++ b/src/Api/Generated/Model/CustomerCreatedModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerCreatedModel +class CustomerCreatedModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The customers ID * @@ -106,6 +114,7 @@ public function getCustomerId() : ?int */ public function setCustomerId(?int $customerId) : self { + $this->initialized['customerId'] = true; $this->customerId = $customerId; return $this; } @@ -127,6 +136,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -148,6 +158,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -169,6 +180,7 @@ public function getEmail() : ?string */ public function setEmail(?string $email) : self { + $this->initialized['email'] = true; $this->email = $email; return $this; } @@ -190,6 +202,7 @@ public function getNationalIdNo() : ?string */ public function setNationalIdNo(?string $nationalIdNo) : self { + $this->initialized['nationalIdNo'] = true; $this->nationalIdNo = $nationalIdNo; return $this; } @@ -211,6 +224,7 @@ public function getVatNo() : ?string */ public function setVatNo(?string $vatNo) : self { + $this->initialized['vatNo'] = true; $this->vatNo = $vatNo; return $this; } @@ -232,6 +246,7 @@ public function getCustomInfo1() : ?string */ public function setCustomInfo1(?string $customInfo1) : self { + $this->initialized['customInfo1'] = true; $this->customInfo1 = $customInfo1; return $this; } @@ -253,6 +268,7 @@ public function getCustomInfo2() : ?string */ public function setCustomInfo2(?string $customInfo2) : self { + $this->initialized['customInfo2'] = true; $this->customInfo2 = $customInfo2; return $this; } @@ -274,6 +290,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -295,6 +312,7 @@ public function getApproved() : ?bool */ public function setApproved(?bool $approved) : self { + $this->initialized['approved'] = true; $this->approved = $approved; return $this; } @@ -316,6 +334,7 @@ public function getApprovedAt() : ?string */ public function setApprovedAt(?string $approvedAt) : self { + $this->initialized['approvedAt'] = true; $this->approvedAt = $approvedAt; return $this; } @@ -337,6 +356,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -358,6 +378,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -379,6 +400,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } diff --git a/src/Api/Generated/Model/CustomerCreatedModelItem.php b/src/Api/Generated/Model/CustomerCreatedModelItem.php index 2aa25173..3101d231 100644 --- a/src/Api/Generated/Model/CustomerCreatedModelItem.php +++ b/src/Api/Generated/Model/CustomerCreatedModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerCreatedModelItem +class CustomerCreatedModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CustomerCreatedModel */ public function setData(?CustomerCreatedModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerExternalServicesModel.php b/src/Api/Generated/Model/CustomerExternalServicesModel.php index 0b6d7341..d0ee0369 100644 --- a/src/Api/Generated/Model/CustomerExternalServicesModel.php +++ b/src/Api/Generated/Model/CustomerExternalServicesModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerExternalServicesModel +class CustomerExternalServicesModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The service name of the external service * @@ -34,6 +42,7 @@ public function getServiceName() : ?string */ public function setServiceName(?string $serviceName) : self { + $this->initialized['serviceName'] = true; $this->serviceName = $serviceName; return $this; } @@ -55,6 +64,7 @@ public function getExternalIdValue() : ?string */ public function setExternalIdValue(?string $externalIdValue) : self { + $this->initialized['externalIdValue'] = true; $this->externalIdValue = $externalIdValue; return $this; } diff --git a/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php b/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php index 9df347fc..55ab9937 100644 --- a/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php +++ b/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerExternalServicesModelCollection +class CustomerExternalServicesModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of customer external services * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerExternalServicesModelItem.php b/src/Api/Generated/Model/CustomerExternalServicesModelItem.php index b5a7493b..9acbaa14 100644 --- a/src/Api/Generated/Model/CustomerExternalServicesModelItem.php +++ b/src/Api/Generated/Model/CustomerExternalServicesModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerExternalServicesModelItem +class CustomerExternalServicesModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CustomerExternalServicesModel */ public function setData(?CustomerExternalServicesModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerModel.php b/src/Api/Generated/Model/CustomerModel.php index 8d67417e..bf30e016 100644 --- a/src/Api/Generated/Model/CustomerModel.php +++ b/src/Api/Generated/Model/CustomerModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerModel +class CustomerModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The customers ID * @@ -106,6 +114,7 @@ public function getCustomerId() : ?int */ public function setCustomerId(?int $customerId) : self { + $this->initialized['customerId'] = true; $this->customerId = $customerId; return $this; } @@ -127,6 +136,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -148,6 +158,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -169,6 +180,7 @@ public function getEmail() : ?string */ public function setEmail(?string $email) : self { + $this->initialized['email'] = true; $this->email = $email; return $this; } @@ -190,6 +202,7 @@ public function getNationalIdNo() : ?string */ public function setNationalIdNo(?string $nationalIdNo) : self { + $this->initialized['nationalIdNo'] = true; $this->nationalIdNo = $nationalIdNo; return $this; } @@ -211,6 +224,7 @@ public function getVatNo() : ?string */ public function setVatNo(?string $vatNo) : self { + $this->initialized['vatNo'] = true; $this->vatNo = $vatNo; return $this; } @@ -232,6 +246,7 @@ public function getCustomInfo1() : ?string */ public function setCustomInfo1(?string $customInfo1) : self { + $this->initialized['customInfo1'] = true; $this->customInfo1 = $customInfo1; return $this; } @@ -253,6 +268,7 @@ public function getCustomInfo2() : ?string */ public function setCustomInfo2(?string $customInfo2) : self { + $this->initialized['customInfo2'] = true; $this->customInfo2 = $customInfo2; return $this; } @@ -274,6 +290,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -295,6 +312,7 @@ public function getApproved() : ?bool */ public function setApproved(?bool $approved) : self { + $this->initialized['approved'] = true; $this->approved = $approved; return $this; } @@ -316,6 +334,7 @@ public function getApprovedAt() : ?string */ public function setApprovedAt(?string $approvedAt) : self { + $this->initialized['approvedAt'] = true; $this->approvedAt = $approvedAt; return $this; } @@ -337,6 +356,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -358,6 +378,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -379,6 +400,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } diff --git a/src/Api/Generated/Model/CustomerModelCollection.php b/src/Api/Generated/Model/CustomerModelCollection.php index ba4105e5..b56317ce 100644 --- a/src/Api/Generated/Model/CustomerModelCollection.php +++ b/src/Api/Generated/Model/CustomerModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerModelCollection +class CustomerModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of customers * @@ -34,6 +42,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } @@ -55,6 +64,7 @@ public function getMeta() : ?CustomerModelCollectionMeta */ public function setMeta(?CustomerModelCollectionMeta $meta) : self { + $this->initialized['meta'] = true; $this->meta = $meta; return $this; } diff --git a/src/Api/Generated/Model/CustomerModelCollectionMeta.php b/src/Api/Generated/Model/CustomerModelCollectionMeta.php index b3bd2b20..e5d961e3 100644 --- a/src/Api/Generated/Model/CustomerModelCollectionMeta.php +++ b/src/Api/Generated/Model/CustomerModelCollectionMeta.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerModelCollectionMeta +class CustomerModelCollectionMeta extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getPagination() : ?PaginationModel */ public function setPagination(?PaginationModel $pagination) : self { + $this->initialized['pagination'] = true; $this->pagination = $pagination; return $this; } diff --git a/src/Api/Generated/Model/CustomerModelItem.php b/src/Api/Generated/Model/CustomerModelItem.php index fd898aa8..b9840b25 100644 --- a/src/Api/Generated/Model/CustomerModelItem.php +++ b/src/Api/Generated/Model/CustomerModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerModelItem +class CustomerModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CustomerModel */ public function setData(?CustomerModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerTagModel.php b/src/Api/Generated/Model/CustomerTagModel.php index a8b3e976..c9619ed5 100644 --- a/src/Api/Generated/Model/CustomerTagModel.php +++ b/src/Api/Generated/Model/CustomerTagModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerTagModel +class CustomerTagModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag Id * @@ -34,6 +42,7 @@ public function getTagId() : ?int */ public function setTagId(?int $tagId) : self { + $this->initialized['tagId'] = true; $this->tagId = $tagId; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/CustomerTagModelCollection.php b/src/Api/Generated/Model/CustomerTagModelCollection.php index 3f3d3ce5..9cf44079 100644 --- a/src/Api/Generated/Model/CustomerTagModelCollection.php +++ b/src/Api/Generated/Model/CustomerTagModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerTagModelCollection +class CustomerTagModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of customer tags * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerTagModelItem.php b/src/Api/Generated/Model/CustomerTagModelItem.php index 0db2256e..63faa253 100644 --- a/src/Api/Generated/Model/CustomerTagModelItem.php +++ b/src/Api/Generated/Model/CustomerTagModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerTagModelItem +class CustomerTagModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?CustomerTagModel */ public function setData(?CustomerTagModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/CustomerUpdateModel.php b/src/Api/Generated/Model/CustomerUpdateModel.php index 1089c052..3620c96f 100644 --- a/src/Api/Generated/Model/CustomerUpdateModel.php +++ b/src/Api/Generated/Model/CustomerUpdateModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerUpdateModel +class CustomerUpdateModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The customers ID * @@ -100,6 +108,7 @@ public function getCustomerId() : ?int */ public function setCustomerId(?int $customerId) : self { + $this->initialized['customerId'] = true; $this->customerId = $customerId; return $this; } @@ -121,6 +130,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -142,6 +152,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -163,6 +174,7 @@ public function getEmail() : ?string */ public function setEmail(?string $email) : self { + $this->initialized['email'] = true; $this->email = $email; return $this; } @@ -184,6 +196,7 @@ public function getNationalIdNo() : ?string */ public function setNationalIdNo(?string $nationalIdNo) : self { + $this->initialized['nationalIdNo'] = true; $this->nationalIdNo = $nationalIdNo; return $this; } @@ -205,6 +218,7 @@ public function getVatNo() : ?string */ public function setVatNo(?string $vatNo) : self { + $this->initialized['vatNo'] = true; $this->vatNo = $vatNo; return $this; } @@ -226,6 +240,7 @@ public function getCustomInfo1() : ?string */ public function setCustomInfo1(?string $customInfo1) : self { + $this->initialized['customInfo1'] = true; $this->customInfo1 = $customInfo1; return $this; } @@ -247,6 +262,7 @@ public function getCustomInfo2() : ?string */ public function setCustomInfo2(?string $customInfo2) : self { + $this->initialized['customInfo2'] = true; $this->customInfo2 = $customInfo2; return $this; } @@ -268,6 +284,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -289,6 +306,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -310,6 +328,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -331,6 +350,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -352,6 +372,7 @@ public function getAddresses() : ?CustomerUpdateModelAddresses */ public function setAddresses(?CustomerUpdateModelAddresses $addresses) : self { + $this->initialized['addresses'] = true; $this->addresses = $addresses; return $this; } diff --git a/src/Api/Generated/Model/CustomerUpdateModelAddresses.php b/src/Api/Generated/Model/CustomerUpdateModelAddresses.php index 9faada00..80c37a4d 100644 --- a/src/Api/Generated/Model/CustomerUpdateModelAddresses.php +++ b/src/Api/Generated/Model/CustomerUpdateModelAddresses.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class CustomerUpdateModelAddresses +class CustomerUpdateModelAddresses extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -34,6 +42,7 @@ public function getInvoice() : ?AddressModel */ public function setInvoice(?AddressModel $invoice) : self { + $this->initialized['invoice'] = true; $this->invoice = $invoice; return $this; } @@ -55,6 +64,7 @@ public function getDelivery() : ?AddressModel */ public function setDelivery(?AddressModel $delivery) : self { + $this->initialized['delivery'] = true; $this->delivery = $delivery; return $this; } diff --git a/src/Api/Generated/Model/ErrorModel.php b/src/Api/Generated/Model/ErrorModel.php index 814f6fb8..0c6932e6 100644 --- a/src/Api/Generated/Model/ErrorModel.php +++ b/src/Api/Generated/Model/ErrorModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ErrorModel +class ErrorModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * An error code for this type of error * @@ -34,6 +42,7 @@ public function getError() : ?string */ public function setError(?string $error) : self { + $this->initialized['error'] = true; $this->error = $error; return $this; } @@ -55,6 +64,7 @@ public function getErrorDescription() : ?string */ public function setErrorDescription(?string $errorDescription) : self { + $this->initialized['errorDescription'] = true; $this->errorDescription = $errorDescription; return $this; } diff --git a/src/Api/Generated/Model/MediaFileModel.php b/src/Api/Generated/Model/MediaFileModel.php index 05e5133d..de472943 100644 --- a/src/Api/Generated/Model/MediaFileModel.php +++ b/src/Api/Generated/Model/MediaFileModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class MediaFileModel +class MediaFileModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The media file ID * @@ -76,6 +84,7 @@ public function getMediaFileId() : ?int */ public function setMediaFileId(?int $mediaFileId) : self { + $this->initialized['mediaFileId'] = true; $this->mediaFileId = $mediaFileId; return $this; } @@ -97,6 +106,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -118,6 +128,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -139,6 +150,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -160,6 +172,7 @@ public function getSize() : ?int */ public function setSize(?int $size) : self { + $this->initialized['size'] = true; $this->size = $size; return $this; } @@ -181,6 +194,7 @@ public function getMime() : ?string */ public function setMime(?string $mime) : self { + $this->initialized['mime'] = true; $this->mime = $mime; return $this; } @@ -202,6 +216,7 @@ public function getHeight() : ?int */ public function setHeight(?int $height) : self { + $this->initialized['height'] = true; $this->height = $height; return $this; } @@ -223,6 +238,7 @@ public function getWidth() : ?int */ public function setWidth(?int $width) : self { + $this->initialized['width'] = true; $this->width = $width; return $this; } @@ -244,6 +260,7 @@ public function getUrl() : ?string */ public function setUrl(?string $url) : self { + $this->initialized['url'] = true; $this->url = $url; return $this; } diff --git a/src/Api/Generated/Model/MediaFileModelCollection.php b/src/Api/Generated/Model/MediaFileModelCollection.php index 3e4ef839..8ef3c007 100644 --- a/src/Api/Generated/Model/MediaFileModelCollection.php +++ b/src/Api/Generated/Model/MediaFileModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class MediaFileModelCollection +class MediaFileModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of media files * @@ -34,6 +42,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } @@ -55,6 +64,7 @@ public function getMeta() : ?MediaFileModelCollectionMeta */ public function setMeta(?MediaFileModelCollectionMeta $meta) : self { + $this->initialized['meta'] = true; $this->meta = $meta; return $this; } diff --git a/src/Api/Generated/Model/MediaFileModelCollectionMeta.php b/src/Api/Generated/Model/MediaFileModelCollectionMeta.php index fd39b45e..036560a9 100644 --- a/src/Api/Generated/Model/MediaFileModelCollectionMeta.php +++ b/src/Api/Generated/Model/MediaFileModelCollectionMeta.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class MediaFileModelCollectionMeta +class MediaFileModelCollectionMeta extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getPagination() : ?PaginationModel */ public function setPagination(?PaginationModel $pagination) : self { + $this->initialized['pagination'] = true; $this->pagination = $pagination; return $this; } diff --git a/src/Api/Generated/Model/MediaFileModelItem.php b/src/Api/Generated/Model/MediaFileModelItem.php index 06b89d47..3cb7fe83 100644 --- a/src/Api/Generated/Model/MediaFileModelItem.php +++ b/src/Api/Generated/Model/MediaFileModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class MediaFileModelItem +class MediaFileModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?MediaFileModel */ public function setData(?MediaFileModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/MediaFileUploadModel.php b/src/Api/Generated/Model/MediaFileUploadModel.php index 45c55496..fee2b721 100644 --- a/src/Api/Generated/Model/MediaFileUploadModel.php +++ b/src/Api/Generated/Model/MediaFileUploadModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class MediaFileUploadModel +class MediaFileUploadModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getFile() : ?string */ public function setFile(?string $file) : self { + $this->initialized['file'] = true; $this->file = $file; return $this; } diff --git a/src/Api/Generated/Model/OrderAddressCollection.php b/src/Api/Generated/Model/OrderAddressCollection.php index 48f245eb..e9a5c3c1 100644 --- a/src/Api/Generated/Model/OrderAddressCollection.php +++ b/src/Api/Generated/Model/OrderAddressCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderAddressCollection +class OrderAddressCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?OrderAddressModel */ public function setData(?OrderAddressModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderAddressModel.php b/src/Api/Generated/Model/OrderAddressModel.php index 2a50ce07..4ef97d6a 100644 --- a/src/Api/Generated/Model/OrderAddressModel.php +++ b/src/Api/Generated/Model/OrderAddressModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderAddressModel +class OrderAddressModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -58,6 +66,7 @@ public function getOriginalInvoice() : ?AddressModel */ public function setOriginalInvoice(?AddressModel $originalInvoice) : self { + $this->initialized['originalInvoice'] = true; $this->originalInvoice = $originalInvoice; return $this; } @@ -79,6 +88,7 @@ public function getOriginalDelivery() : ?AddressModel */ public function setOriginalDelivery(?AddressModel $originalDelivery) : self { + $this->initialized['originalDelivery'] = true; $this->originalDelivery = $originalDelivery; return $this; } @@ -100,6 +110,7 @@ public function getCustomerInvoice() : ?AddressModel */ public function setCustomerInvoice(?AddressModel $customerInvoice) : self { + $this->initialized['customerInvoice'] = true; $this->customerInvoice = $customerInvoice; return $this; } @@ -121,6 +132,7 @@ public function getCustomerDelivery() : ?AddressModel */ public function setCustomerDelivery(?AddressModel $customerDelivery) : self { + $this->initialized['customerDelivery'] = true; $this->customerDelivery = $customerDelivery; return $this; } @@ -142,6 +154,7 @@ public function getPaymentMethodInvoice() : ?AddressModel */ public function setPaymentMethodInvoice(?AddressModel $paymentMethodInvoice) : self { + $this->initialized['paymentMethodInvoice'] = true; $this->paymentMethodInvoice = $paymentMethodInvoice; return $this; } @@ -163,6 +176,7 @@ public function getPaymentMethodDelivery() : ?AddressModel */ public function setPaymentMethodDelivery(?AddressModel $paymentMethodDelivery) : self { + $this->initialized['paymentMethodDelivery'] = true; $this->paymentMethodDelivery = $paymentMethodDelivery; return $this; } diff --git a/src/Api/Generated/Model/OrderCommentModel.php b/src/Api/Generated/Model/OrderCommentModel.php index 13e5ecc0..7151569f 100644 --- a/src/Api/Generated/Model/OrderCommentModel.php +++ b/src/Api/Generated/Model/OrderCommentModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderCommentModel +class OrderCommentModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The comments id * @@ -46,6 +54,7 @@ public function getCommentId() : ?int */ public function setCommentId(?int $commentId) : self { + $this->initialized['commentId'] = true; $this->commentId = $commentId; return $this; } @@ -67,6 +76,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -88,6 +98,7 @@ public function getText() : ?string */ public function setText(?string $text) : self { + $this->initialized['text'] = true; $this->text = $text; return $this; } @@ -109,6 +120,7 @@ public function getFrom() : ?string */ public function setFrom(?string $from) : self { + $this->initialized['from'] = true; $this->from = $from; return $this; } diff --git a/src/Api/Generated/Model/OrderCommentModelCollection.php b/src/Api/Generated/Model/OrderCommentModelCollection.php index bf54ff4c..de8984de 100644 --- a/src/Api/Generated/Model/OrderCommentModelCollection.php +++ b/src/Api/Generated/Model/OrderCommentModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderCommentModelCollection +class OrderCommentModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of order comments * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderCommentModelItem.php b/src/Api/Generated/Model/OrderCommentModelItem.php index cdafed81..6ead12f0 100644 --- a/src/Api/Generated/Model/OrderCommentModelItem.php +++ b/src/Api/Generated/Model/OrderCommentModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderCommentModelItem +class OrderCommentModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?OrderCommentModel */ public function setData(?OrderCommentModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderExternalServiceModel.php b/src/Api/Generated/Model/OrderExternalServiceModel.php index 19930418..964d4599 100644 --- a/src/Api/Generated/Model/OrderExternalServiceModel.php +++ b/src/Api/Generated/Model/OrderExternalServiceModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderExternalServiceModel +class OrderExternalServiceModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The service name that this external id is linked to. Please note that this service name has to be unique for the order * @@ -46,6 +54,7 @@ public function getServiceName() : ?string */ public function setServiceName(?string $serviceName) : self { + $this->initialized['serviceName'] = true; $this->serviceName = $serviceName; return $this; } @@ -67,6 +76,7 @@ public function getExternalIdValue() : ?string */ public function setExternalIdValue(?string $externalIdValue) : self { + $this->initialized['externalIdValue'] = true; $this->externalIdValue = $externalIdValue; return $this; } @@ -88,6 +98,7 @@ public function getAgent() : ?string */ public function setAgent(?string $agent) : self { + $this->initialized['agent'] = true; $this->agent = $agent; return $this; } @@ -109,6 +120,7 @@ public function getReadOnly() : ?bool */ public function setReadOnly(?bool $readOnly) : self { + $this->initialized['readOnly'] = true; $this->readOnly = $readOnly; return $this; } diff --git a/src/Api/Generated/Model/OrderExternalServiceModelCollection.php b/src/Api/Generated/Model/OrderExternalServiceModelCollection.php index 77873ed3..52ac1794 100644 --- a/src/Api/Generated/Model/OrderExternalServiceModelCollection.php +++ b/src/Api/Generated/Model/OrderExternalServiceModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderExternalServiceModelCollection +class OrderExternalServiceModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of order external services * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderExternalServicesModelItem.php b/src/Api/Generated/Model/OrderExternalServicesModelItem.php index b773a6e7..d409e10b 100644 --- a/src/Api/Generated/Model/OrderExternalServicesModelItem.php +++ b/src/Api/Generated/Model/OrderExternalServicesModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderExternalServicesModelItem +class OrderExternalServicesModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?OrderExternalServiceModel */ public function setData(?OrderExternalServiceModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderItemBundledModelItem.php b/src/Api/Generated/Model/OrderItemBundledModelItem.php index 7012938d..7f3751c2 100644 --- a/src/Api/Generated/Model/OrderItemBundledModelItem.php +++ b/src/Api/Generated/Model/OrderItemBundledModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderItemBundledModelItem +class OrderItemBundledModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getBundledItems() : ?OrderItemBundledModelItemBundledItems */ public function setBundledItems(?OrderItemBundledModelItemBundledItems $bundledItems) : self { + $this->initialized['bundledItems'] = true; $this->bundledItems = $bundledItems; return $this; } diff --git a/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php index 798bfc84..8eb8be4b 100644 --- a/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php +++ b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderItemBundledModelItemBundledItems +class OrderItemBundledModelItemBundledItems extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderItemModel.php b/src/Api/Generated/Model/OrderItemModel.php index fdb13d44..2f1ea9a1 100644 --- a/src/Api/Generated/Model/OrderItemModel.php +++ b/src/Api/Generated/Model/OrderItemModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderItemModel +class OrderItemModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id of the order item * @@ -82,6 +90,7 @@ public function getItemId() : ?int */ public function setItemId(?int $itemId) : self { + $this->initialized['itemId'] = true; $this->itemId = $itemId; return $this; } @@ -103,6 +112,7 @@ public function getSku() : ?string */ public function setSku(?string $sku) : self { + $this->initialized['sku'] = true; $this->sku = $sku; return $this; } @@ -124,6 +134,7 @@ public function getDescription() : ?string */ public function setDescription(?string $description) : self { + $this->initialized['description'] = true; $this->description = $description; return $this; } @@ -145,6 +156,7 @@ public function getQuantity() : ?int */ public function setQuantity(?int $quantity) : self { + $this->initialized['quantity'] = true; $this->quantity = $quantity; return $this; } @@ -166,6 +178,7 @@ public function getUnitSymbol() : ?string */ public function setUnitSymbol(?string $unitSymbol) : self { + $this->initialized['unitSymbol'] = true; $this->unitSymbol = $unitSymbol; return $this; } @@ -187,6 +200,7 @@ public function getUnitPrice() : ?float */ public function setUnitPrice(?float $unitPrice) : self { + $this->initialized['unitPrice'] = true; $this->unitPrice = $unitPrice; return $this; } @@ -208,6 +222,7 @@ public function getVatRate() : ?float */ public function setVatRate(?float $vatRate) : self { + $this->initialized['vatRate'] = true; $this->vatRate = $vatRate; return $this; } @@ -229,6 +244,7 @@ public function getDiscount() : ?float */ public function setDiscount(?float $discount) : self { + $this->initialized['discount'] = true; $this->discount = $discount; return $this; } @@ -250,6 +266,7 @@ public function getDiscountType() : ?string */ public function setDiscountType(?string $discountType) : self { + $this->initialized['discountType'] = true; $this->discountType = $discountType; return $this; } @@ -271,6 +288,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } diff --git a/src/Api/Generated/Model/OrderItemModelCollection.php b/src/Api/Generated/Model/OrderItemModelCollection.php index d9d4dfd3..19b2a4f8 100644 --- a/src/Api/Generated/Model/OrderItemModelCollection.php +++ b/src/Api/Generated/Model/OrderItemModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderItemModelCollection +class OrderItemModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of order items * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php index 6d4cbf3d..f54ac9c4 100644 --- a/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php +++ b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderItemModelCollectionDataItem +class OrderItemModelCollectionDataItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id of the order item * @@ -88,6 +96,7 @@ public function getItemId() : ?int */ public function setItemId(?int $itemId) : self { + $this->initialized['itemId'] = true; $this->itemId = $itemId; return $this; } @@ -109,6 +118,7 @@ public function getSku() : ?string */ public function setSku(?string $sku) : self { + $this->initialized['sku'] = true; $this->sku = $sku; return $this; } @@ -130,6 +140,7 @@ public function getDescription() : ?string */ public function setDescription(?string $description) : self { + $this->initialized['description'] = true; $this->description = $description; return $this; } @@ -151,6 +162,7 @@ public function getQuantity() : ?int */ public function setQuantity(?int $quantity) : self { + $this->initialized['quantity'] = true; $this->quantity = $quantity; return $this; } @@ -172,6 +184,7 @@ public function getUnitSymbol() : ?string */ public function setUnitSymbol(?string $unitSymbol) : self { + $this->initialized['unitSymbol'] = true; $this->unitSymbol = $unitSymbol; return $this; } @@ -193,6 +206,7 @@ public function getUnitPrice() : ?float */ public function setUnitPrice(?float $unitPrice) : self { + $this->initialized['unitPrice'] = true; $this->unitPrice = $unitPrice; return $this; } @@ -214,6 +228,7 @@ public function getVatRate() : ?float */ public function setVatRate(?float $vatRate) : self { + $this->initialized['vatRate'] = true; $this->vatRate = $vatRate; return $this; } @@ -235,6 +250,7 @@ public function getDiscount() : ?float */ public function setDiscount(?float $discount) : self { + $this->initialized['discount'] = true; $this->discount = $discount; return $this; } @@ -256,6 +272,7 @@ public function getDiscountType() : ?string */ public function setDiscountType(?string $discountType) : self { + $this->initialized['discountType'] = true; $this->discountType = $discountType; return $this; } @@ -277,6 +294,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -298,6 +316,7 @@ public function getBundledItems() : ?OrderItemBundledModelItemBundledItems */ public function setBundledItems(?OrderItemBundledModelItemBundledItems $bundledItems) : self { + $this->initialized['bundledItems'] = true; $this->bundledItems = $bundledItems; return $this; } diff --git a/src/Api/Generated/Model/OrderItemModelItem.php b/src/Api/Generated/Model/OrderItemModelItem.php index 52c6451a..59e3f875 100644 --- a/src/Api/Generated/Model/OrderItemModelItem.php +++ b/src/Api/Generated/Model/OrderItemModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderItemModelItem +class OrderItemModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?OrderItemModel */ public function setData(?OrderItemModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderModel.php b/src/Api/Generated/Model/OrderModel.php index 2f0031fc..baf1c036 100644 --- a/src/Api/Generated/Model/OrderModel.php +++ b/src/Api/Generated/Model/OrderModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderModel +class OrderModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The orders ID * @@ -382,6 +390,7 @@ public function getOrderId() : ?int */ public function setOrderId(?int $orderId) : self { + $this->initialized['orderId'] = true; $this->orderId = $orderId; return $this; } @@ -403,6 +412,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -424,6 +434,7 @@ public function getPaymentMethodExternalId() : ?string */ public function setPaymentMethodExternalId(?string $paymentMethodExternalId) : self { + $this->initialized['paymentMethodExternalId'] = true; $this->paymentMethodExternalId = $paymentMethodExternalId; return $this; } @@ -445,6 +456,7 @@ public function getShippingMethodExternalId() : ?string */ public function setShippingMethodExternalId(?string $shippingMethodExternalId) : self { + $this->initialized['shippingMethodExternalId'] = true; $this->shippingMethodExternalId = $shippingMethodExternalId; return $this; } @@ -466,6 +478,7 @@ public function getBaseCurrencyCode() : ?string */ public function setBaseCurrencyCode(?string $baseCurrencyCode) : self { + $this->initialized['baseCurrencyCode'] = true; $this->baseCurrencyCode = $baseCurrencyCode; return $this; } @@ -487,6 +500,7 @@ public function getShopCountryCode() : ?string */ public function setShopCountryCode(?string $shopCountryCode) : self { + $this->initialized['shopCountryCode'] = true; $this->shopCountryCode = $shopCountryCode; return $this; } @@ -508,6 +522,7 @@ public function getTotalAmount() : ?float */ public function setTotalAmount(?float $totalAmount) : self { + $this->initialized['totalAmount'] = true; $this->totalAmount = $totalAmount; return $this; } @@ -529,6 +544,7 @@ public function getTotalVat() : ?float */ public function setTotalVat(?float $totalVat) : self { + $this->initialized['totalVat'] = true; $this->totalVat = $totalVat; return $this; } @@ -550,6 +566,7 @@ public function getAmountToPay() : ?float */ public function setAmountToPay(?float $amountToPay) : self { + $this->initialized['amountToPay'] = true; $this->amountToPay = $amountToPay; return $this; } @@ -571,6 +588,7 @@ public function getTotalAmountInBaseCurrency() : ?float */ public function setTotalAmountInBaseCurrency(?float $totalAmountInBaseCurrency) : self { + $this->initialized['totalAmountInBaseCurrency'] = true; $this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency; return $this; } @@ -592,6 +610,7 @@ public function getTotalVatInBaseCurrency() : ?float */ public function setTotalVatInBaseCurrency(?float $totalVatInBaseCurrency) : self { + $this->initialized['totalVatInBaseCurrency'] = true; $this->totalVatInBaseCurrency = $totalVatInBaseCurrency; return $this; } @@ -613,6 +632,7 @@ public function getAmountToPayInBaseCurrency() : ?float */ public function setAmountToPayInBaseCurrency(?float $amountToPayInBaseCurrency) : self { + $this->initialized['amountToPayInBaseCurrency'] = true; $this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency; return $this; } @@ -634,6 +654,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -655,6 +676,7 @@ public function getCustomerId() : ?int */ public function setCustomerId(?int $customerId) : self { + $this->initialized['customerId'] = true; $this->customerId = $customerId; return $this; } @@ -676,6 +698,7 @@ public function getStatusId() : ?int */ public function setStatusId(?int $statusId) : self { + $this->initialized['statusId'] = true; $this->statusId = $statusId; return $this; } @@ -697,6 +720,7 @@ public function getOnOrderStatusChangeSendEmail() : ?bool */ public function setOnOrderStatusChangeSendEmail(?bool $onOrderStatusChangeSendEmail) : self { + $this->initialized['onOrderStatusChangeSendEmail'] = true; $this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail; return $this; } @@ -718,6 +742,7 @@ public function getOnOrderStatusChangeProcessPayment() : ?bool */ public function setOnOrderStatusChangeProcessPayment(?bool $onOrderStatusChangeProcessPayment) : self { + $this->initialized['onOrderStatusChangeProcessPayment'] = true; $this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment; return $this; } @@ -739,6 +764,7 @@ public function getSendEmailsOnStatusChange() : ?bool */ public function setSendEmailsOnStatusChange(?bool $sendEmailsOnStatusChange) : self { + $this->initialized['sendEmailsOnStatusChange'] = true; $this->sendEmailsOnStatusChange = $sendEmailsOnStatusChange; return $this; } @@ -760,6 +786,7 @@ public function getStockLocationId() : ?int */ public function setStockLocationId(?int $stockLocationId) : self { + $this->initialized['stockLocationId'] = true; $this->stockLocationId = $stockLocationId; return $this; } @@ -781,6 +808,7 @@ public function getShippingMethodId() : ?int */ public function setShippingMethodId(?int $shippingMethodId) : self { + $this->initialized['shippingMethodId'] = true; $this->shippingMethodId = $shippingMethodId; return $this; } @@ -802,6 +830,7 @@ public function getPaymentMethodId() : ?int */ public function setPaymentMethodId(?int $paymentMethodId) : self { + $this->initialized['paymentMethodId'] = true; $this->paymentMethodId = $paymentMethodId; return $this; } @@ -823,6 +852,7 @@ public function getPaymentMethodIdCode() : ?string */ public function setPaymentMethodIdCode(?string $paymentMethodIdCode) : self { + $this->initialized['paymentMethodIdCode'] = true; $this->paymentMethodIdCode = $paymentMethodIdCode; return $this; } @@ -844,6 +874,7 @@ public function getPaymentMethodName() : ?string */ public function setPaymentMethodName(?string $paymentMethodName) : self { + $this->initialized['paymentMethodName'] = true; $this->paymentMethodName = $paymentMethodName; return $this; } @@ -865,6 +896,7 @@ public function getPaymentFee() : ?float */ public function setPaymentFee(?float $paymentFee) : self { + $this->initialized['paymentFee'] = true; $this->paymentFee = $paymentFee; return $this; } @@ -886,6 +918,7 @@ public function getPaymentVatRate() : ?float */ public function setPaymentVatRate(?float $paymentVatRate) : self { + $this->initialized['paymentVatRate'] = true; $this->paymentVatRate = $paymentVatRate; return $this; } @@ -907,6 +940,7 @@ public function getShippingMethodName() : ?string */ public function setShippingMethodName(?string $shippingMethodName) : self { + $this->initialized['shippingMethodName'] = true; $this->shippingMethodName = $shippingMethodName; return $this; } @@ -928,6 +962,7 @@ public function getShippingCost() : ?float */ public function setShippingCost(?float $shippingCost) : self { + $this->initialized['shippingCost'] = true; $this->shippingCost = $shippingCost; return $this; } @@ -949,6 +984,7 @@ public function getShippingVatRate() : ?float */ public function setShippingVatRate(?float $shippingVatRate) : self { + $this->initialized['shippingVatRate'] = true; $this->shippingVatRate = $shippingVatRate; return $this; } @@ -970,6 +1006,7 @@ public function getTotalWeight() : ?float */ public function setTotalWeight(?float $totalWeight) : self { + $this->initialized['totalWeight'] = true; $this->totalWeight = $totalWeight; return $this; } @@ -991,6 +1028,7 @@ public function getCustomInfo1() : ?string */ public function setCustomInfo1(?string $customInfo1) : self { + $this->initialized['customInfo1'] = true; $this->customInfo1 = $customInfo1; return $this; } @@ -1012,6 +1050,7 @@ public function getCustomInfo2() : ?string */ public function setCustomInfo2(?string $customInfo2) : self { + $this->initialized['customInfo2'] = true; $this->customInfo2 = $customInfo2; return $this; } @@ -1033,6 +1072,7 @@ public function getCustomInfo3() : ?string */ public function setCustomInfo3(?string $customInfo3) : self { + $this->initialized['customInfo3'] = true; $this->customInfo3 = $customInfo3; return $this; } @@ -1054,6 +1094,7 @@ public function getCustomInfo4() : ?string */ public function setCustomInfo4(?string $customInfo4) : self { + $this->initialized['customInfo4'] = true; $this->customInfo4 = $customInfo4; return $this; } @@ -1075,6 +1116,7 @@ public function getDiscountCode() : ?string */ public function setDiscountCode(?string $discountCode) : self { + $this->initialized['discountCode'] = true; $this->discountCode = $discountCode; return $this; } @@ -1096,6 +1138,7 @@ public function getAmountPaid() : ?float */ public function setAmountPaid(?float $amountPaid) : self { + $this->initialized['amountPaid'] = true; $this->amountPaid = $amountPaid; return $this; } @@ -1117,6 +1160,7 @@ public function getAmountPaidInBaseCurrency() : ?float */ public function setAmountPaidInBaseCurrency(?float $amountPaidInBaseCurrency) : self { + $this->initialized['amountPaidInBaseCurrency'] = true; $this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency; return $this; } @@ -1138,6 +1182,7 @@ public function getIsComplete() : ?bool */ public function setIsComplete(?bool $isComplete) : self { + $this->initialized['isComplete'] = true; $this->isComplete = $isComplete; return $this; } @@ -1159,6 +1204,7 @@ public function getCurrencyCode() : ?string */ public function setCurrencyCode(?string $currencyCode) : self { + $this->initialized['currencyCode'] = true; $this->currencyCode = $currencyCode; return $this; } @@ -1180,6 +1226,7 @@ public function getCurrencyExchangeRate() : ?float */ public function setCurrencyExchangeRate(?float $currencyExchangeRate) : self { + $this->initialized['currencyExchangeRate'] = true; $this->currencyExchangeRate = $currencyExchangeRate; return $this; } @@ -1201,6 +1248,7 @@ public function getCurrencyPrecision() : ?int */ public function setCurrencyPrecision(?int $currencyPrecision) : self { + $this->initialized['currencyPrecision'] = true; $this->currencyPrecision = $currencyPrecision; return $this; } @@ -1222,6 +1270,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -1243,6 +1292,7 @@ public function getPaymentReference() : ?string */ public function setPaymentReference(?string $paymentReference) : self { + $this->initialized['paymentReference'] = true; $this->paymentReference = $paymentReference; return $this; } @@ -1264,6 +1314,7 @@ public function getPaymentStatus() : ?string */ public function setPaymentStatus(?string $paymentStatus) : self { + $this->initialized['paymentStatus'] = true; $this->paymentStatus = $paymentStatus; return $this; } @@ -1285,6 +1336,7 @@ public function getIsRead() : ?bool */ public function setIsRead(?bool $isRead) : self { + $this->initialized['isRead'] = true; $this->isRead = $isRead; return $this; } @@ -1306,6 +1358,7 @@ public function getHasComments() : ?bool */ public function setHasComments(?bool $hasComments) : self { + $this->initialized['hasComments'] = true; $this->hasComments = $hasComments; return $this; } @@ -1327,6 +1380,7 @@ public function getInternalComment() : ?string */ public function setInternalComment(?string $internalComment) : self { + $this->initialized['internalComment'] = true; $this->internalComment = $internalComment; return $this; } @@ -1348,6 +1402,7 @@ public function getShippingTrackerType() : ?int */ public function setShippingTrackerType(?int $shippingTrackerType) : self { + $this->initialized['shippingTrackerType'] = true; $this->shippingTrackerType = $shippingTrackerType; return $this; } @@ -1369,6 +1424,7 @@ public function getShippingTrackingNo() : ?string */ public function setShippingTrackingNo(?string $shippingTrackingNo) : self { + $this->initialized['shippingTrackingNo'] = true; $this->shippingTrackingNo = $shippingTrackingNo; return $this; } @@ -1390,6 +1446,7 @@ public function getOriginalCustomerEmail() : ?string */ public function setOriginalCustomerEmail(?string $originalCustomerEmail) : self { + $this->initialized['originalCustomerEmail'] = true; $this->originalCustomerEmail = $originalCustomerEmail; return $this; } @@ -1411,6 +1468,7 @@ public function getOriginalCustomerNationalIdNo() : ?string */ public function setOriginalCustomerNationalIdNo(?string $originalCustomerNationalIdNo) : self { + $this->initialized['originalCustomerNationalIdNo'] = true; $this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo; return $this; } @@ -1432,6 +1490,7 @@ public function getOriginalCustomerVatNo() : ?string */ public function setOriginalCustomerVatNo(?string $originalCustomerVatNo) : self { + $this->initialized['originalCustomerVatNo'] = true; $this->originalCustomerVatNo = $originalCustomerVatNo; return $this; } @@ -1453,6 +1512,7 @@ public function getOriginalCustomerCustomInfo1() : ?string */ public function setOriginalCustomerCustomInfo1(?string $originalCustomerCustomInfo1) : self { + $this->initialized['originalCustomerCustomInfo1'] = true; $this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1; return $this; } @@ -1474,6 +1534,7 @@ public function getOriginalCustomerCustomInfo2() : ?string */ public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomInfo2) : self { + $this->initialized['originalCustomerCustomInfo2'] = true; $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; } @@ -1495,6 +1556,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -1516,6 +1578,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -1537,6 +1600,7 @@ public function getItems() : ?OrderItemModelCollection */ public function setItems(?OrderItemModelCollection $items) : self { + $this->initialized['items'] = true; $this->items = $items; return $this; } @@ -1558,6 +1622,7 @@ public function getAddresses() : ?OrderAddressCollection */ public function setAddresses(?OrderAddressCollection $addresses) : self { + $this->initialized['addresses'] = true; $this->addresses = $addresses; return $this; } @@ -1579,6 +1644,7 @@ public function getExternalServices() : ?OrderExternalServiceModelCollection */ public function setExternalServices(?OrderExternalServiceModelCollection $externalServices) : self { + $this->initialized['externalServices'] = true; $this->externalServices = $externalServices; return $this; } @@ -1600,6 +1666,7 @@ public function getCustomer() : ?CustomerModelItem */ public function setCustomer(?CustomerModelItem $customer) : self { + $this->initialized['customer'] = true; $this->customer = $customer; return $this; } @@ -1621,6 +1688,7 @@ public function getStatus() : ?OrderStatusModelItem */ public function setStatus(?OrderStatusModelItem $status) : self { + $this->initialized['status'] = true; $this->status = $status; return $this; } diff --git a/src/Api/Generated/Model/OrderModelCollection.php b/src/Api/Generated/Model/OrderModelCollection.php index c85f5c0d..af31551d 100644 --- a/src/Api/Generated/Model/OrderModelCollection.php +++ b/src/Api/Generated/Model/OrderModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderModelCollection +class OrderModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of orders * @@ -34,6 +42,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } @@ -55,6 +64,7 @@ public function getMeta() : ?OrderModelCollectionMeta */ public function setMeta(?OrderModelCollectionMeta $meta) : self { + $this->initialized['meta'] = true; $this->meta = $meta; return $this; } diff --git a/src/Api/Generated/Model/OrderModelCollectionMeta.php b/src/Api/Generated/Model/OrderModelCollectionMeta.php index 8936f9b8..649afdcb 100644 --- a/src/Api/Generated/Model/OrderModelCollectionMeta.php +++ b/src/Api/Generated/Model/OrderModelCollectionMeta.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderModelCollectionMeta +class OrderModelCollectionMeta extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getPagination() : ?PaginationModel */ public function setPagination(?PaginationModel $pagination) : self { + $this->initialized['pagination'] = true; $this->pagination = $pagination; return $this; } diff --git a/src/Api/Generated/Model/OrderModelItem.php b/src/Api/Generated/Model/OrderModelItem.php index 4e606dd8..c3275d83 100644 --- a/src/Api/Generated/Model/OrderModelItem.php +++ b/src/Api/Generated/Model/OrderModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderModelItem +class OrderModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?OrderModel */ public function setData(?OrderModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderPutModel.php b/src/Api/Generated/Model/OrderPutModel.php index f127386e..5e802feb 100644 --- a/src/Api/Generated/Model/OrderPutModel.php +++ b/src/Api/Generated/Model/OrderPutModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderPutModel +class OrderPutModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The orders ID * @@ -328,6 +336,7 @@ public function getOrderId() : ?int */ public function setOrderId(?int $orderId) : self { + $this->initialized['orderId'] = true; $this->orderId = $orderId; return $this; } @@ -349,6 +358,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -370,6 +380,7 @@ public function getBaseCurrencyCode() : ?string */ public function setBaseCurrencyCode(?string $baseCurrencyCode) : self { + $this->initialized['baseCurrencyCode'] = true; $this->baseCurrencyCode = $baseCurrencyCode; return $this; } @@ -391,6 +402,7 @@ public function getShopCountryCode() : ?string */ public function setShopCountryCode(?string $shopCountryCode) : self { + $this->initialized['shopCountryCode'] = true; $this->shopCountryCode = $shopCountryCode; return $this; } @@ -412,6 +424,7 @@ public function getTotalAmount() : ?float */ public function setTotalAmount(?float $totalAmount) : self { + $this->initialized['totalAmount'] = true; $this->totalAmount = $totalAmount; return $this; } @@ -433,6 +446,7 @@ public function getTotalVat() : ?float */ public function setTotalVat(?float $totalVat) : self { + $this->initialized['totalVat'] = true; $this->totalVat = $totalVat; return $this; } @@ -454,6 +468,7 @@ public function getAmountToPay() : ?float */ public function setAmountToPay(?float $amountToPay) : self { + $this->initialized['amountToPay'] = true; $this->amountToPay = $amountToPay; return $this; } @@ -475,6 +490,7 @@ public function getTotalAmountInBaseCurrency() : ?float */ public function setTotalAmountInBaseCurrency(?float $totalAmountInBaseCurrency) : self { + $this->initialized['totalAmountInBaseCurrency'] = true; $this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency; return $this; } @@ -496,6 +512,7 @@ public function getTotalVatInBaseCurrency() : ?float */ public function setTotalVatInBaseCurrency(?float $totalVatInBaseCurrency) : self { + $this->initialized['totalVatInBaseCurrency'] = true; $this->totalVatInBaseCurrency = $totalVatInBaseCurrency; return $this; } @@ -517,6 +534,7 @@ public function getAmountToPayInBaseCurrency() : ?float */ public function setAmountToPayInBaseCurrency(?float $amountToPayInBaseCurrency) : self { + $this->initialized['amountToPayInBaseCurrency'] = true; $this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency; return $this; } @@ -538,6 +556,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -559,6 +578,7 @@ public function getCustomerId() : ?int */ public function setCustomerId(?int $customerId) : self { + $this->initialized['customerId'] = true; $this->customerId = $customerId; return $this; } @@ -580,6 +600,7 @@ public function getStatusId() : ?int */ public function setStatusId(?int $statusId) : self { + $this->initialized['statusId'] = true; $this->statusId = $statusId; return $this; } @@ -601,6 +622,7 @@ public function getOnOrderStatusChangeSendEmail() : ?bool */ public function setOnOrderStatusChangeSendEmail(?bool $onOrderStatusChangeSendEmail) : self { + $this->initialized['onOrderStatusChangeSendEmail'] = true; $this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail; return $this; } @@ -622,6 +644,7 @@ public function getOnOrderStatusChangeProcessPayment() : ?bool */ public function setOnOrderStatusChangeProcessPayment(?bool $onOrderStatusChangeProcessPayment) : self { + $this->initialized['onOrderStatusChangeProcessPayment'] = true; $this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment; return $this; } @@ -643,6 +666,7 @@ public function getShippingMethodId() : ?int */ public function setShippingMethodId(?int $shippingMethodId) : self { + $this->initialized['shippingMethodId'] = true; $this->shippingMethodId = $shippingMethodId; return $this; } @@ -664,6 +688,7 @@ public function getPaymentMethodId() : ?int */ public function setPaymentMethodId(?int $paymentMethodId) : self { + $this->initialized['paymentMethodId'] = true; $this->paymentMethodId = $paymentMethodId; return $this; } @@ -685,6 +710,7 @@ public function getPaymentMethodIdCode() : ?string */ public function setPaymentMethodIdCode(?string $paymentMethodIdCode) : self { + $this->initialized['paymentMethodIdCode'] = true; $this->paymentMethodIdCode = $paymentMethodIdCode; return $this; } @@ -706,6 +732,7 @@ public function getPaymentMethodName() : ?string */ public function setPaymentMethodName(?string $paymentMethodName) : self { + $this->initialized['paymentMethodName'] = true; $this->paymentMethodName = $paymentMethodName; return $this; } @@ -727,6 +754,7 @@ public function getPaymentFee() : ?float */ public function setPaymentFee(?float $paymentFee) : self { + $this->initialized['paymentFee'] = true; $this->paymentFee = $paymentFee; return $this; } @@ -748,6 +776,7 @@ public function getPaymentVatRate() : ?float */ public function setPaymentVatRate(?float $paymentVatRate) : self { + $this->initialized['paymentVatRate'] = true; $this->paymentVatRate = $paymentVatRate; return $this; } @@ -769,6 +798,7 @@ public function getShippingMethodName() : ?string */ public function setShippingMethodName(?string $shippingMethodName) : self { + $this->initialized['shippingMethodName'] = true; $this->shippingMethodName = $shippingMethodName; return $this; } @@ -790,6 +820,7 @@ public function getShippingCost() : ?float */ public function setShippingCost(?float $shippingCost) : self { + $this->initialized['shippingCost'] = true; $this->shippingCost = $shippingCost; return $this; } @@ -811,6 +842,7 @@ public function getShippingVatRate() : ?float */ public function setShippingVatRate(?float $shippingVatRate) : self { + $this->initialized['shippingVatRate'] = true; $this->shippingVatRate = $shippingVatRate; return $this; } @@ -832,6 +864,7 @@ public function getTotalWeight() : ?float */ public function setTotalWeight(?float $totalWeight) : self { + $this->initialized['totalWeight'] = true; $this->totalWeight = $totalWeight; return $this; } @@ -853,6 +886,7 @@ public function getCustomInfo1() : ?string */ public function setCustomInfo1(?string $customInfo1) : self { + $this->initialized['customInfo1'] = true; $this->customInfo1 = $customInfo1; return $this; } @@ -874,6 +908,7 @@ public function getCustomInfo2() : ?string */ public function setCustomInfo2(?string $customInfo2) : self { + $this->initialized['customInfo2'] = true; $this->customInfo2 = $customInfo2; return $this; } @@ -895,6 +930,7 @@ public function getCustomInfo3() : ?string */ public function setCustomInfo3(?string $customInfo3) : self { + $this->initialized['customInfo3'] = true; $this->customInfo3 = $customInfo3; return $this; } @@ -916,6 +952,7 @@ public function getCustomInfo4() : ?string */ public function setCustomInfo4(?string $customInfo4) : self { + $this->initialized['customInfo4'] = true; $this->customInfo4 = $customInfo4; return $this; } @@ -937,6 +974,7 @@ public function getDiscountCode() : ?string */ public function setDiscountCode(?string $discountCode) : self { + $this->initialized['discountCode'] = true; $this->discountCode = $discountCode; return $this; } @@ -958,6 +996,7 @@ public function getAmountPaid() : ?float */ public function setAmountPaid(?float $amountPaid) : self { + $this->initialized['amountPaid'] = true; $this->amountPaid = $amountPaid; return $this; } @@ -979,6 +1018,7 @@ public function getAmountPaidInBaseCurrency() : ?float */ public function setAmountPaidInBaseCurrency(?float $amountPaidInBaseCurrency) : self { + $this->initialized['amountPaidInBaseCurrency'] = true; $this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency; return $this; } @@ -1000,6 +1040,7 @@ public function getIsComplete() : ?bool */ public function setIsComplete(?bool $isComplete) : self { + $this->initialized['isComplete'] = true; $this->isComplete = $isComplete; return $this; } @@ -1021,6 +1062,7 @@ public function getCurrencyCode() : ?string */ public function setCurrencyCode(?string $currencyCode) : self { + $this->initialized['currencyCode'] = true; $this->currencyCode = $currencyCode; return $this; } @@ -1042,6 +1084,7 @@ public function getCurrencyExchangeRate() : ?float */ public function setCurrencyExchangeRate(?float $currencyExchangeRate) : self { + $this->initialized['currencyExchangeRate'] = true; $this->currencyExchangeRate = $currencyExchangeRate; return $this; } @@ -1063,6 +1106,7 @@ public function getCurrencyPrecision() : ?int */ public function setCurrencyPrecision(?int $currencyPrecision) : self { + $this->initialized['currencyPrecision'] = true; $this->currencyPrecision = $currencyPrecision; return $this; } @@ -1084,6 +1128,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -1105,6 +1150,7 @@ public function getPaymentReference() : ?string */ public function setPaymentReference(?string $paymentReference) : self { + $this->initialized['paymentReference'] = true; $this->paymentReference = $paymentReference; return $this; } @@ -1126,6 +1172,7 @@ public function getPaymentStatus() : ?string */ public function setPaymentStatus(?string $paymentStatus) : self { + $this->initialized['paymentStatus'] = true; $this->paymentStatus = $paymentStatus; return $this; } @@ -1147,6 +1194,7 @@ public function getIsRead() : ?bool */ public function setIsRead(?bool $isRead) : self { + $this->initialized['isRead'] = true; $this->isRead = $isRead; return $this; } @@ -1168,6 +1216,7 @@ public function getHasComment() : ?bool */ public function setHasComment(?bool $hasComment) : self { + $this->initialized['hasComment'] = true; $this->hasComment = $hasComment; return $this; } @@ -1189,6 +1238,7 @@ public function getInternalComment() : ?string */ public function setInternalComment(?string $internalComment) : self { + $this->initialized['internalComment'] = true; $this->internalComment = $internalComment; return $this; } @@ -1210,6 +1260,7 @@ public function getShippingTrackerType() : ?int */ public function setShippingTrackerType(?int $shippingTrackerType) : self { + $this->initialized['shippingTrackerType'] = true; $this->shippingTrackerType = $shippingTrackerType; return $this; } @@ -1231,6 +1282,7 @@ public function getShippingTrackingNo() : ?string */ public function setShippingTrackingNo(?string $shippingTrackingNo) : self { + $this->initialized['shippingTrackingNo'] = true; $this->shippingTrackingNo = $shippingTrackingNo; return $this; } @@ -1252,6 +1304,7 @@ public function getOriginalCustomerEmail() : ?string */ public function setOriginalCustomerEmail(?string $originalCustomerEmail) : self { + $this->initialized['originalCustomerEmail'] = true; $this->originalCustomerEmail = $originalCustomerEmail; return $this; } @@ -1273,6 +1326,7 @@ public function getOriginalCustomerNationalIdNo() : ?string */ public function setOriginalCustomerNationalIdNo(?string $originalCustomerNationalIdNo) : self { + $this->initialized['originalCustomerNationalIdNo'] = true; $this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo; return $this; } @@ -1294,6 +1348,7 @@ public function getOriginalCustomerVatNo() : ?string */ public function setOriginalCustomerVatNo(?string $originalCustomerVatNo) : self { + $this->initialized['originalCustomerVatNo'] = true; $this->originalCustomerVatNo = $originalCustomerVatNo; return $this; } @@ -1315,6 +1370,7 @@ public function getOriginalCustomerCustomInfo1() : ?string */ public function setOriginalCustomerCustomInfo1(?string $originalCustomerCustomInfo1) : self { + $this->initialized['originalCustomerCustomInfo1'] = true; $this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1; return $this; } @@ -1336,6 +1392,7 @@ public function getOriginalCustomerCustomInfo2() : ?string */ public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomInfo2) : self { + $this->initialized['originalCustomerCustomInfo2'] = true; $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; } @@ -1357,6 +1414,7 @@ public function getItems() : ?array */ public function setItems(?array $items) : self { + $this->initialized['items'] = true; $this->items = $items; return $this; } @@ -1378,6 +1436,7 @@ public function getAddresses() : ?OrderAddressModel */ public function setAddresses(?OrderAddressModel $addresses) : self { + $this->initialized['addresses'] = true; $this->addresses = $addresses; return $this; } diff --git a/src/Api/Generated/Model/OrderStatusLanguageModel.php b/src/Api/Generated/Model/OrderStatusLanguageModel.php index e744c29b..2f400a73 100644 --- a/src/Api/Generated/Model/OrderStatusLanguageModel.php +++ b/src/Api/Generated/Model/OrderStatusLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderStatusLanguageModel +class OrderStatusLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php index 040ee8b8..28c2b7d6 100644 --- a/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php +++ b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderStatusLanguageModelCollection +class OrderStatusLanguageModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderStatusModel.php b/src/Api/Generated/Model/OrderStatusModel.php index 06e0689f..5abd9da9 100644 --- a/src/Api/Generated/Model/OrderStatusModel.php +++ b/src/Api/Generated/Model/OrderStatusModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderStatusModel +class OrderStatusModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id of the order status * @@ -46,6 +54,7 @@ public function getStatusId() : ?int */ public function setStatusId(?int $statusId) : self { + $this->initialized['statusId'] = true; $this->statusId = $statusId; return $this; } @@ -67,6 +76,7 @@ public function getShouldSendEmail() : ?bool */ public function setShouldSendEmail(?bool $shouldSendEmail) : self { + $this->initialized['shouldSendEmail'] = true; $this->shouldSendEmail = $shouldSendEmail; return $this; } @@ -88,6 +98,7 @@ public function getIdCode() : ?string */ public function setIdCode(?string $idCode) : self { + $this->initialized['idCode'] = true; $this->idCode = $idCode; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?OrderStatusLanguageModelCollection */ public function setLanguages(?OrderStatusLanguageModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/OrderStatusModelCollection.php b/src/Api/Generated/Model/OrderStatusModelCollection.php index ed82a041..380f58a5 100644 --- a/src/Api/Generated/Model/OrderStatusModelCollection.php +++ b/src/Api/Generated/Model/OrderStatusModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderStatusModelCollection +class OrderStatusModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of order statuses * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderStatusModelItem.php b/src/Api/Generated/Model/OrderStatusModelItem.php index 36184697..091c1dee 100644 --- a/src/Api/Generated/Model/OrderStatusModelItem.php +++ b/src/Api/Generated/Model/OrderStatusModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderStatusModelItem +class OrderStatusModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?OrderStatusModel */ public function setData(?OrderStatusModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/OrderUpdateModel.php b/src/Api/Generated/Model/OrderUpdateModel.php index e1564874..8aa09866 100644 --- a/src/Api/Generated/Model/OrderUpdateModel.php +++ b/src/Api/Generated/Model/OrderUpdateModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class OrderUpdateModel +class OrderUpdateModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The orders ID * @@ -340,6 +348,7 @@ public function getOrderId() : ?int */ public function setOrderId(?int $orderId) : self { + $this->initialized['orderId'] = true; $this->orderId = $orderId; return $this; } @@ -361,6 +370,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -382,6 +392,7 @@ public function getBaseCurrencyCode() : ?string */ public function setBaseCurrencyCode(?string $baseCurrencyCode) : self { + $this->initialized['baseCurrencyCode'] = true; $this->baseCurrencyCode = $baseCurrencyCode; return $this; } @@ -403,6 +414,7 @@ public function getShopCountryCode() : ?string */ public function setShopCountryCode(?string $shopCountryCode) : self { + $this->initialized['shopCountryCode'] = true; $this->shopCountryCode = $shopCountryCode; return $this; } @@ -424,6 +436,7 @@ public function getTotalAmount() : ?float */ public function setTotalAmount(?float $totalAmount) : self { + $this->initialized['totalAmount'] = true; $this->totalAmount = $totalAmount; return $this; } @@ -445,6 +458,7 @@ public function getTotalVat() : ?float */ public function setTotalVat(?float $totalVat) : self { + $this->initialized['totalVat'] = true; $this->totalVat = $totalVat; return $this; } @@ -466,6 +480,7 @@ public function getAmountToPay() : ?float */ public function setAmountToPay(?float $amountToPay) : self { + $this->initialized['amountToPay'] = true; $this->amountToPay = $amountToPay; return $this; } @@ -487,6 +502,7 @@ public function getTotalAmountInBaseCurrency() : ?float */ public function setTotalAmountInBaseCurrency(?float $totalAmountInBaseCurrency) : self { + $this->initialized['totalAmountInBaseCurrency'] = true; $this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency; return $this; } @@ -508,6 +524,7 @@ public function getTotalVatInBaseCurrency() : ?float */ public function setTotalVatInBaseCurrency(?float $totalVatInBaseCurrency) : self { + $this->initialized['totalVatInBaseCurrency'] = true; $this->totalVatInBaseCurrency = $totalVatInBaseCurrency; return $this; } @@ -529,6 +546,7 @@ public function getAmountToPayInBaseCurrency() : ?float */ public function setAmountToPayInBaseCurrency(?float $amountToPayInBaseCurrency) : self { + $this->initialized['amountToPayInBaseCurrency'] = true; $this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency; return $this; } @@ -550,6 +568,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -571,6 +590,7 @@ public function getCustomerId() : ?int */ public function setCustomerId(?int $customerId) : self { + $this->initialized['customerId'] = true; $this->customerId = $customerId; return $this; } @@ -592,6 +612,7 @@ public function getStatusId() : ?int */ public function setStatusId(?int $statusId) : self { + $this->initialized['statusId'] = true; $this->statusId = $statusId; return $this; } @@ -613,6 +634,7 @@ public function getOnOrderStatusChangeSendEmail() : ?bool */ public function setOnOrderStatusChangeSendEmail(?bool $onOrderStatusChangeSendEmail) : self { + $this->initialized['onOrderStatusChangeSendEmail'] = true; $this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail; return $this; } @@ -634,6 +656,7 @@ public function getOnOrderStatusChangeProcessPayment() : ?bool */ public function setOnOrderStatusChangeProcessPayment(?bool $onOrderStatusChangeProcessPayment) : self { + $this->initialized['onOrderStatusChangeProcessPayment'] = true; $this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment; return $this; } @@ -655,6 +678,7 @@ public function getShippingMethodId() : ?int */ public function setShippingMethodId(?int $shippingMethodId) : self { + $this->initialized['shippingMethodId'] = true; $this->shippingMethodId = $shippingMethodId; return $this; } @@ -676,6 +700,7 @@ public function getPaymentMethodId() : ?int */ public function setPaymentMethodId(?int $paymentMethodId) : self { + $this->initialized['paymentMethodId'] = true; $this->paymentMethodId = $paymentMethodId; return $this; } @@ -697,6 +722,7 @@ public function getPaymentMethodIdCode() : ?string */ public function setPaymentMethodIdCode(?string $paymentMethodIdCode) : self { + $this->initialized['paymentMethodIdCode'] = true; $this->paymentMethodIdCode = $paymentMethodIdCode; return $this; } @@ -718,6 +744,7 @@ public function getPaymentMethodName() : ?string */ public function setPaymentMethodName(?string $paymentMethodName) : self { + $this->initialized['paymentMethodName'] = true; $this->paymentMethodName = $paymentMethodName; return $this; } @@ -739,6 +766,7 @@ public function getPaymentFee() : ?float */ public function setPaymentFee(?float $paymentFee) : self { + $this->initialized['paymentFee'] = true; $this->paymentFee = $paymentFee; return $this; } @@ -760,6 +788,7 @@ public function getPaymentVatRate() : ?float */ public function setPaymentVatRate(?float $paymentVatRate) : self { + $this->initialized['paymentVatRate'] = true; $this->paymentVatRate = $paymentVatRate; return $this; } @@ -781,6 +810,7 @@ public function getShippingMethodName() : ?string */ public function setShippingMethodName(?string $shippingMethodName) : self { + $this->initialized['shippingMethodName'] = true; $this->shippingMethodName = $shippingMethodName; return $this; } @@ -802,6 +832,7 @@ public function getShippingCost() : ?float */ public function setShippingCost(?float $shippingCost) : self { + $this->initialized['shippingCost'] = true; $this->shippingCost = $shippingCost; return $this; } @@ -823,6 +854,7 @@ public function getShippingVatRate() : ?float */ public function setShippingVatRate(?float $shippingVatRate) : self { + $this->initialized['shippingVatRate'] = true; $this->shippingVatRate = $shippingVatRate; return $this; } @@ -844,6 +876,7 @@ public function getTotalWeight() : ?float */ public function setTotalWeight(?float $totalWeight) : self { + $this->initialized['totalWeight'] = true; $this->totalWeight = $totalWeight; return $this; } @@ -865,6 +898,7 @@ public function getCustomInfo1() : ?string */ public function setCustomInfo1(?string $customInfo1) : self { + $this->initialized['customInfo1'] = true; $this->customInfo1 = $customInfo1; return $this; } @@ -886,6 +920,7 @@ public function getCustomInfo2() : ?string */ public function setCustomInfo2(?string $customInfo2) : self { + $this->initialized['customInfo2'] = true; $this->customInfo2 = $customInfo2; return $this; } @@ -907,6 +942,7 @@ public function getCustomInfo3() : ?string */ public function setCustomInfo3(?string $customInfo3) : self { + $this->initialized['customInfo3'] = true; $this->customInfo3 = $customInfo3; return $this; } @@ -928,6 +964,7 @@ public function getCustomInfo4() : ?string */ public function setCustomInfo4(?string $customInfo4) : self { + $this->initialized['customInfo4'] = true; $this->customInfo4 = $customInfo4; return $this; } @@ -949,6 +986,7 @@ public function getDiscountCode() : ?string */ public function setDiscountCode(?string $discountCode) : self { + $this->initialized['discountCode'] = true; $this->discountCode = $discountCode; return $this; } @@ -970,6 +1008,7 @@ public function getAmountPaid() : ?float */ public function setAmountPaid(?float $amountPaid) : self { + $this->initialized['amountPaid'] = true; $this->amountPaid = $amountPaid; return $this; } @@ -991,6 +1030,7 @@ public function getAmountPaidInBaseCurrency() : ?float */ public function setAmountPaidInBaseCurrency(?float $amountPaidInBaseCurrency) : self { + $this->initialized['amountPaidInBaseCurrency'] = true; $this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency; return $this; } @@ -1012,6 +1052,7 @@ public function getIsComplete() : ?bool */ public function setIsComplete(?bool $isComplete) : self { + $this->initialized['isComplete'] = true; $this->isComplete = $isComplete; return $this; } @@ -1033,6 +1074,7 @@ public function getCurrencyCode() : ?string */ public function setCurrencyCode(?string $currencyCode) : self { + $this->initialized['currencyCode'] = true; $this->currencyCode = $currencyCode; return $this; } @@ -1054,6 +1096,7 @@ public function getCurrencyExchangeRate() : ?float */ public function setCurrencyExchangeRate(?float $currencyExchangeRate) : self { + $this->initialized['currencyExchangeRate'] = true; $this->currencyExchangeRate = $currencyExchangeRate; return $this; } @@ -1075,6 +1118,7 @@ public function getCurrencyPrecision() : ?int */ public function setCurrencyPrecision(?int $currencyPrecision) : self { + $this->initialized['currencyPrecision'] = true; $this->currencyPrecision = $currencyPrecision; return $this; } @@ -1096,6 +1140,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -1117,6 +1162,7 @@ public function getPaymentReference() : ?string */ public function setPaymentReference(?string $paymentReference) : self { + $this->initialized['paymentReference'] = true; $this->paymentReference = $paymentReference; return $this; } @@ -1138,6 +1184,7 @@ public function getPaymentStatus() : ?string */ public function setPaymentStatus(?string $paymentStatus) : self { + $this->initialized['paymentStatus'] = true; $this->paymentStatus = $paymentStatus; return $this; } @@ -1159,6 +1206,7 @@ public function getIsRead() : ?bool */ public function setIsRead(?bool $isRead) : self { + $this->initialized['isRead'] = true; $this->isRead = $isRead; return $this; } @@ -1180,6 +1228,7 @@ public function getHasComment() : ?bool */ public function setHasComment(?bool $hasComment) : self { + $this->initialized['hasComment'] = true; $this->hasComment = $hasComment; return $this; } @@ -1201,6 +1250,7 @@ public function getInternalComment() : ?string */ public function setInternalComment(?string $internalComment) : self { + $this->initialized['internalComment'] = true; $this->internalComment = $internalComment; return $this; } @@ -1222,6 +1272,7 @@ public function getShippingTrackerType() : ?int */ public function setShippingTrackerType(?int $shippingTrackerType) : self { + $this->initialized['shippingTrackerType'] = true; $this->shippingTrackerType = $shippingTrackerType; return $this; } @@ -1243,6 +1294,7 @@ public function getShippingTrackingNo() : ?string */ public function setShippingTrackingNo(?string $shippingTrackingNo) : self { + $this->initialized['shippingTrackingNo'] = true; $this->shippingTrackingNo = $shippingTrackingNo; return $this; } @@ -1264,6 +1316,7 @@ public function getOriginalCustomerEmail() : ?string */ public function setOriginalCustomerEmail(?string $originalCustomerEmail) : self { + $this->initialized['originalCustomerEmail'] = true; $this->originalCustomerEmail = $originalCustomerEmail; return $this; } @@ -1285,6 +1338,7 @@ public function getOriginalCustomerNationalIdNo() : ?string */ public function setOriginalCustomerNationalIdNo(?string $originalCustomerNationalIdNo) : self { + $this->initialized['originalCustomerNationalIdNo'] = true; $this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo; return $this; } @@ -1306,6 +1360,7 @@ public function getOriginalCustomerVatNo() : ?string */ public function setOriginalCustomerVatNo(?string $originalCustomerVatNo) : self { + $this->initialized['originalCustomerVatNo'] = true; $this->originalCustomerVatNo = $originalCustomerVatNo; return $this; } @@ -1327,6 +1382,7 @@ public function getOriginalCustomerCustomInfo1() : ?string */ public function setOriginalCustomerCustomInfo1(?string $originalCustomerCustomInfo1) : self { + $this->initialized['originalCustomerCustomInfo1'] = true; $this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1; return $this; } @@ -1348,6 +1404,7 @@ public function getOriginalCustomerCustomInfo2() : ?string */ public function setOriginalCustomerCustomInfo2(?string $originalCustomerCustomInfo2) : self { + $this->initialized['originalCustomerCustomInfo2'] = true; $this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2; return $this; } @@ -1369,6 +1426,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -1390,6 +1448,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -1411,6 +1470,7 @@ public function getItems() : ?array */ public function setItems(?array $items) : self { + $this->initialized['items'] = true; $this->items = $items; return $this; } @@ -1432,6 +1492,7 @@ public function getAddresses() : ?OrderAddressModel */ public function setAddresses(?OrderAddressModel $addresses) : self { + $this->initialized['addresses'] = true; $this->addresses = $addresses; return $this; } diff --git a/src/Api/Generated/Model/PaginationModel.php b/src/Api/Generated/Model/PaginationModel.php index 87b68c2a..3c12461b 100644 --- a/src/Api/Generated/Model/PaginationModel.php +++ b/src/Api/Generated/Model/PaginationModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PaginationModel +class PaginationModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The current requested page * @@ -52,6 +60,7 @@ public function getCurrentPage() : ?int */ public function setCurrentPage(?int $currentPage) : self { + $this->initialized['currentPage'] = true; $this->currentPage = $currentPage; return $this; } @@ -73,6 +82,7 @@ public function getPerPage() : ?int */ public function setPerPage(?int $perPage) : self { + $this->initialized['perPage'] = true; $this->perPage = $perPage; return $this; } @@ -94,6 +104,7 @@ public function getTotal() : ?int */ public function setTotal(?int $total) : self { + $this->initialized['total'] = true; $this->total = $total; return $this; } @@ -115,6 +126,7 @@ public function getCount() : ?int */ public function setCount(?int $count) : self { + $this->initialized['count'] = true; $this->count = $count; return $this; } @@ -136,6 +148,7 @@ public function getTotalPages() : ?int */ public function setTotalPages(?int $totalPages) : self { + $this->initialized['totalPages'] = true; $this->totalPages = $totalPages; return $this; } diff --git a/src/Api/Generated/Model/PaymentMethodLanguageModel.php b/src/Api/Generated/Model/PaymentMethodLanguageModel.php index 5351c545..43ef2405 100644 --- a/src/Api/Generated/Model/PaymentMethodLanguageModel.php +++ b/src/Api/Generated/Model/PaymentMethodLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PaymentMethodLanguageModel +class PaymentMethodLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language code * @@ -46,6 +54,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -67,6 +76,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -88,6 +98,7 @@ public function getTitle() : ?string */ public function setTitle(?string $title) : self { + $this->initialized['title'] = true; $this->title = $title; return $this; } @@ -109,6 +120,7 @@ public function getShortDescription() : ?string */ public function setShortDescription(?string $shortDescription) : self { + $this->initialized['shortDescription'] = true; $this->shortDescription = $shortDescription; return $this; } diff --git a/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php b/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php index d33bdc89..d3b6fb00 100644 --- a/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php +++ b/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PaymentMethodLanguageModelCollection +class PaymentMethodLanguageModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of payment method languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/PaymentMethodModel.php b/src/Api/Generated/Model/PaymentMethodModel.php index 70363de5..843dd8d4 100644 --- a/src/Api/Generated/Model/PaymentMethodModel.php +++ b/src/Api/Generated/Model/PaymentMethodModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PaymentMethodModel +class PaymentMethodModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The payment methods Id * @@ -112,6 +120,7 @@ public function getPaymentMethodId() : ?int */ public function setPaymentMethodId(?int $paymentMethodId) : self { + $this->initialized['paymentMethodId'] = true; $this->paymentMethodId = $paymentMethodId; return $this; } @@ -133,6 +142,7 @@ public function getIdCode() : ?string */ public function setIdCode(?string $idCode) : self { + $this->initialized['idCode'] = true; $this->idCode = $idCode; return $this; } @@ -154,6 +164,7 @@ public function getActive() : ?bool */ public function setActive(?bool $active) : self { + $this->initialized['active'] = true; $this->active = $active; return $this; } @@ -175,6 +186,7 @@ public function getFee() : ?float */ public function setFee(?float $fee) : self { + $this->initialized['fee'] = true; $this->fee = $fee; return $this; } @@ -196,6 +208,7 @@ public function getValidForCountries() : ?string */ public function setValidForCountries(?string $validForCountries) : self { + $this->initialized['validForCountries'] = true; $this->validForCountries = $validForCountries; return $this; } @@ -217,6 +230,7 @@ public function getValidCountriesSelected() : ?array */ public function setValidCountriesSelected(?array $validCountriesSelected) : self { + $this->initialized['validCountriesSelected'] = true; $this->validCountriesSelected = $validCountriesSelected; return $this; } @@ -238,6 +252,7 @@ public function getValidForMinItemsSubtotal() : ?float */ public function setValidForMinItemsSubtotal(?float $validForMinItemsSubtotal) : self { + $this->initialized['validForMinItemsSubtotal'] = true; $this->validForMinItemsSubtotal = $validForMinItemsSubtotal; return $this; } @@ -259,6 +274,7 @@ public function getValidForMaxItemsSubtotal() : ?float */ public function setValidForMaxItemsSubtotal(?float $validForMaxItemsSubtotal) : self { + $this->initialized['validForMaxItemsSubtotal'] = true; $this->validForMaxItemsSubtotal = $validForMaxItemsSubtotal; return $this; } @@ -280,6 +296,7 @@ public function getValidForMinWeight() : ?float */ public function setValidForMinWeight(?float $validForMinWeight) : self { + $this->initialized['validForMinWeight'] = true; $this->validForMinWeight = $validForMinWeight; return $this; } @@ -301,6 +318,7 @@ public function getValidForMaxWeight() : ?float */ public function setValidForMaxWeight(?float $validForMaxWeight) : self { + $this->initialized['validForMaxWeight'] = true; $this->validForMaxWeight = $validForMaxWeight; return $this; } @@ -322,6 +340,7 @@ public function getValidForShippingMethods() : ?string */ public function setValidForShippingMethods(?string $validForShippingMethods) : self { + $this->initialized['validForShippingMethods'] = true; $this->validForShippingMethods = $validForShippingMethods; return $this; } @@ -343,6 +362,7 @@ public function getValidForCustomerType() : ?string */ public function setValidForCustomerType(?string $validForCustomerType) : self { + $this->initialized['validForCustomerType'] = true; $this->validForCustomerType = $validForCustomerType; return $this; } @@ -364,6 +384,7 @@ public function getIsClickAndCollect() : ?bool */ public function setIsClickAndCollect(?bool $isClickAndCollect) : self { + $this->initialized['isClickAndCollect'] = true; $this->isClickAndCollect = $isClickAndCollect; return $this; } @@ -385,6 +406,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -406,6 +428,7 @@ public function getLanguages() : ?PaymentMethodLanguageModelCollection */ public function setLanguages(?PaymentMethodLanguageModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/PaymentMethodModelCollection.php b/src/Api/Generated/Model/PaymentMethodModelCollection.php index f2f3f878..caf0973a 100644 --- a/src/Api/Generated/Model/PaymentMethodModelCollection.php +++ b/src/Api/Generated/Model/PaymentMethodModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PaymentMethodModelCollection +class PaymentMethodModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of payment methods * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/PaymentMethodModelItem.php b/src/Api/Generated/Model/PaymentMethodModelItem.php index 01c284b0..3002a7fd 100644 --- a/src/Api/Generated/Model/PaymentMethodModelItem.php +++ b/src/Api/Generated/Model/PaymentMethodModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PaymentMethodModelItem +class PaymentMethodModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?PaymentMethodModel */ public function setData(?PaymentMethodModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/PricelistModel.php b/src/Api/Generated/Model/PricelistModel.php index 59d1b66e..3a948cba 100644 --- a/src/Api/Generated/Model/PricelistModel.php +++ b/src/Api/Generated/Model/PricelistModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PricelistModel +class PricelistModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The pricelist id * @@ -94,6 +102,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -115,6 +124,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -136,6 +146,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -157,6 +168,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -178,6 +190,7 @@ public function getIsMaster() : ?bool */ public function setIsMaster(?bool $isMaster) : self { + $this->initialized['isMaster'] = true; $this->isMaster = $isMaster; return $this; } @@ -199,6 +212,7 @@ public function getIsActive() : ?bool */ public function setIsActive(?bool $isActive) : self { + $this->initialized['isActive'] = true; $this->isActive = $isActive; return $this; } @@ -220,6 +234,7 @@ public function getRegion() : ?string */ public function setRegion(?string $region) : self { + $this->initialized['region'] = true; $this->region = $region; return $this; } @@ -241,6 +256,7 @@ public function getCountryCodes() : ?array */ public function setCountryCodes(?array $countryCodes) : self { + $this->initialized['countryCodes'] = true; $this->countryCodes = $countryCodes; return $this; } @@ -262,6 +278,7 @@ public function getCurrencyCode() : ?string */ public function setCurrencyCode(?string $currencyCode) : self { + $this->initialized['currencyCode'] = true; $this->currencyCode = $currencyCode; return $this; } @@ -283,6 +300,7 @@ public function getParentPricelistId() : ?int */ public function setParentPricelistId(?int $parentPricelistId) : self { + $this->initialized['parentPricelistId'] = true; $this->parentPricelistId = $parentPricelistId; return $this; } @@ -304,6 +322,7 @@ public function getIsCustomerPricelist() : ?bool */ public function setIsCustomerPricelist(?bool $isCustomerPricelist) : self { + $this->initialized['isCustomerPricelist'] = true; $this->isCustomerPricelist = $isCustomerPricelist; return $this; } @@ -325,6 +344,7 @@ public function getIsCountryPricelist() : ?bool */ public function setIsCountryPricelist(?bool $isCountryPricelist) : self { + $this->initialized['isCountryPricelist'] = true; $this->isCountryPricelist = $isCountryPricelist; return $this; } diff --git a/src/Api/Generated/Model/PricelistModelCollection.php b/src/Api/Generated/Model/PricelistModelCollection.php index 0705629b..2dba6de7 100644 --- a/src/Api/Generated/Model/PricelistModelCollection.php +++ b/src/Api/Generated/Model/PricelistModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PricelistModelCollection +class PricelistModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of pricelists * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/PricelistModelItem.php b/src/Api/Generated/Model/PricelistModelItem.php index 23008df2..0cd02ffc 100644 --- a/src/Api/Generated/Model/PricelistModelItem.php +++ b/src/Api/Generated/Model/PricelistModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class PricelistModelItem +class PricelistModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?PricelistModel */ public function setData(?PricelistModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductBundleProductPriceModel.php b/src/Api/Generated/Model/ProductBundleProductPriceModel.php index ade874c3..a627e221 100644 --- a/src/Api/Generated/Model/ProductBundleProductPriceModel.php +++ b/src/Api/Generated/Model/ProductBundleProductPriceModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductBundleProductPriceModel +class ProductBundleProductPriceModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The pricelist this price is for * @@ -34,6 +42,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -55,6 +64,7 @@ public function getSpecialPriceExVat() : ?float */ public function setSpecialPriceExVat(?float $specialPriceExVat) : self { + $this->initialized['specialPriceExVat'] = true; $this->specialPriceExVat = $specialPriceExVat; return $this; } diff --git a/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php b/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php index bfc50464..b4421324 100644 --- a/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php +++ b/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductBundleProductPriceModelCollection +class ProductBundleProductPriceModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of bundled product prices * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php b/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php index 30a3d450..a4d38118 100644 --- a/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php +++ b/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductBundleProductPriceModelItem +class ProductBundleProductPriceModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductBundleProductPriceModel */ public function setData(?ProductBundleProductPriceModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php index 70301558..454ab6cd 100644 --- a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php +++ b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryLanguagesModel +class ProductCategoryLanguagesModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * @@ -64,6 +72,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -85,6 +94,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -106,6 +116,7 @@ public function getPageTitle() : ?string */ public function setPageTitle(?string $pageTitle) : self { + $this->initialized['pageTitle'] = true; $this->pageTitle = $pageTitle; return $this; } @@ -127,6 +138,7 @@ public function getDescription() : ?string */ public function setDescription(?string $description) : self { + $this->initialized['description'] = true; $this->description = $description; return $this; } @@ -148,6 +160,7 @@ public function getBottomDescription() : ?string */ public function setBottomDescription(?string $bottomDescription) : self { + $this->initialized['bottomDescription'] = true; $this->bottomDescription = $bottomDescription; return $this; } @@ -169,6 +182,7 @@ public function getPageMetaDescription() : ?string */ public function setPageMetaDescription(?string $pageMetaDescription) : self { + $this->initialized['pageMetaDescription'] = true; $this->pageMetaDescription = $pageMetaDescription; return $this; } @@ -190,6 +204,7 @@ public function getPermalink() : ?string */ public function setPermalink(?string $permalink) : self { + $this->initialized['permalink'] = true; $this->permalink = $permalink; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php b/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php index 78177bea..0685bdec 100644 --- a/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php +++ b/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryLanguagesModelCollection +class ProductCategoryLanguagesModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of category languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryLinkModel.php b/src/Api/Generated/Model/ProductCategoryLinkModel.php index 3402ab58..f8b58dc1 100644 --- a/src/Api/Generated/Model/ProductCategoryLinkModel.php +++ b/src/Api/Generated/Model/ProductCategoryLinkModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryLinkModel +class ProductCategoryLinkModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The category id this product should be listed in * @@ -34,6 +42,7 @@ public function getCategoryId() : ?int */ public function setCategoryId(?int $categoryId) : self { + $this->initialized['categoryId'] = true; $this->categoryId = $categoryId; return $this; } @@ -55,6 +64,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php b/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php index b36a6a68..941ae835 100644 --- a/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php +++ b/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryLinkModelCollection +class ProductCategoryLinkModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product category links * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryLinkModelItem.php b/src/Api/Generated/Model/ProductCategoryLinkModelItem.php index f84b48ab..24c05553 100644 --- a/src/Api/Generated/Model/ProductCategoryLinkModelItem.php +++ b/src/Api/Generated/Model/ProductCategoryLinkModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryLinkModelItem +class ProductCategoryLinkModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductCategoryLinkModel */ public function setData(?ProductCategoryLinkModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryModel.php b/src/Api/Generated/Model/ProductCategoryModel.php index 598a945e..3d4223cd 100644 --- a/src/Api/Generated/Model/ProductCategoryModel.php +++ b/src/Api/Generated/Model/ProductCategoryModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryModel +class ProductCategoryModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The product category Id * @@ -90,6 +98,7 @@ public function getCategoryId() : ?int */ public function setCategoryId(?int $categoryId) : self { + $this->initialized['categoryId'] = true; $this->categoryId = $categoryId; return $this; } @@ -111,6 +120,7 @@ public function getParentId() : ?int */ public function setParentId(?int $parentId) : self { + $this->initialized['parentId'] = true; $this->parentId = $parentId; return $this; } @@ -132,6 +142,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -153,6 +164,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -174,6 +186,7 @@ public function getOpenPage() : ?bool */ public function setOpenPage(?bool $openPage) : self { + $this->initialized['openPage'] = true; $this->openPage = $openPage; return $this; } @@ -195,6 +208,7 @@ public function getImageFileId() : ?int */ public function setImageFileId(?int $imageFileId) : self { + $this->initialized['imageFileId'] = true; $this->imageFileId = $imageFileId; return $this; } @@ -216,6 +230,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -241,6 +256,7 @@ public function getExternalType() : ?string */ public function setExternalType(?string $externalType) : self { + $this->initialized['externalType'] = true; $this->externalType = $externalType; return $this; } @@ -262,6 +278,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -283,6 +300,7 @@ public function getHasChildren() : ?bool */ public function setHasChildren(?bool $hasChildren) : self { + $this->initialized['hasChildren'] = true; $this->hasChildren = $hasChildren; return $this; } @@ -304,6 +322,7 @@ public function getLanguages() : ?ProductCategoryLanguagesModelCollection */ public function setLanguages(?ProductCategoryLanguagesModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryModelCollection.php b/src/Api/Generated/Model/ProductCategoryModelCollection.php index c36c6de9..2bc6e424 100644 --- a/src/Api/Generated/Model/ProductCategoryModelCollection.php +++ b/src/Api/Generated/Model/ProductCategoryModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryModelCollection +class ProductCategoryModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of product categories * @@ -34,6 +42,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } @@ -55,6 +64,7 @@ public function getMeta() : ?ProductCategoryModelCollectionMeta */ public function setMeta(?ProductCategoryModelCollectionMeta $meta) : self { + $this->initialized['meta'] = true; $this->meta = $meta; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php b/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php index 77f68f4e..284bf4cf 100644 --- a/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php +++ b/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryModelCollectionMeta +class ProductCategoryModelCollectionMeta extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getPagination() : ?PaginationModel */ public function setPagination(?PaginationModel $pagination) : self { + $this->initialized['pagination'] = true; $this->pagination = $pagination; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryModelItem.php b/src/Api/Generated/Model/ProductCategoryModelItem.php index cb32c111..85c49558 100644 --- a/src/Api/Generated/Model/ProductCategoryModelItem.php +++ b/src/Api/Generated/Model/ProductCategoryModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryModelItem +class ProductCategoryModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductCategoryModel */ public function setData(?ProductCategoryModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php index c98b329d..5f87cf1d 100644 --- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php +++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductCategoryModelUpdatable +class ProductCategoryModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The product category Id * @@ -90,6 +98,7 @@ public function getCategoryId() : ?int */ public function setCategoryId(?int $categoryId) : self { + $this->initialized['categoryId'] = true; $this->categoryId = $categoryId; return $this; } @@ -111,6 +120,7 @@ public function getParentId() : ?int */ public function setParentId(?int $parentId) : self { + $this->initialized['parentId'] = true; $this->parentId = $parentId; return $this; } @@ -132,6 +142,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -153,6 +164,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -174,6 +186,7 @@ public function getOpenPage() : ?bool */ public function setOpenPage(?bool $openPage) : self { + $this->initialized['openPage'] = true; $this->openPage = $openPage; return $this; } @@ -195,6 +208,7 @@ public function getImageFileId() : ?int */ public function setImageFileId(?int $imageFileId) : self { + $this->initialized['imageFileId'] = true; $this->imageFileId = $imageFileId; return $this; } @@ -216,6 +230,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -241,6 +256,7 @@ public function getExternalType() : ?string */ public function setExternalType(?string $externalType) : self { + $this->initialized['externalType'] = true; $this->externalType = $externalType; return $this; } @@ -262,6 +278,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -283,6 +300,7 @@ public function getHasChildren() : ?bool */ public function setHasChildren(?bool $hasChildren) : self { + $this->initialized['hasChildren'] = true; $this->hasChildren = $hasChildren; return $this; } @@ -304,6 +322,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductLanguageModel.php b/src/Api/Generated/Model/ProductLanguageModel.php index 09caffbb..36c21729 100644 --- a/src/Api/Generated/Model/ProductLanguageModel.php +++ b/src/Api/Generated/Model/ProductLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductLanguageModel +class ProductLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * @@ -64,6 +72,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -85,6 +94,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -106,6 +116,7 @@ public function getShortDescription() : ?string */ public function setShortDescription(?string $shortDescription) : self { + $this->initialized['shortDescription'] = true; $this->shortDescription = $shortDescription; return $this; } @@ -127,6 +138,7 @@ public function getLongDescription() : ?string */ public function setLongDescription(?string $longDescription) : self { + $this->initialized['longDescription'] = true; $this->longDescription = $longDescription; return $this; } @@ -148,6 +160,7 @@ public function getPermalink() : ?string */ public function setPermalink(?string $permalink) : self { + $this->initialized['permalink'] = true; $this->permalink = $permalink; return $this; } @@ -169,6 +182,7 @@ public function getPageTitle() : ?string */ public function setPageTitle(?string $pageTitle) : self { + $this->initialized['pageTitle'] = true; $this->pageTitle = $pageTitle; return $this; } @@ -190,6 +204,7 @@ public function getPageMetaDescription() : ?string */ public function setPageMetaDescription(?string $pageMetaDescription) : self { + $this->initialized['pageMetaDescription'] = true; $this->pageMetaDescription = $pageMetaDescription; return $this; } diff --git a/src/Api/Generated/Model/ProductLanguageModelCollection.php b/src/Api/Generated/Model/ProductLanguageModelCollection.php index 54e7d3e1..34ff8bd7 100644 --- a/src/Api/Generated/Model/ProductLanguageModelCollection.php +++ b/src/Api/Generated/Model/ProductLanguageModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductLanguageModelCollection +class ProductLanguageModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductLanguageModelItem.php b/src/Api/Generated/Model/ProductLanguageModelItem.php index 01830466..4875f041 100644 --- a/src/Api/Generated/Model/ProductLanguageModelItem.php +++ b/src/Api/Generated/Model/ProductLanguageModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductLanguageModelItem +class ProductLanguageModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductLanguageModel */ public function setData(?ProductLanguageModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductLanguageSlimModel.php b/src/Api/Generated/Model/ProductLanguageSlimModel.php index b9030e99..f0f65204 100644 --- a/src/Api/Generated/Model/ProductLanguageSlimModel.php +++ b/src/Api/Generated/Model/ProductLanguageSlimModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductLanguageSlimModel +class ProductLanguageSlimModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * @@ -46,6 +54,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -67,6 +76,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -88,6 +98,7 @@ public function getShortDescription() : ?string */ public function setShortDescription(?string $shortDescription) : self { + $this->initialized['shortDescription'] = true; $this->shortDescription = $shortDescription; return $this; } @@ -109,6 +120,7 @@ public function getPermalink() : ?string */ public function setPermalink(?string $permalink) : self { + $this->initialized['permalink'] = true; $this->permalink = $permalink; return $this; } diff --git a/src/Api/Generated/Model/ProductManufacturerModel.php b/src/Api/Generated/Model/ProductManufacturerModel.php index 5f4741d4..1bfdf274 100644 --- a/src/Api/Generated/Model/ProductManufacturerModel.php +++ b/src/Api/Generated/Model/ProductManufacturerModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductManufacturerModel +class ProductManufacturerModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id of this manufacturer * @@ -52,6 +60,7 @@ public function getManufacturerId() : ?int */ public function setManufacturerId(?int $manufacturerId) : self { + $this->initialized['manufacturerId'] = true; $this->manufacturerId = $manufacturerId; return $this; } @@ -73,6 +82,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -94,6 +104,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -115,6 +126,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -136,6 +148,7 @@ public function getUrl() : ?string */ public function setUrl(?string $url) : self { + $this->initialized['url'] = true; $this->url = $url; return $this; } diff --git a/src/Api/Generated/Model/ProductManufacturerModelCollection.php b/src/Api/Generated/Model/ProductManufacturerModelCollection.php index d98a2469..d5b17937 100644 --- a/src/Api/Generated/Model/ProductManufacturerModelCollection.php +++ b/src/Api/Generated/Model/ProductManufacturerModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductManufacturerModelCollection +class ProductManufacturerModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product manufacturers * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductManufacturerModelItem.php b/src/Api/Generated/Model/ProductManufacturerModelItem.php index 05df0c6a..fcdefa80 100644 --- a/src/Api/Generated/Model/ProductManufacturerModelItem.php +++ b/src/Api/Generated/Model/ProductManufacturerModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductManufacturerModelItem +class ProductManufacturerModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductManufacturerModel */ public function setData(?ProductManufacturerModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMediaFileLinkModel.php b/src/Api/Generated/Model/ProductMediaFileLinkModel.php index d1479791..22647d41 100644 --- a/src/Api/Generated/Model/ProductMediaFileLinkModel.php +++ b/src/Api/Generated/Model/ProductMediaFileLinkModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMediaFileLinkModel +class ProductMediaFileLinkModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * This links ID * @@ -46,6 +54,7 @@ public function getProductMediaFileId() : ?int */ public function setProductMediaFileId(?int $productMediaFileId) : self { + $this->initialized['productMediaFileId'] = true; $this->productMediaFileId = $productMediaFileId; return $this; } @@ -67,6 +76,7 @@ public function getMediaFileId() : ?int */ public function setMediaFileId(?int $mediaFileId) : self { + $this->initialized['mediaFileId'] = true; $this->mediaFileId = $mediaFileId; return $this; } @@ -88,6 +98,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -109,6 +120,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } diff --git a/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php b/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php index 9b6d3394..81e6dd09 100644 --- a/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php +++ b/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMediaFileLinkModelCollection +class ProductMediaFileLinkModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product media file links * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php b/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php index f9eb14cc..fb9edb11 100644 --- a/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php +++ b/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMediaFileLinkModelItem +class ProductMediaFileLinkModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductMediaFileLinkModel */ public function setData(?ProductMediaFileLinkModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataModel.php b/src/Api/Generated/Model/ProductMetaDataModel.php index 2e08d15e..a33233b0 100644 --- a/src/Api/Generated/Model/ProductMetaDataModel.php +++ b/src/Api/Generated/Model/ProductMetaDataModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataModel +class ProductMetaDataModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The ID of the meta data. * @@ -46,6 +54,7 @@ public function getMetaDataId() : ?int */ public function setMetaDataId(?int $metaDataId) : self { + $this->initialized['metaDataId'] = true; $this->metaDataId = $metaDataId; return $this; } @@ -67,6 +76,7 @@ public function getMetaDataTypeId() : ?int */ public function setMetaDataTypeId(?int $metaDataTypeId) : self { + $this->initialized['metaDataTypeId'] = true; $this->metaDataTypeId = $metaDataTypeId; return $this; } @@ -88,6 +98,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?ProductMetaLanguageDataModelCollection */ public function setLanguages(?ProductMetaLanguageDataModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataModelCollection.php b/src/Api/Generated/Model/ProductMetaDataModelCollection.php index 73083c54..f07acd00 100644 --- a/src/Api/Generated/Model/ProductMetaDataModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaDataModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataModelCollection +class ProductMetaDataModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product meta data * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataModelItem.php b/src/Api/Generated/Model/ProductMetaDataModelItem.php index fac100cd..50ce0450 100644 --- a/src/Api/Generated/Model/ProductMetaDataModelItem.php +++ b/src/Api/Generated/Model/ProductMetaDataModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataModelItem +class ProductMetaDataModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductMetaDataModel */ public function setData(?ProductMetaDataModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php b/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php index f3235e7c..79347527 100644 --- a/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php +++ b/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataModelUpdatable +class ProductMetaDataModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The ID of the meta data. * @@ -46,6 +54,7 @@ public function getMetaDataId() : ?int */ public function setMetaDataId(?int $metaDataId) : self { + $this->initialized['metaDataId'] = true; $this->metaDataId = $metaDataId; return $this; } @@ -67,6 +76,7 @@ public function getMetaDataTypeId() : ?int */ public function setMetaDataTypeId(?int $metaDataTypeId) : self { + $this->initialized['metaDataTypeId'] = true; $this->metaDataTypeId = $metaDataTypeId; return $this; } @@ -88,6 +98,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php index a0cd7e64..2cd4209a 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataTypeLanguageModel +class ProductMetaDataTypeLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The language code for this language * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php index 18716236..d7f3c81e 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataTypeLanguageModelCollection +class ProductMetaDataTypeLanguageModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product meta data type languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModel.php b/src/Api/Generated/Model/ProductMetaDataTypeModel.php index 98255cb3..bbfa8c10 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModel.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataTypeModel +class ProductMetaDataTypeModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The meta data type id * @@ -34,6 +42,7 @@ public function getMetaDataTypeId() : ?int */ public function setMetaDataTypeId(?int $metaDataTypeId) : self { + $this->initialized['metaDataTypeId'] = true; $this->metaDataTypeId = $metaDataTypeId; return $this; } @@ -55,6 +64,7 @@ public function getLanguages() : ?ProductMetaDataTypeLanguageModelCollection */ public function setLanguages(?ProductMetaDataTypeLanguageModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php b/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php index f86f8bc3..9b0d359a 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataTypeModelCollection +class ProductMetaDataTypeModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product meta data types * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php b/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php index 7cef498b..676bdabf 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataTypeModelItem +class ProductMetaDataTypeModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductMetaDataTypeModel */ public function setData(?ProductMetaDataTypeModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php b/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php index bfdb3c4d..0025ea41 100644 --- a/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaDataTypeModelUpdatable +class ProductMetaDataTypeModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getLanguages() : ?ProductMetaDataTypeLanguageModelCollection */ public function setLanguages(?ProductMetaDataTypeLanguageModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaLanguageDataModel.php b/src/Api/Generated/Model/ProductMetaLanguageDataModel.php index 26672cde..77a9abdd 100644 --- a/src/Api/Generated/Model/ProductMetaLanguageDataModel.php +++ b/src/Api/Generated/Model/ProductMetaLanguageDataModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaLanguageDataModel +class ProductMetaLanguageDataModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The langCode for this language * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getValue() : ?string */ public function setValue(?string $value) : self { + $this->initialized['value'] = true; $this->value = $value; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php b/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php index 3c0bfe18..26925ebb 100644 --- a/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php +++ b/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaLanguageDataModelCollection +class ProductMetaLanguageDataModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product meta data * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php b/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php index e08b4739..4685f20e 100644 --- a/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php +++ b/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductMetaLanguageDataModelItem +class ProductMetaLanguageDataModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductMetaLanguageDataModel */ public function setData(?ProductMetaLanguageDataModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductModel.php b/src/Api/Generated/Model/ProductModel.php index 0832ad9e..77ba60e8 100644 --- a/src/Api/Generated/Model/ProductModel.php +++ b/src/Api/Generated/Model/ProductModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModel +class ProductModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -172,6 +180,7 @@ public function getProductId() : ?int */ public function setProductId(?int $productId) : self { + $this->initialized['productId'] = true; $this->productId = $productId; return $this; } @@ -193,6 +202,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -214,6 +224,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -235,6 +246,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -256,6 +268,7 @@ public function getDefaultVatRate() : ?string */ public function setDefaultVatRate(?string $defaultVatRate) : self { + $this->initialized['defaultVatRate'] = true; $this->defaultVatRate = $defaultVatRate; return $this; } @@ -277,6 +290,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -298,6 +312,7 @@ public function getVisibilityPricelistIds() : ?array */ public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self { + $this->initialized['visibilityPricelistIds'] = true; $this->visibilityPricelistIds = $visibilityPricelistIds; return $this; } @@ -319,6 +334,7 @@ public function getMoreInfoUrl() : ?string */ public function setMoreInfoUrl(?string $moreInfoUrl) : self { + $this->initialized['moreInfoUrl'] = true; $this->moreInfoUrl = $moreInfoUrl; return $this; } @@ -340,6 +356,7 @@ public function getManufacturerId() : ?int */ public function setManufacturerId(?int $manufacturerId) : self { + $this->initialized['manufacturerId'] = true; $this->manufacturerId = $manufacturerId; return $this; } @@ -361,6 +378,7 @@ public function getUnitId() : ?int */ public function setUnitId(?int $unitId) : self { + $this->initialized['unitId'] = true; $this->unitId = $unitId; return $this; } @@ -382,6 +400,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -403,6 +422,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -424,6 +444,7 @@ public function getIsBackInStockWatchable() : ?bool */ public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self { + $this->initialized['isBackInStockWatchable'] = true; $this->isBackInStockWatchable = $isBackInStockWatchable; return $this; } @@ -445,6 +466,7 @@ public function getBundleUseManualPrice() : ?bool */ public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self { + $this->initialized['bundleUseManualPrice'] = true; $this->bundleUseManualPrice = $bundleUseManualPrice; return $this; } @@ -466,6 +488,7 @@ public function getAccounting() : ?int */ public function setAccounting(?int $accounting) : self { + $this->initialized['accounting'] = true; $this->accounting = $accounting; return $this; } @@ -487,6 +510,7 @@ public function getHasSeveralVariants() : ?bool */ public function setHasSeveralVariants(?bool $hasSeveralVariants) : self { + $this->initialized['hasSeveralVariants'] = true; $this->hasSeveralVariants = $hasSeveralVariants; return $this; } @@ -508,6 +532,7 @@ public function getModifiedAt() : ?string */ public function setModifiedAt(?string $modifiedAt) : self { + $this->initialized['modifiedAt'] = true; $this->modifiedAt = $modifiedAt; return $this; } @@ -529,6 +554,7 @@ public function getVariants() : ?ProductVariantModelCollection */ public function setVariants(?ProductVariantModelCollection $variants) : self { + $this->initialized['variants'] = true; $this->variants = $variants; return $this; } @@ -550,6 +576,7 @@ public function getBundledProducts() : ?BundledProductsModelCollection */ public function setBundledProducts(?BundledProductsModelCollection $bundledProducts) : self { + $this->initialized['bundledProducts'] = true; $this->bundledProducts = $bundledProducts; return $this; } @@ -571,6 +598,7 @@ public function getMediaFiles() : ?ProductMediaFileLinkModelCollection */ public function setMediaFiles(?ProductMediaFileLinkModelCollection $mediaFiles) : self { + $this->initialized['mediaFiles'] = true; $this->mediaFiles = $mediaFiles; return $this; } @@ -592,6 +620,7 @@ public function getLanguages() : ?ProductModelLanguages */ public function setLanguages(?ProductModelLanguages $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } @@ -613,6 +642,7 @@ public function getVatRates() : ?ProductVatRateModelCollection */ public function setVatRates(?ProductVatRateModelCollection $vatRates) : self { + $this->initialized['vatRates'] = true; $this->vatRates = $vatRates; return $this; } @@ -634,6 +664,7 @@ public function getCategories() : ?ProductCategoryLinkModelCollection */ public function setCategories(?ProductCategoryLinkModelCollection $categories) : self { + $this->initialized['categories'] = true; $this->categories = $categories; return $this; } @@ -655,6 +686,7 @@ public function getUnit() : ?ProductUnitModelItem */ public function setUnit(?ProductUnitModelItem $unit) : self { + $this->initialized['unit'] = true; $this->unit = $unit; return $this; } @@ -676,6 +708,7 @@ public function getMetaData() : ?ProductMetaDataModelCollection */ public function setMetaData(?ProductMetaDataModelCollection $metaData) : self { + $this->initialized['metaData'] = true; $this->metaData = $metaData; return $this; } diff --git a/src/Api/Generated/Model/ProductModelCollection.php b/src/Api/Generated/Model/ProductModelCollection.php index 8f1506ae..933b0e82 100644 --- a/src/Api/Generated/Model/ProductModelCollection.php +++ b/src/Api/Generated/Model/ProductModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModelCollection +class ProductModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of products * @@ -34,6 +42,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } @@ -55,6 +64,7 @@ public function getMeta() : ?ProductModelCollectionMeta */ public function setMeta(?ProductModelCollectionMeta $meta) : self { + $this->initialized['meta'] = true; $this->meta = $meta; return $this; } diff --git a/src/Api/Generated/Model/ProductModelCollectionMeta.php b/src/Api/Generated/Model/ProductModelCollectionMeta.php index 4d6d4e91..b381e356 100644 --- a/src/Api/Generated/Model/ProductModelCollectionMeta.php +++ b/src/Api/Generated/Model/ProductModelCollectionMeta.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModelCollectionMeta +class ProductModelCollectionMeta extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getPagination() : ?PaginationModel */ public function setPagination(?PaginationModel $pagination) : self { + $this->initialized['pagination'] = true; $this->pagination = $pagination; return $this; } diff --git a/src/Api/Generated/Model/ProductModelItem.php b/src/Api/Generated/Model/ProductModelItem.php index 5dc18cde..55fc2787 100644 --- a/src/Api/Generated/Model/ProductModelItem.php +++ b/src/Api/Generated/Model/ProductModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModelItem +class ProductModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductModel */ public function setData(?ProductModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductModelLanguages.php b/src/Api/Generated/Model/ProductModelLanguages.php index 33692085..19bb6c14 100644 --- a/src/Api/Generated/Model/ProductModelLanguages.php +++ b/src/Api/Generated/Model/ProductModelLanguages.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModelLanguages +class ProductModelLanguages extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductModelPatchable.php b/src/Api/Generated/Model/ProductModelPatchable.php index a1ef7a20..d2eec75d 100644 --- a/src/Api/Generated/Model/ProductModelPatchable.php +++ b/src/Api/Generated/Model/ProductModelPatchable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModelPatchable +class ProductModelPatchable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The external id of this pricelist * @@ -136,6 +144,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -157,6 +166,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -178,6 +188,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -199,6 +210,7 @@ public function getDefaultVatRate() : ?string */ public function setDefaultVatRate(?string $defaultVatRate) : self { + $this->initialized['defaultVatRate'] = true; $this->defaultVatRate = $defaultVatRate; return $this; } @@ -220,6 +232,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -241,6 +254,7 @@ public function getVisibilityPricelistIds() : ?array */ public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self { + $this->initialized['visibilityPricelistIds'] = true; $this->visibilityPricelistIds = $visibilityPricelistIds; return $this; } @@ -262,6 +276,7 @@ public function getMoreInfoUrl() : ?string */ public function setMoreInfoUrl(?string $moreInfoUrl) : self { + $this->initialized['moreInfoUrl'] = true; $this->moreInfoUrl = $moreInfoUrl; return $this; } @@ -283,6 +298,7 @@ public function getManufacturerId() : ?int */ public function setManufacturerId(?int $manufacturerId) : self { + $this->initialized['manufacturerId'] = true; $this->manufacturerId = $manufacturerId; return $this; } @@ -304,6 +320,7 @@ public function getUnitId() : ?int */ public function setUnitId(?int $unitId) : self { + $this->initialized['unitId'] = true; $this->unitId = $unitId; return $this; } @@ -325,6 +342,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -346,6 +364,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -367,6 +386,7 @@ public function getIsBackInStockWatchable() : ?bool */ public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self { + $this->initialized['isBackInStockWatchable'] = true; $this->isBackInStockWatchable = $isBackInStockWatchable; return $this; } @@ -388,6 +408,7 @@ public function getBundleUseManualPrice() : ?bool */ public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self { + $this->initialized['bundleUseManualPrice'] = true; $this->bundleUseManualPrice = $bundleUseManualPrice; return $this; } @@ -409,6 +430,7 @@ public function getAccounting() : ?int */ public function setAccounting(?int $accounting) : self { + $this->initialized['accounting'] = true; $this->accounting = $accounting; return $this; } @@ -430,6 +452,7 @@ public function getMediaFiles() : ?array */ public function setMediaFiles(?array $mediaFiles) : self { + $this->initialized['mediaFiles'] = true; $this->mediaFiles = $mediaFiles; return $this; } @@ -451,6 +474,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } @@ -472,6 +496,7 @@ public function getVatRates() : ?array */ public function setVatRates(?array $vatRates) : self { + $this->initialized['vatRates'] = true; $this->vatRates = $vatRates; return $this; } @@ -493,6 +518,7 @@ public function getCategories() : ?array */ public function setCategories(?array $categories) : self { + $this->initialized['categories'] = true; $this->categories = $categories; return $this; } @@ -514,6 +540,7 @@ public function getMetaData() : ?array */ public function setMetaData(?array $metaData) : self { + $this->initialized['metaData'] = true; $this->metaData = $metaData; return $this; } diff --git a/src/Api/Generated/Model/ProductModelUpdatable.php b/src/Api/Generated/Model/ProductModelUpdatable.php index 66ecdf9c..1430a40b 100644 --- a/src/Api/Generated/Model/ProductModelUpdatable.php +++ b/src/Api/Generated/Model/ProductModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductModelUpdatable +class ProductModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The external id of this pricelist * @@ -148,6 +156,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -169,6 +178,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -190,6 +200,7 @@ public function getCreatedAt() : ?string */ public function setCreatedAt(?string $createdAt) : self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; return $this; } @@ -211,6 +222,7 @@ public function getDefaultVatRate() : ?string */ public function setDefaultVatRate(?string $defaultVatRate) : self { + $this->initialized['defaultVatRate'] = true; $this->defaultVatRate = $defaultVatRate; return $this; } @@ -232,6 +244,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -253,6 +266,7 @@ public function getVisibilityPricelistIds() : ?array */ public function setVisibilityPricelistIds(?array $visibilityPricelistIds) : self { + $this->initialized['visibilityPricelistIds'] = true; $this->visibilityPricelistIds = $visibilityPricelistIds; return $this; } @@ -274,6 +288,7 @@ public function getMoreInfoUrl() : ?string */ public function setMoreInfoUrl(?string $moreInfoUrl) : self { + $this->initialized['moreInfoUrl'] = true; $this->moreInfoUrl = $moreInfoUrl; return $this; } @@ -295,6 +310,7 @@ public function getManufacturerId() : ?int */ public function setManufacturerId(?int $manufacturerId) : self { + $this->initialized['manufacturerId'] = true; $this->manufacturerId = $manufacturerId; return $this; } @@ -316,6 +332,7 @@ public function getUnitId() : ?int */ public function setUnitId(?int $unitId) : self { + $this->initialized['unitId'] = true; $this->unitId = $unitId; return $this; } @@ -337,6 +354,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -358,6 +376,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -379,6 +398,7 @@ public function getIsBackInStockWatchable() : ?bool */ public function setIsBackInStockWatchable(?bool $isBackInStockWatchable) : self { + $this->initialized['isBackInStockWatchable'] = true; $this->isBackInStockWatchable = $isBackInStockWatchable; return $this; } @@ -400,6 +420,7 @@ public function getBundleUseManualPrice() : ?bool */ public function setBundleUseManualPrice(?bool $bundleUseManualPrice) : self { + $this->initialized['bundleUseManualPrice'] = true; $this->bundleUseManualPrice = $bundleUseManualPrice; return $this; } @@ -421,6 +442,7 @@ public function getAccounting() : ?int */ public function setAccounting(?int $accounting) : self { + $this->initialized['accounting'] = true; $this->accounting = $accounting; return $this; } @@ -442,6 +464,7 @@ public function getVariants() : ?array */ public function setVariants(?array $variants) : self { + $this->initialized['variants'] = true; $this->variants = $variants; return $this; } @@ -463,6 +486,7 @@ public function getBundledProducts() : ?array */ public function setBundledProducts(?array $bundledProducts) : self { + $this->initialized['bundledProducts'] = true; $this->bundledProducts = $bundledProducts; return $this; } @@ -484,6 +508,7 @@ public function getMediaFiles() : ?array */ public function setMediaFiles(?array $mediaFiles) : self { + $this->initialized['mediaFiles'] = true; $this->mediaFiles = $mediaFiles; return $this; } @@ -505,6 +530,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } @@ -526,6 +552,7 @@ public function getVatRates() : ?array */ public function setVatRates(?array $vatRates) : self { + $this->initialized['vatRates'] = true; $this->vatRates = $vatRates; return $this; } @@ -547,6 +574,7 @@ public function getCategories() : ?array */ public function setCategories(?array $categories) : self { + $this->initialized['categories'] = true; $this->categories = $categories; return $this; } @@ -568,6 +596,7 @@ public function getMetaData() : ?array */ public function setMetaData(?array $metaData) : self { + $this->initialized['metaData'] = true; $this->metaData = $metaData; return $this; } diff --git a/src/Api/Generated/Model/ProductStockStatusLanguageModel.php b/src/Api/Generated/Model/ProductStockStatusLanguageModel.php index cd8b36c7..11078a76 100644 --- a/src/Api/Generated/Model/ProductStockStatusLanguageModel.php +++ b/src/Api/Generated/Model/ProductStockStatusLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusLanguageModel +class ProductStockStatusLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/ProductStockStatusModelCollection.php b/src/Api/Generated/Model/ProductStockStatusModelCollection.php index 12799b7f..7230ead1 100644 --- a/src/Api/Generated/Model/ProductStockStatusModelCollection.php +++ b/src/Api/Generated/Model/ProductStockStatusModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusModelCollection +class ProductStockStatusModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of product stock statuses * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductStockStatusModelItem.php b/src/Api/Generated/Model/ProductStockStatusModelItem.php index eb34dacd..fc841529 100644 --- a/src/Api/Generated/Model/ProductStockStatusModelItem.php +++ b/src/Api/Generated/Model/ProductStockStatusModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusModelItem +class ProductStockStatusModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductStockStatusResponseModel */ public function setData(?ProductStockStatusResponseModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductStockStatusRequestModel.php b/src/Api/Generated/Model/ProductStockStatusRequestModel.php index d22ac5cc..b0712167 100644 --- a/src/Api/Generated/Model/ProductStockStatusRequestModel.php +++ b/src/Api/Generated/Model/ProductStockStatusRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusRequestModel +class ProductStockStatusRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The stock status id * @@ -64,6 +72,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -85,6 +94,7 @@ public function getIdCode() : ?string */ public function setIdCode(?string $idCode) : self { + $this->initialized['idCode'] = true; $this->idCode = $idCode; return $this; } @@ -106,6 +116,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -127,6 +138,7 @@ public function getStockoutNewStatusId() : ?int */ public function setStockoutNewStatusId(?int $stockoutNewStatusId) : self { + $this->initialized['stockoutNewStatusId'] = true; $this->stockoutNewStatusId = $stockoutNewStatusId; return $this; } @@ -148,6 +160,7 @@ public function getProductBuyable() : ?bool */ public function setProductBuyable(?bool $productBuyable) : self { + $this->initialized['productBuyable'] = true; $this->productBuyable = $productBuyable; return $this; } @@ -169,6 +182,7 @@ public function getInStock() : ?bool */ public function setInStock(?bool $inStock) : self { + $this->initialized['inStock'] = true; $this->inStock = $inStock; return $this; } @@ -190,6 +204,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModel.php b/src/Api/Generated/Model/ProductStockStatusResponseModel.php index b609ff4a..57b7ce63 100644 --- a/src/Api/Generated/Model/ProductStockStatusResponseModel.php +++ b/src/Api/Generated/Model/ProductStockStatusResponseModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusResponseModel +class ProductStockStatusResponseModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The stock status id * @@ -64,6 +72,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -85,6 +94,7 @@ public function getIdCode() : ?string */ public function setIdCode(?string $idCode) : self { + $this->initialized['idCode'] = true; $this->idCode = $idCode; return $this; } @@ -106,6 +116,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -127,6 +138,7 @@ public function getStockoutNewStatusId() : ?int */ public function setStockoutNewStatusId(?int $stockoutNewStatusId) : self { + $this->initialized['stockoutNewStatusId'] = true; $this->stockoutNewStatusId = $stockoutNewStatusId; return $this; } @@ -148,6 +160,7 @@ public function getProductBuyable() : ?bool */ public function setProductBuyable(?bool $productBuyable) : self { + $this->initialized['productBuyable'] = true; $this->productBuyable = $productBuyable; return $this; } @@ -169,6 +182,7 @@ public function getInStock() : ?bool */ public function setInStock(?bool $inStock) : self { + $this->initialized['inStock'] = true; $this->inStock = $inStock; return $this; } @@ -190,6 +204,7 @@ public function getLanguages() : ?ProductStockStatusResponseModelLanguages */ public function setLanguages(?ProductStockStatusResponseModelLanguages $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php index 7a6ce469..a99e2f03 100644 --- a/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php +++ b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductStockStatusResponseModelLanguages +class ProductStockStatusResponseModelLanguages extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagLanguageModel.php b/src/Api/Generated/Model/ProductTagLanguageModel.php index efe8d9e3..926fc810 100644 --- a/src/Api/Generated/Model/ProductTagLanguageModel.php +++ b/src/Api/Generated/Model/ProductTagLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagLanguageModel +class ProductTagLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/ProductTagLinkModel.php b/src/Api/Generated/Model/ProductTagLinkModel.php index 2a11c637..c351609c 100644 --- a/src/Api/Generated/Model/ProductTagLinkModel.php +++ b/src/Api/Generated/Model/ProductTagLinkModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagLinkModel +class ProductTagLinkModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag option id this product should be listed in * @@ -34,6 +42,7 @@ public function getTagOptionId() : ?int */ public function setTagOptionId(?int $tagOptionId) : self { + $this->initialized['tagOptionId'] = true; $this->tagOptionId = $tagOptionId; return $this; } @@ -55,6 +64,7 @@ public function getTagId() : ?int */ public function setTagId(?int $tagId) : self { + $this->initialized['tagId'] = true; $this->tagId = $tagId; return $this; } diff --git a/src/Api/Generated/Model/ProductTagLinkModelCollection.php b/src/Api/Generated/Model/ProductTagLinkModelCollection.php index 398a4606..c8120fcb 100644 --- a/src/Api/Generated/Model/ProductTagLinkModelCollection.php +++ b/src/Api/Generated/Model/ProductTagLinkModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagLinkModelCollection +class ProductTagLinkModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product tag links * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagLinkModelItem.php b/src/Api/Generated/Model/ProductTagLinkModelItem.php index b539ffba..74d788db 100644 --- a/src/Api/Generated/Model/ProductTagLinkModelItem.php +++ b/src/Api/Generated/Model/ProductTagLinkModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagLinkModelItem +class ProductTagLinkModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductTagLinkModel */ public function setData(?ProductTagLinkModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php b/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php index 7e96a7b0..1904aa2a 100644 --- a/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php +++ b/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagLinkPostRequestModel +class ProductTagLinkPostRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag option id this product should be listed in * @@ -28,6 +36,7 @@ public function getTagOptionId() : ?int */ public function setTagOptionId(?int $tagOptionId) : self { + $this->initialized['tagOptionId'] = true; $this->tagOptionId = $tagOptionId; return $this; } diff --git a/src/Api/Generated/Model/ProductTagModel.php b/src/Api/Generated/Model/ProductTagModel.php index 8349c9ab..54c5344b 100644 --- a/src/Api/Generated/Model/ProductTagModel.php +++ b/src/Api/Generated/Model/ProductTagModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagModel +class ProductTagModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag Id * @@ -40,6 +48,7 @@ public function getTagId() : ?int */ public function setTagId(?int $tagId) : self { + $this->initialized['tagId'] = true; $this->tagId = $tagId; return $this; } @@ -61,6 +70,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -82,6 +92,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagModelCollection.php b/src/Api/Generated/Model/ProductTagModelCollection.php index d53bb095..25a540b3 100644 --- a/src/Api/Generated/Model/ProductTagModelCollection.php +++ b/src/Api/Generated/Model/ProductTagModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagModelCollection +class ProductTagModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of product tags * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagModelItem.php b/src/Api/Generated/Model/ProductTagModelItem.php index 8af69c58..e4d16c1a 100644 --- a/src/Api/Generated/Model/ProductTagModelItem.php +++ b/src/Api/Generated/Model/ProductTagModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagModelItem +class ProductTagModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductTagModel */ public function setData(?ProductTagModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionLanguageModel.php b/src/Api/Generated/Model/ProductTagOptionLanguageModel.php index a5de47af..07a3341f 100644 --- a/src/Api/Generated/Model/ProductTagOptionLanguageModel.php +++ b/src/Api/Generated/Model/ProductTagOptionLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionLanguageModel +class ProductTagOptionLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop has setup. * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getValue() : ?string */ public function setValue(?string $value) : self { + $this->initialized['value'] = true; $this->value = $value; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionModel.php b/src/Api/Generated/Model/ProductTagOptionModel.php index 2d2f367c..7b7a575b 100644 --- a/src/Api/Generated/Model/ProductTagOptionModel.php +++ b/src/Api/Generated/Model/ProductTagOptionModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionModel +class ProductTagOptionModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The option Id * @@ -46,6 +54,7 @@ public function getTagOptionId() : ?int */ public function setTagOptionId(?int $tagOptionId) : self { + $this->initialized['tagOptionId'] = true; $this->tagOptionId = $tagOptionId; return $this; } @@ -67,6 +76,7 @@ public function getValue() : ?bool */ public function setValue(?bool $value) : self { + $this->initialized['value'] = true; $this->value = $value; return $this; } @@ -88,6 +98,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionModelCollection.php b/src/Api/Generated/Model/ProductTagOptionModelCollection.php index fdec39ad..91be75ab 100644 --- a/src/Api/Generated/Model/ProductTagOptionModelCollection.php +++ b/src/Api/Generated/Model/ProductTagOptionModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionModelCollection +class ProductTagOptionModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of product tag options * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionModelItem.php b/src/Api/Generated/Model/ProductTagOptionModelItem.php index ca48cb12..4c7819e5 100644 --- a/src/Api/Generated/Model/ProductTagOptionModelItem.php +++ b/src/Api/Generated/Model/ProductTagOptionModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionModelItem +class ProductTagOptionModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductTagOptionModel */ public function setData(?ProductTagOptionModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php b/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php index e0354fe2..07caeb9a 100644 --- a/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionPatchRequestModel +class ProductTagOptionPatchRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The sort index of the option * @@ -34,6 +42,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -55,6 +64,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php b/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php index 86d4af48..874aa32f 100644 --- a/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php +++ b/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionPostRequestModel +class ProductTagOptionPostRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The sort index of the option * @@ -34,6 +42,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -55,6 +64,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php b/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php index 2408ac0f..561c4099 100644 --- a/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php +++ b/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagOptionPutRequestModel +class ProductTagOptionPutRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The sort index of the option * @@ -34,6 +42,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -55,6 +64,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagPatchRequestModel.php b/src/Api/Generated/Model/ProductTagPatchRequestModel.php index 050911c4..ce558f54 100644 --- a/src/Api/Generated/Model/ProductTagPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductTagPatchRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagPatchRequestModel +class ProductTagPatchRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag name * @@ -40,6 +48,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -61,6 +70,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -82,6 +92,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagPostRequestModel.php b/src/Api/Generated/Model/ProductTagPostRequestModel.php index af409883..33114722 100644 --- a/src/Api/Generated/Model/ProductTagPostRequestModel.php +++ b/src/Api/Generated/Model/ProductTagPostRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagPostRequestModel +class ProductTagPostRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag name * @@ -40,6 +48,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -61,6 +70,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -82,6 +92,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductTagPutRequestModel.php b/src/Api/Generated/Model/ProductTagPutRequestModel.php index e9021f79..673db51d 100644 --- a/src/Api/Generated/Model/ProductTagPutRequestModel.php +++ b/src/Api/Generated/Model/ProductTagPutRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductTagPutRequestModel +class ProductTagPutRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The tag name * @@ -40,6 +48,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -61,6 +70,7 @@ public function getType() : ?string */ public function setType(?string $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -82,6 +92,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductUnitLanguageModel.php b/src/Api/Generated/Model/ProductUnitLanguageModel.php index 818bc473..9d6e85a3 100644 --- a/src/Api/Generated/Model/ProductUnitLanguageModel.php +++ b/src/Api/Generated/Model/ProductUnitLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductUnitLanguageModel +class ProductUnitLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The language code for this language * @@ -40,6 +48,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -61,6 +70,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -82,6 +92,7 @@ public function getSymbol() : ?string */ public function setSymbol(?string $symbol) : self { + $this->initialized['symbol'] = true; $this->symbol = $symbol; return $this; } diff --git a/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php b/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php index 91ce29e8..394ea4ca 100644 --- a/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php +++ b/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductUnitLanguageModelCollection +class ProductUnitLanguageModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product unit languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductUnitModel.php b/src/Api/Generated/Model/ProductUnitModel.php index a3446ceb..41ff64a0 100644 --- a/src/Api/Generated/Model/ProductUnitModel.php +++ b/src/Api/Generated/Model/ProductUnitModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductUnitModel +class ProductUnitModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The units id * @@ -46,6 +54,7 @@ public function getUnitId() : ?int */ public function setUnitId(?int $unitId) : self { + $this->initialized['unitId'] = true; $this->unitId = $unitId; return $this; } @@ -67,6 +76,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -88,6 +98,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?ProductUnitLanguageModelCollection */ public function setLanguages(?ProductUnitLanguageModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductUnitModelCollection.php b/src/Api/Generated/Model/ProductUnitModelCollection.php index e7659f7e..af894b4b 100644 --- a/src/Api/Generated/Model/ProductUnitModelCollection.php +++ b/src/Api/Generated/Model/ProductUnitModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductUnitModelCollection +class ProductUnitModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product units * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductUnitModelItem.php b/src/Api/Generated/Model/ProductUnitModelItem.php index afb5eeaf..7a05cd54 100644 --- a/src/Api/Generated/Model/ProductUnitModelItem.php +++ b/src/Api/Generated/Model/ProductUnitModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductUnitModelItem +class ProductUnitModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductUnitModel */ public function setData(?ProductUnitModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductUnitModelUpdatable.php b/src/Api/Generated/Model/ProductUnitModelUpdatable.php index 59617e91..c73ccc85 100644 --- a/src/Api/Generated/Model/ProductUnitModelUpdatable.php +++ b/src/Api/Generated/Model/ProductUnitModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductUnitModelUpdatable +class ProductUnitModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The units id * @@ -46,6 +54,7 @@ public function getUnitId() : ?int */ public function setUnitId(?int $unitId) : self { + $this->initialized['unitId'] = true; $this->unitId = $unitId; return $this; } @@ -67,6 +76,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -88,6 +98,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php b/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php index 9d8a10fa..385380bd 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeLanguageModel +class ProductVariantAttributeLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeModel.php b/src/Api/Generated/Model/ProductVariantAttributeModel.php index 3d164806..597c3809 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeModel +class ProductVariantAttributeModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id for this attribute * @@ -46,6 +54,7 @@ public function getAttributeId() : ?int */ public function setAttributeId(?int $attributeId) : self { + $this->initialized['attributeId'] = true; $this->attributeId = $attributeId; return $this; } @@ -67,6 +76,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -88,6 +98,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?ProductVariantAttributeModelLanguages */ public function setLanguages(?ProductVariantAttributeModelLanguages $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php b/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php index 80ca70c6..4ac97b70 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeModelCollection +class ProductVariantAttributeModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of attribute values * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelItem.php b/src/Api/Generated/Model/ProductVariantAttributeModelItem.php index e0b9817c..0a4cdbe7 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelItem.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeModelItem +class ProductVariantAttributeModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVariantAttributeModel */ public function setData(?ProductVariantAttributeModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php b/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php index 5d850149..f81ee9f9 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeModelLanguages +class ProductVariantAttributeModelLanguages extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php index c6d16e6c..2f4aecab 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeModelUpdatable +class ProductVariantAttributeModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -46,6 +54,7 @@ public function getAttributeId() : ?int */ public function setAttributeId(?int $attributeId) : self { + $this->initialized['attributeId'] = true; $this->attributeId = $attributeId; return $this; } @@ -67,6 +76,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -88,6 +98,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -109,6 +120,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php index bbe558ca..4db59ecf 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeValueLanguageModel +class ProductVariantAttributeValueLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The langCode for this language. Supported language codes are: sv, en, ar, no, da, fi, de, fr, es * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php index 0bda37c3..2d7d7361 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeValueModel +class ProductVariantAttributeValueModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id for this attribute value * @@ -58,6 +66,7 @@ public function getAttributeValueId() : ?int */ public function setAttributeValueId(?int $attributeValueId) : self { + $this->initialized['attributeValueId'] = true; $this->attributeValueId = $attributeValueId; return $this; } @@ -79,6 +88,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -100,6 +110,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -121,6 +132,7 @@ public function getSkuSuffix() : ?string */ public function setSkuSuffix(?string $skuSuffix) : self { + $this->initialized['skuSuffix'] = true; $this->skuSuffix = $skuSuffix; return $this; } @@ -142,6 +154,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -163,6 +176,7 @@ public function getLanguages() : ?ProductVariantAttributeValueModelLanguages */ public function setLanguages(?ProductVariantAttributeValueModelLanguages $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php index ce56928e..d0665e06 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeValueModelCollection +class ProductVariantAttributeValueModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of attribute values * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php index fd2547ae..3db5be7e 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeValueModelItem +class ProductVariantAttributeValueModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVariantAttributeValueModel */ public function setData(?ProductVariantAttributeValueModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php index a448cf18..1895d298 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeValueModelLanguages +class ProductVariantAttributeValueModelLanguages extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php index 0f39e040..8c852980 100644 --- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php +++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantAttributeValueModelUpdatable +class ProductVariantAttributeValueModelUpdatable extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The external id of this pricelist * @@ -52,6 +60,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -73,6 +82,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -94,6 +104,7 @@ public function getSkuSuffix() : ?string */ public function setSkuSuffix(?string $skuSuffix) : self { + $this->initialized['skuSuffix'] = true; $this->skuSuffix = $skuSuffix; return $this; } @@ -115,6 +126,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -136,6 +148,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantModelCollection.php b/src/Api/Generated/Model/ProductVariantModelCollection.php index 16dbae9e..4acd6d54 100644 --- a/src/Api/Generated/Model/ProductVariantModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantModelCollection +class ProductVariantModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product variants * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantModelItem.php b/src/Api/Generated/Model/ProductVariantModelItem.php index 025fa2b7..af2bca1e 100644 --- a/src/Api/Generated/Model/ProductVariantModelItem.php +++ b/src/Api/Generated/Model/ProductVariantModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantModelItem +class ProductVariantModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVariantResponseModel */ public function setData(?ProductVariantResponseModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php index ca73f6b2..becf7d4d 100644 --- a/src/Api/Generated/Model/ProductVariantPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantPatchRequestModel +class ProductVariantPatchRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The product variants SKU (stock keeping unit) * @@ -106,6 +114,7 @@ public function getSku() : ?string */ public function setSku(?string $sku) : self { + $this->initialized['sku'] = true; $this->sku = $sku; return $this; } @@ -127,6 +136,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -148,6 +158,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -169,6 +180,7 @@ public function getIsActive() : ?bool */ public function setIsActive(?bool $isActive) : self { + $this->initialized['isActive'] = true; $this->isActive = $isActive; return $this; } @@ -190,6 +202,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -211,6 +224,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -232,6 +246,7 @@ public function getStockQuantity() : ?int */ public function setStockQuantity(?int $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } @@ -253,6 +268,7 @@ public function getWeightInKg() : ?float */ public function setWeightInKg(?float $weightInKg) : self { + $this->initialized['weightInKg'] = true; $this->weightInKg = $weightInKg; return $this; } @@ -274,6 +290,7 @@ public function getCostPrice() : ?string */ public function setCostPrice(?string $costPrice) : self { + $this->initialized['costPrice'] = true; $this->costPrice = $costPrice; return $this; } @@ -295,6 +312,7 @@ public function getEan() : ?string */ public function setEan(?string $ean) : self { + $this->initialized['ean'] = true; $this->ean = $ean; return $this; } @@ -316,6 +334,7 @@ public function getMpn() : ?string */ public function setMpn(?string $mpn) : self { + $this->initialized['mpn'] = true; $this->mpn = $mpn; return $this; } @@ -337,6 +356,7 @@ public function getImageFileId() : ?int */ public function setImageFileId(?int $imageFileId) : self { + $this->initialized['imageFileId'] = true; $this->imageFileId = $imageFileId; return $this; } @@ -358,6 +378,7 @@ public function getAttributeValueLinks() : ?array */ public function setAttributeValueLinks(?array $attributeValueLinks) : self { + $this->initialized['attributeValueLinks'] = true; $this->attributeValueLinks = $attributeValueLinks; return $this; } @@ -379,6 +400,7 @@ public function getVolumePricingInheritancePricelistIds() : ?array */ public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self { + $this->initialized['volumePricingInheritancePricelistIds'] = true; $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantPriceModel.php b/src/Api/Generated/Model/ProductVariantPriceModel.php index 84c4a855..66174b52 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModel.php +++ b/src/Api/Generated/Model/ProductVariantPriceModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantPriceModel +class ProductVariantPriceModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The pricelist this price is for * @@ -58,6 +66,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -79,6 +88,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -100,6 +110,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -121,6 +132,7 @@ public function getPriceExVat() : ?float */ public function setPriceExVat(?float $priceExVat) : self { + $this->initialized['priceExVat'] = true; $this->priceExVat = $priceExVat; return $this; } @@ -142,6 +154,7 @@ public function getSpecialPriceExVat() : ?float */ public function setSpecialPriceExVat(?float $specialPriceExVat) : self { + $this->initialized['specialPriceExVat'] = true; $this->specialPriceExVat = $specialPriceExVat; return $this; } @@ -163,6 +176,7 @@ public function getVolumePrices() : ?ProductVariantVolumePriceModelCollection */ public function setVolumePrices(?ProductVariantVolumePriceModelCollection $volumePrices) : self { + $this->initialized['volumePrices'] = true; $this->volumePrices = $volumePrices; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantPriceModelCollection.php b/src/Api/Generated/Model/ProductVariantPriceModelCollection.php index 71bb441b..034dc68b 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantPriceModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantPriceModelCollection +class ProductVariantPriceModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product variants * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantPriceModelItem.php b/src/Api/Generated/Model/ProductVariantPriceModelItem.php index 3bd4d436..96f4a5ba 100644 --- a/src/Api/Generated/Model/ProductVariantPriceModelItem.php +++ b/src/Api/Generated/Model/ProductVariantPriceModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantPriceModelItem +class ProductVariantPriceModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVariantPriceModel */ public function setData(?ProductVariantPriceModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantPutRequestModel.php b/src/Api/Generated/Model/ProductVariantPutRequestModel.php index 86a8deba..3a6f09a0 100644 --- a/src/Api/Generated/Model/ProductVariantPutRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantPutRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantPutRequestModel +class ProductVariantPutRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The product variants SKU (stock keeping unit) * @@ -106,6 +114,7 @@ public function getSku() : ?string */ public function setSku(?string $sku) : self { + $this->initialized['sku'] = true; $this->sku = $sku; return $this; } @@ -127,6 +136,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -148,6 +158,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -169,6 +180,7 @@ public function getIsActive() : ?bool */ public function setIsActive(?bool $isActive) : self { + $this->initialized['isActive'] = true; $this->isActive = $isActive; return $this; } @@ -190,6 +202,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -211,6 +224,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -232,6 +246,7 @@ public function getStockQuantity() : ?int */ public function setStockQuantity(?int $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } @@ -253,6 +268,7 @@ public function getWeightInKg() : ?float */ public function setWeightInKg(?float $weightInKg) : self { + $this->initialized['weightInKg'] = true; $this->weightInKg = $weightInKg; return $this; } @@ -274,6 +290,7 @@ public function getCostPrice() : ?string */ public function setCostPrice(?string $costPrice) : self { + $this->initialized['costPrice'] = true; $this->costPrice = $costPrice; return $this; } @@ -295,6 +312,7 @@ public function getEan() : ?string */ public function setEan(?string $ean) : self { + $this->initialized['ean'] = true; $this->ean = $ean; return $this; } @@ -316,6 +334,7 @@ public function getMpn() : ?string */ public function setMpn(?string $mpn) : self { + $this->initialized['mpn'] = true; $this->mpn = $mpn; return $this; } @@ -337,6 +356,7 @@ public function getImageFileId() : ?int */ public function setImageFileId(?int $imageFileId) : self { + $this->initialized['imageFileId'] = true; $this->imageFileId = $imageFileId; return $this; } @@ -358,6 +378,7 @@ public function getAttributeValueLinks() : ?array */ public function setAttributeValueLinks(?array $attributeValueLinks) : self { + $this->initialized['attributeValueLinks'] = true; $this->attributeValueLinks = $attributeValueLinks; return $this; } @@ -379,6 +400,7 @@ public function getVolumePricingInheritancePricelistIds() : ?array */ public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self { + $this->initialized['volumePricingInheritancePricelistIds'] = true; $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantRequestModel.php b/src/Api/Generated/Model/ProductVariantRequestModel.php index 5b4e4654..aa0ccdf4 100644 --- a/src/Api/Generated/Model/ProductVariantRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantRequestModel +class ProductVariantRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The product variants SKU (stock keeping unit) * @@ -106,6 +114,7 @@ public function getSku() : ?string */ public function setSku(?string $sku) : self { + $this->initialized['sku'] = true; $this->sku = $sku; return $this; } @@ -127,6 +136,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -148,6 +158,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -169,6 +180,7 @@ public function getIsActive() : ?bool */ public function setIsActive(?bool $isActive) : self { + $this->initialized['isActive'] = true; $this->isActive = $isActive; return $this; } @@ -190,6 +202,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -211,6 +224,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -232,6 +246,7 @@ public function getStockQuantity() : ?int */ public function setStockQuantity(?int $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } @@ -253,6 +268,7 @@ public function getWeightInKg() : ?float */ public function setWeightInKg(?float $weightInKg) : self { + $this->initialized['weightInKg'] = true; $this->weightInKg = $weightInKg; return $this; } @@ -274,6 +290,7 @@ public function getCostPrice() : ?string */ public function setCostPrice(?string $costPrice) : self { + $this->initialized['costPrice'] = true; $this->costPrice = $costPrice; return $this; } @@ -295,6 +312,7 @@ public function getEan() : ?string */ public function setEan(?string $ean) : self { + $this->initialized['ean'] = true; $this->ean = $ean; return $this; } @@ -316,6 +334,7 @@ public function getMpn() : ?string */ public function setMpn(?string $mpn) : self { + $this->initialized['mpn'] = true; $this->mpn = $mpn; return $this; } @@ -337,6 +356,7 @@ public function getImageFileId() : ?int */ public function setImageFileId(?int $imageFileId) : self { + $this->initialized['imageFileId'] = true; $this->imageFileId = $imageFileId; return $this; } @@ -358,6 +378,7 @@ public function getAttributeValueLinks() : ?array */ public function setAttributeValueLinks(?array $attributeValueLinks) : self { + $this->initialized['attributeValueLinks'] = true; $this->attributeValueLinks = $attributeValueLinks; return $this; } @@ -379,6 +400,7 @@ public function getVolumePricingInheritancePricelistIds() : ?array */ public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self { + $this->initialized['volumePricingInheritancePricelistIds'] = true; $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantResponseModel.php b/src/Api/Generated/Model/ProductVariantResponseModel.php index 845c4319..b587ca31 100644 --- a/src/Api/Generated/Model/ProductVariantResponseModel.php +++ b/src/Api/Generated/Model/ProductVariantResponseModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantResponseModel +class ProductVariantResponseModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The product variants SKU (stock keeping unit) * @@ -124,6 +132,7 @@ public function getSku() : ?string */ public function setSku(?string $sku) : self { + $this->initialized['sku'] = true; $this->sku = $sku; return $this; } @@ -145,6 +154,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -166,6 +176,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -187,6 +198,7 @@ public function getIsActive() : ?bool */ public function setIsActive(?bool $isActive) : self { + $this->initialized['isActive'] = true; $this->isActive = $isActive; return $this; } @@ -208,6 +220,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -229,6 +242,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -250,6 +264,7 @@ public function getStockQuantity() : ?int */ public function setStockQuantity(?int $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } @@ -271,6 +286,7 @@ public function getWeightInKg() : ?float */ public function setWeightInKg(?float $weightInKg) : self { + $this->initialized['weightInKg'] = true; $this->weightInKg = $weightInKg; return $this; } @@ -292,6 +308,7 @@ public function getCostPrice() : ?string */ public function setCostPrice(?string $costPrice) : self { + $this->initialized['costPrice'] = true; $this->costPrice = $costPrice; return $this; } @@ -313,6 +330,7 @@ public function getEan() : ?string */ public function setEan(?string $ean) : self { + $this->initialized['ean'] = true; $this->ean = $ean; return $this; } @@ -334,6 +352,7 @@ public function getMpn() : ?string */ public function setMpn(?string $mpn) : self { + $this->initialized['mpn'] = true; $this->mpn = $mpn; return $this; } @@ -355,6 +374,7 @@ public function getImageFileId() : ?int */ public function setImageFileId(?int $imageFileId) : self { + $this->initialized['imageFileId'] = true; $this->imageFileId = $imageFileId; return $this; } @@ -376,6 +396,7 @@ public function getAttributeValueLinks() : ?array */ public function setAttributeValueLinks(?array $attributeValueLinks) : self { + $this->initialized['attributeValueLinks'] = true; $this->attributeValueLinks = $attributeValueLinks; return $this; } @@ -397,6 +418,7 @@ public function getVolumePricingInheritancePricelistIds() : ?array */ public function setVolumePricingInheritancePricelistIds(?array $volumePricingInheritancePricelistIds) : self { + $this->initialized['volumePricingInheritancePricelistIds'] = true; $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds; return $this; } @@ -418,6 +440,7 @@ public function getVariantId() : ?int */ public function setVariantId(?int $variantId) : self { + $this->initialized['variantId'] = true; $this->variantId = $variantId; return $this; } @@ -439,6 +462,7 @@ public function getPrices() : ?array */ public function setPrices(?array $prices) : self { + $this->initialized['prices'] = true; $this->prices = $prices; return $this; } @@ -460,6 +484,7 @@ public function getAttributeValues() : ?array */ public function setAttributeValues(?array $attributeValues) : self { + $this->initialized['attributeValues'] = true; $this->attributeValues = $attributeValues; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantStockModelCollection.php b/src/Api/Generated/Model/ProductVariantStockModelCollection.php index 696437ef..d865a754 100644 --- a/src/Api/Generated/Model/ProductVariantStockModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantStockModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantStockModelCollection +class ProductVariantStockModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product variant stocks * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantStockModelItem.php b/src/Api/Generated/Model/ProductVariantStockModelItem.php index f2756f5c..fe495e79 100644 --- a/src/Api/Generated/Model/ProductVariantStockModelItem.php +++ b/src/Api/Generated/Model/ProductVariantStockModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantStockModelItem +class ProductVariantStockModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVariantStockResponseModel */ public function setData(?ProductVariantStockResponseModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php index 5dca357f..ad22772e 100644 --- a/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantStockPatchRequestModel +class ProductVariantStockPatchRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The stock status id. If you do not provide this value, the stock status will be changed according to the status settings, otherwise the status will be overriden by the new value, no further status actions will be applied. See [product stock statuses](#tag/Product-Stock-Statuses) * @@ -34,6 +42,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -55,6 +64,7 @@ public function getStockQuantity() : ?float */ public function setStockQuantity(?float $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php b/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php index 7029bfcb..b4fa421d 100644 --- a/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php +++ b/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantStockPutRequestModel +class ProductVariantStockPutRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The stock status id. See [product stock statuses](#tag/Product-Stock-Statuses) * @@ -34,6 +42,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -55,6 +64,7 @@ public function getStockQuantity() : ?float */ public function setStockQuantity(?float $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantStockResponseModel.php b/src/Api/Generated/Model/ProductVariantStockResponseModel.php index e81ce11c..7a63aff1 100644 --- a/src/Api/Generated/Model/ProductVariantStockResponseModel.php +++ b/src/Api/Generated/Model/ProductVariantStockResponseModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantStockResponseModel +class ProductVariantStockResponseModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The stock location id status id. See [stock locations](#tag/Stock-Locations) * @@ -40,6 +48,7 @@ public function getStockLocationId() : ?int */ public function setStockLocationId(?int $stockLocationId) : self { + $this->initialized['stockLocationId'] = true; $this->stockLocationId = $stockLocationId; return $this; } @@ -61,6 +70,7 @@ public function getStockStatusId() : ?int */ public function setStockStatusId(?int $stockStatusId) : self { + $this->initialized['stockStatusId'] = true; $this->stockStatusId = $stockStatusId; return $this; } @@ -82,6 +92,7 @@ public function getStockQuantity() : ?float */ public function setStockQuantity(?float $stockQuantity) : self { + $this->initialized['stockQuantity'] = true; $this->stockQuantity = $stockQuantity; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php index 78548b90..757bb697 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantVolumePriceModel +class ProductVariantVolumePriceModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The pricelist this price is for * @@ -52,6 +60,7 @@ public function getPricelistId() : ?int */ public function setPricelistId(?int $pricelistId) : self { + $this->initialized['pricelistId'] = true; $this->pricelistId = $pricelistId; return $this; } @@ -73,6 +82,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -94,6 +104,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -115,6 +126,7 @@ public function getPriceExVat() : ?float */ public function setPriceExVat(?float $priceExVat) : self { + $this->initialized['priceExVat'] = true; $this->priceExVat = $priceExVat; return $this; } @@ -136,6 +148,7 @@ public function getQuantity() : ?float */ public function setQuantity(?float $quantity) : self { + $this->initialized['quantity'] = true; $this->quantity = $quantity; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php b/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php index 9d0379d9..fe5f41ce 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantVolumePriceModelCollection +class ProductVariantVolumePriceModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of variant volume prices * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php b/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php index 85c9f5de..723c728d 100644 --- a/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php +++ b/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVariantVolumePriceModelItem +class ProductVariantVolumePriceModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVariantVolumePriceModel */ public function setData(?ProductVariantVolumePriceModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVatRateModel.php b/src/Api/Generated/Model/ProductVatRateModel.php index 37e414b9..371fc9ae 100644 --- a/src/Api/Generated/Model/ProductVatRateModel.php +++ b/src/Api/Generated/Model/ProductVatRateModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVatRateModel +class ProductVatRateModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The country code this vat rate should be valid for. The country code should be set using ISO 3166-1 alpha-2 * @@ -34,6 +42,7 @@ public function getCountryCode() : ?string */ public function setCountryCode(?string $countryCode) : self { + $this->initialized['countryCode'] = true; $this->countryCode = $countryCode; return $this; } @@ -55,6 +64,7 @@ public function getVatRate() : ?float */ public function setVatRate(?float $vatRate) : self { + $this->initialized['vatRate'] = true; $this->vatRate = $vatRate; return $this; } diff --git a/src/Api/Generated/Model/ProductVatRateModelCollection.php b/src/Api/Generated/Model/ProductVatRateModelCollection.php index 47904685..5d13d673 100644 --- a/src/Api/Generated/Model/ProductVatRateModelCollection.php +++ b/src/Api/Generated/Model/ProductVatRateModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVatRateModelCollection +class ProductVatRateModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of product vat rates * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductVatRateModelItem.php b/src/Api/Generated/Model/ProductVatRateModelItem.php index 7331fccf..2997302b 100644 --- a/src/Api/Generated/Model/ProductVatRateModelItem.php +++ b/src/Api/Generated/Model/ProductVatRateModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductVatRateModelItem +class ProductVatRateModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ProductVatRateModel */ public function setData(?ProductVatRateModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ProductsAttributesModelItem.php b/src/Api/Generated/Model/ProductsAttributesModelItem.php index ad76ef4e..bf155894 100644 --- a/src/Api/Generated/Model/ProductsAttributesModelItem.php +++ b/src/Api/Generated/Model/ProductsAttributesModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ProductsAttributesModelItem +class ProductsAttributesModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id for this attribute * @@ -28,6 +36,7 @@ public function getAttributeId() : ?int */ public function setAttributeId(?int $attributeId) : self { + $this->initialized['attributeId'] = true; $this->attributeId = $attributeId; return $this; } diff --git a/src/Api/Generated/Model/ShippingMethodLanguageModel.php b/src/Api/Generated/Model/ShippingMethodLanguageModel.php index d27880a6..c1da21eb 100644 --- a/src/Api/Generated/Model/ShippingMethodLanguageModel.php +++ b/src/Api/Generated/Model/ShippingMethodLanguageModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingMethodLanguageModel +class ShippingMethodLanguageModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language code * @@ -46,6 +54,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -67,6 +76,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -88,6 +98,7 @@ public function getTitle() : ?string */ public function setTitle(?string $title) : self { + $this->initialized['title'] = true; $this->title = $title; return $this; } @@ -109,6 +120,7 @@ public function getShortDescription() : ?string */ public function setShortDescription(?string $shortDescription) : self { + $this->initialized['shortDescription'] = true; $this->shortDescription = $shortDescription; return $this; } diff --git a/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php b/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php index 771c6ec5..1326b888 100644 --- a/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php +++ b/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingMethodLanguageModelCollection +class ShippingMethodLanguageModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of shipping method languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ShippingMethodModel.php b/src/Api/Generated/Model/ShippingMethodModel.php index 0fe3e51d..65f49bca 100644 --- a/src/Api/Generated/Model/ShippingMethodModel.php +++ b/src/Api/Generated/Model/ShippingMethodModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingMethodModel +class ShippingMethodModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The shipping methods Id * @@ -106,6 +114,7 @@ public function getShippingMethodId() : ?int */ public function setShippingMethodId(?int $shippingMethodId) : self { + $this->initialized['shippingMethodId'] = true; $this->shippingMethodId = $shippingMethodId; return $this; } @@ -127,6 +136,7 @@ public function getActive() : ?bool */ public function setActive(?bool $active) : self { + $this->initialized['active'] = true; $this->active = $active; return $this; } @@ -148,6 +158,7 @@ public function getValidForCountries() : ?string */ public function setValidForCountries(?string $validForCountries) : self { + $this->initialized['validForCountries'] = true; $this->validForCountries = $validForCountries; return $this; } @@ -169,6 +180,7 @@ public function getValidCountriesSelected() : ?array */ public function setValidCountriesSelected(?array $validCountriesSelected) : self { + $this->initialized['validCountriesSelected'] = true; $this->validCountriesSelected = $validCountriesSelected; return $this; } @@ -190,6 +202,7 @@ public function getValidForMinItemsSubtotal() : ?float */ public function setValidForMinItemsSubtotal(?float $validForMinItemsSubtotal) : self { + $this->initialized['validForMinItemsSubtotal'] = true; $this->validForMinItemsSubtotal = $validForMinItemsSubtotal; return $this; } @@ -211,6 +224,7 @@ public function getValidForMaxItemsSubtotal() : ?float */ public function setValidForMaxItemsSubtotal(?float $validForMaxItemsSubtotal) : self { + $this->initialized['validForMaxItemsSubtotal'] = true; $this->validForMaxItemsSubtotal = $validForMaxItemsSubtotal; return $this; } @@ -232,6 +246,7 @@ public function getValidForMinWeight() : ?float */ public function setValidForMinWeight(?float $validForMinWeight) : self { + $this->initialized['validForMinWeight'] = true; $this->validForMinWeight = $validForMinWeight; return $this; } @@ -253,6 +268,7 @@ public function getValidForMaxWeight() : ?float */ public function setValidForMaxWeight(?float $validForMaxWeight) : self { + $this->initialized['validForMaxWeight'] = true; $this->validForMaxWeight = $validForMaxWeight; return $this; } @@ -274,6 +290,7 @@ public function getValidForCustomerType() : ?string */ public function setValidForCustomerType(?string $validForCustomerType) : self { + $this->initialized['validForCustomerType'] = true; $this->validForCustomerType = $validForCustomerType; return $this; } @@ -295,6 +312,7 @@ public function getFreeShippingMinItemsSubtotal() : ?float */ public function setFreeShippingMinItemsSubtotal(?float $freeShippingMinItemsSubtotal) : self { + $this->initialized['freeShippingMinItemsSubtotal'] = true; $this->freeShippingMinItemsSubtotal = $freeShippingMinItemsSubtotal; return $this; } @@ -316,6 +334,7 @@ public function getFreeShippingMinWeight() : ?float */ public function setFreeShippingMinWeight(?float $freeShippingMinWeight) : self { + $this->initialized['freeShippingMinWeight'] = true; $this->freeShippingMinWeight = $freeShippingMinWeight; return $this; } @@ -337,6 +356,7 @@ public function getIsClickAndCollect() : ?bool */ public function setIsClickAndCollect(?bool $isClickAndCollect) : self { + $this->initialized['isClickAndCollect'] = true; $this->isClickAndCollect = $isClickAndCollect; return $this; } @@ -358,6 +378,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -379,6 +400,7 @@ public function getLanguages() : ?ShippingMethodLanguageModelCollection */ public function setLanguages(?ShippingMethodLanguageModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/ShippingMethodModelCollection.php b/src/Api/Generated/Model/ShippingMethodModelCollection.php index ffba5ae0..5c682bcc 100644 --- a/src/Api/Generated/Model/ShippingMethodModelCollection.php +++ b/src/Api/Generated/Model/ShippingMethodModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingMethodModelCollection +class ShippingMethodModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of shipping methods * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ShippingMethodModelItem.php b/src/Api/Generated/Model/ShippingMethodModelItem.php index 3be252ce..6774c6e5 100644 --- a/src/Api/Generated/Model/ShippingMethodModelItem.php +++ b/src/Api/Generated/Model/ShippingMethodModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingMethodModelItem +class ShippingMethodModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ShippingMethodModel */ public function setData(?ShippingMethodModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ShippingTrackingTypeModel.php b/src/Api/Generated/Model/ShippingTrackingTypeModel.php index 64767171..9dea3c71 100644 --- a/src/Api/Generated/Model/ShippingTrackingTypeModel.php +++ b/src/Api/Generated/Model/ShippingTrackingTypeModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingTrackingTypeModel +class ShippingTrackingTypeModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The shipping tracking type ID * @@ -34,6 +42,7 @@ public function getType() : ?int */ public function setType(?int $type) : self { + $this->initialized['type'] = true; $this->type = $type; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php b/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php index a28797ef..eb0766f0 100644 --- a/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php +++ b/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShippingTrackingTypeModelCollection +class ShippingTrackingTypeModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of shipping tracking types * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ShopItem.php b/src/Api/Generated/Model/ShopItem.php index c99d222f..6608f11f 100644 --- a/src/Api/Generated/Model/ShopItem.php +++ b/src/Api/Generated/Model/ShopItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShopItem +class ShopItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?ShopModel */ public function setData(?ShopModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/ShopModel.php b/src/Api/Generated/Model/ShopModel.php index 78b6ae9c..95b5c3ff 100644 --- a/src/Api/Generated/Model/ShopModel.php +++ b/src/Api/Generated/Model/ShopModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class ShopModel +class ShopModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The shop name * @@ -118,6 +126,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -139,6 +148,7 @@ public function getIdCode() : ?string */ public function setIdCode(?string $idCode) : self { + $this->initialized['idCode'] = true; $this->idCode = $idCode; return $this; } @@ -160,6 +170,7 @@ public function getStatus() : ?string */ public function setStatus(?string $status) : self { + $this->initialized['status'] = true; $this->status = $status; return $this; } @@ -181,6 +192,7 @@ public function getDefaultLangCode() : ?string */ public function setDefaultLangCode(?string $defaultLangCode) : self { + $this->initialized['defaultLangCode'] = true; $this->defaultLangCode = $defaultLangCode; return $this; } @@ -202,6 +214,7 @@ public function getActiveLangCodes() : ?array */ public function setActiveLangCodes(?array $activeLangCodes) : self { + $this->initialized['activeLangCodes'] = true; $this->activeLangCodes = $activeLangCodes; return $this; } @@ -223,6 +236,7 @@ public function getBaseCurrency() : ?string */ public function setBaseCurrency(?string $baseCurrency) : self { + $this->initialized['baseCurrency'] = true; $this->baseCurrency = $baseCurrency; return $this; } @@ -244,6 +258,7 @@ public function getDefaultCustomerCountryCode() : ?string */ public function setDefaultCustomerCountryCode(?string $defaultCustomerCountryCode) : self { + $this->initialized['defaultCustomerCountryCode'] = true; $this->defaultCustomerCountryCode = $defaultCustomerCountryCode; return $this; } @@ -265,6 +280,7 @@ public function getGeneralDefaultVatRate() : ?float */ public function setGeneralDefaultVatRate(?float $generalDefaultVatRate) : self { + $this->initialized['generalDefaultVatRate'] = true; $this->generalDefaultVatRate = $generalDefaultVatRate; return $this; } @@ -286,6 +302,7 @@ public function getShopCompanyName() : ?string */ public function setShopCompanyName(?string $shopCompanyName) : self { + $this->initialized['shopCompanyName'] = true; $this->shopCompanyName = $shopCompanyName; return $this; } @@ -307,6 +324,7 @@ public function getShopAddress() : ?string */ public function setShopAddress(?string $shopAddress) : self { + $this->initialized['shopAddress'] = true; $this->shopAddress = $shopAddress; return $this; } @@ -328,6 +346,7 @@ public function getShopPostalCode() : ?string */ public function setShopPostalCode(?string $shopPostalCode) : self { + $this->initialized['shopPostalCode'] = true; $this->shopPostalCode = $shopPostalCode; return $this; } @@ -349,6 +368,7 @@ public function getShopCity() : ?string */ public function setShopCity(?string $shopCity) : self { + $this->initialized['shopCity'] = true; $this->shopCity = $shopCity; return $this; } @@ -370,6 +390,7 @@ public function getShopOrgNo() : ?string */ public function setShopOrgNo(?string $shopOrgNo) : self { + $this->initialized['shopOrgNo'] = true; $this->shopOrgNo = $shopOrgNo; return $this; } @@ -391,6 +412,7 @@ public function getShopPhoneNo() : ?string */ public function setShopPhoneNo(?string $shopPhoneNo) : self { + $this->initialized['shopPhoneNo'] = true; $this->shopPhoneNo = $shopPhoneNo; return $this; } @@ -412,6 +434,7 @@ public function getShopVatNo() : ?string */ public function setShopVatNo(?string $shopVatNo) : self { + $this->initialized['shopVatNo'] = true; $this->shopVatNo = $shopVatNo; return $this; } @@ -433,6 +456,7 @@ public function getShopCountryCode() : ?string */ public function setShopCountryCode(?string $shopCountryCode) : self { + $this->initialized['shopCountryCode'] = true; $this->shopCountryCode = $shopCountryCode; return $this; } diff --git a/src/Api/Generated/Model/StockLocationLanguagesModel.php b/src/Api/Generated/Model/StockLocationLanguagesModel.php index b65c6323..7fbb33c6 100644 --- a/src/Api/Generated/Model/StockLocationLanguagesModel.php +++ b/src/Api/Generated/Model/StockLocationLanguagesModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationLanguagesModel +class StockLocationLanguagesModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * Language Code (ISO 639-1) for this translation. Has to be a valid lang code that the shop supports. (required) * @@ -34,6 +42,7 @@ public function getLangCode() : ?string */ public function setLangCode(?string $langCode) : self { + $this->initialized['langCode'] = true; $this->langCode = $langCode; return $this; } @@ -55,6 +64,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } diff --git a/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php b/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php index 337b3155..58220378 100644 --- a/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php +++ b/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationLanguagesModelCollection +class StockLocationLanguagesModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of category languages * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/StockLocationModel.php b/src/Api/Generated/Model/StockLocationModel.php index 499d7bfb..fbf8446a 100644 --- a/src/Api/Generated/Model/StockLocationModel.php +++ b/src/Api/Generated/Model/StockLocationModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationModel +class StockLocationModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The stock location Id * @@ -64,6 +72,7 @@ public function getStockLocationId() : ?int */ public function setStockLocationId(?int $stockLocationId) : self { + $this->initialized['stockLocationId'] = true; $this->stockLocationId = $stockLocationId; return $this; } @@ -85,6 +94,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -106,6 +116,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -127,6 +138,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -148,6 +160,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -169,6 +182,7 @@ public function getEcommerceStockLocation() : ?bool */ public function setEcommerceStockLocation(?bool $ecommerceStockLocation) : self { + $this->initialized['ecommerceStockLocation'] = true; $this->ecommerceStockLocation = $ecommerceStockLocation; return $this; } @@ -190,6 +204,7 @@ public function getLanguages() : ?StockLocationLanguagesModelCollection */ public function setLanguages(?StockLocationLanguagesModelCollection $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/StockLocationModelCollection.php b/src/Api/Generated/Model/StockLocationModelCollection.php index 410f5dd0..8613391f 100644 --- a/src/Api/Generated/Model/StockLocationModelCollection.php +++ b/src/Api/Generated/Model/StockLocationModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationModelCollection +class StockLocationModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of stock locations * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/StockLocationModelItem.php b/src/Api/Generated/Model/StockLocationModelItem.php index a1aced4d..a634b1aa 100644 --- a/src/Api/Generated/Model/StockLocationModelItem.php +++ b/src/Api/Generated/Model/StockLocationModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationModelItem +class StockLocationModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?StockLocationModel */ public function setData(?StockLocationModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/StockLocationPostRequestModel.php b/src/Api/Generated/Model/StockLocationPostRequestModel.php index e308f49e..52268657 100644 --- a/src/Api/Generated/Model/StockLocationPostRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationPostRequestModel +class StockLocationPostRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The external id of this pricelist * @@ -58,6 +66,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -79,6 +88,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -100,6 +110,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -121,6 +132,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -142,6 +154,7 @@ public function getEcommerceStockLocation() : ?bool */ public function setEcommerceStockLocation(?bool $ecommerceStockLocation) : self { + $this->initialized['ecommerceStockLocation'] = true; $this->ecommerceStockLocation = $ecommerceStockLocation; return $this; } @@ -163,6 +176,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/StockLocationPutRequestModel.php b/src/Api/Generated/Model/StockLocationPutRequestModel.php index bfa03cb3..b58a66db 100644 --- a/src/Api/Generated/Model/StockLocationPutRequestModel.php +++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class StockLocationPutRequestModel +class StockLocationPutRequestModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The external id of this pricelist * @@ -58,6 +66,7 @@ public function getExternalId() : ?string */ public function setExternalId(?string $externalId) : self { + $this->initialized['externalId'] = true; $this->externalId = $externalId; return $this; } @@ -79,6 +88,7 @@ public function getExternalIdType() : ?string */ public function setExternalIdType(?string $externalIdType) : self { + $this->initialized['externalIdType'] = true; $this->externalIdType = $externalIdType; return $this; } @@ -100,6 +110,7 @@ public function getVisibility() : ?string */ public function setVisibility(?string $visibility) : self { + $this->initialized['visibility'] = true; $this->visibility = $visibility; return $this; } @@ -121,6 +132,7 @@ public function getSortIndex() : ?int */ public function setSortIndex(?int $sortIndex) : self { + $this->initialized['sortIndex'] = true; $this->sortIndex = $sortIndex; return $this; } @@ -142,6 +154,7 @@ public function getEcommerceStockLocation() : ?bool */ public function setEcommerceStockLocation(?bool $ecommerceStockLocation) : self { + $this->initialized['ecommerceStockLocation'] = true; $this->ecommerceStockLocation = $ecommerceStockLocation; return $this; } @@ -163,6 +176,7 @@ public function getLanguages() : ?array */ public function setLanguages(?array $languages) : self { + $this->initialized['languages'] = true; $this->languages = $languages; return $this; } diff --git a/src/Api/Generated/Model/TokenModel.php b/src/Api/Generated/Model/TokenModel.php index d39d2901..309b4c95 100644 --- a/src/Api/Generated/Model/TokenModel.php +++ b/src/Api/Generated/Model/TokenModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class TokenModel +class TokenModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The Access Token to use in future requests * @@ -40,6 +48,7 @@ public function getAccessToken() : ?string */ public function setAccessToken(?string $accessToken) : self { + $this->initialized['accessToken'] = true; $this->accessToken = $accessToken; return $this; } @@ -61,6 +70,7 @@ public function getScope() : ?string */ public function setScope(?string $scope) : self { + $this->initialized['scope'] = true; $this->scope = $scope; return $this; } @@ -82,6 +92,7 @@ public function getExpiresIn() : ?int */ public function setExpiresIn(?int $expiresIn) : self { + $this->initialized['expiresIn'] = true; $this->expiresIn = $expiresIn; return $this; } diff --git a/src/Api/Generated/Model/VatRateModel.php b/src/Api/Generated/Model/VatRateModel.php index dcb3fa50..3bfdbdcd 100644 --- a/src/Api/Generated/Model/VatRateModel.php +++ b/src/Api/Generated/Model/VatRateModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class VatRateModel +class VatRateModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The country code this vat rates should be valid for. The country code should be set using ISO 3166-1 alpha-2 * @@ -52,6 +60,7 @@ public function getCountryCode() : ?string */ public function setCountryCode(?string $countryCode) : self { + $this->initialized['countryCode'] = true; $this->countryCode = $countryCode; return $this; } @@ -73,6 +82,7 @@ public function getDefaultVatRate() : ?float */ public function setDefaultVatRate(?float $defaultVatRate) : self { + $this->initialized['defaultVatRate'] = true; $this->defaultVatRate = $defaultVatRate; return $this; } @@ -94,6 +104,7 @@ public function getFixedOrderPaymentVatRate() : ?float */ public function setFixedOrderPaymentVatRate(?float $fixedOrderPaymentVatRate) : self { + $this->initialized['fixedOrderPaymentVatRate'] = true; $this->fixedOrderPaymentVatRate = $fixedOrderPaymentVatRate; return $this; } @@ -115,6 +126,7 @@ public function getFixedOrderShippingVatRate() : ?float */ public function setFixedOrderShippingVatRate(?float $fixedOrderShippingVatRate) : self { + $this->initialized['fixedOrderShippingVatRate'] = true; $this->fixedOrderShippingVatRate = $fixedOrderShippingVatRate; return $this; } @@ -136,6 +148,7 @@ public function getFixedOrderDiscountVatRate() : ?float */ public function setFixedOrderDiscountVatRate(?float $fixedOrderDiscountVatRate) : self { + $this->initialized['fixedOrderDiscountVatRate'] = true; $this->fixedOrderDiscountVatRate = $fixedOrderDiscountVatRate; return $this; } diff --git a/src/Api/Generated/Model/VatRateModelCollection.php b/src/Api/Generated/Model/VatRateModelCollection.php index 18ac35bb..2e1d7887 100644 --- a/src/Api/Generated/Model/VatRateModelCollection.php +++ b/src/Api/Generated/Model/VatRateModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class VatRateModelCollection +class VatRateModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A collection of country vat rates * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/VatRateModelItem.php b/src/Api/Generated/Model/VatRateModelItem.php index 39f1fa86..1fe6189f 100644 --- a/src/Api/Generated/Model/VatRateModelItem.php +++ b/src/Api/Generated/Model/VatRateModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class VatRateModelItem +class VatRateModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?VatRateModel */ public function setData(?VatRateModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/WebHookModel.php b/src/Api/Generated/Model/WebHookModel.php index 3d5ffd84..141b3b09 100644 --- a/src/Api/Generated/Model/WebHookModel.php +++ b/src/Api/Generated/Model/WebHookModel.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class WebHookModel +class WebHookModel extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * The id of the web hook * @@ -52,6 +60,7 @@ public function getWebHookId() : ?int */ public function setWebHookId(?int $webHookId) : self { + $this->initialized['webHookId'] = true; $this->webHookId = $webHookId; return $this; } @@ -73,6 +82,7 @@ public function getName() : ?string */ public function setName(?string $name) : self { + $this->initialized['name'] = true; $this->name = $name; return $this; } @@ -94,6 +104,7 @@ public function getEvent() : ?string */ public function setEvent(?string $event) : self { + $this->initialized['event'] = true; $this->event = $event; return $this; } @@ -115,6 +126,7 @@ public function getStatusId() : ?int */ public function setStatusId(?int $statusId) : self { + $this->initialized['statusId'] = true; $this->statusId = $statusId; return $this; } @@ -136,6 +148,7 @@ public function getUrl() : ?string */ public function setUrl(?string $url) : self { + $this->initialized['url'] = true; $this->url = $url; return $this; } diff --git a/src/Api/Generated/Model/WebHookModelCollection.php b/src/Api/Generated/Model/WebHookModelCollection.php index 4a72052d..84bfd092 100644 --- a/src/Api/Generated/Model/WebHookModelCollection.php +++ b/src/Api/Generated/Model/WebHookModelCollection.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class WebHookModelCollection +class WebHookModelCollection extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * A list of web hooks * @@ -28,6 +36,7 @@ public function getData() : ?array */ public function setData(?array $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Model/WebHookModelItem.php b/src/Api/Generated/Model/WebHookModelItem.php index 8de43ba2..b52eb9a6 100644 --- a/src/Api/Generated/Model/WebHookModelItem.php +++ b/src/Api/Generated/Model/WebHookModelItem.php @@ -2,8 +2,16 @@ namespace Starweb\Api\Generated\Model; -class WebHookModelItem +class WebHookModelItem extends \ArrayObject { + /** + * @var array + */ + protected $initialized = array(); + public function isInitialized($property) : bool + { + return array_key_exists($property, $this->initialized); + } /** * * @@ -28,6 +36,7 @@ public function getData() : ?WebHookModel */ public function setData(?WebHookModel $data) : self { + $this->initialized['data'] = true; $this->data = $data; return $this; } diff --git a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php index 10bc7b8c..ec3a246b 100644 --- a/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class AddressModelItemNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\AddressModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\AddressModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\AddressModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/AddressModelNormalizer.php b/src/Api/Generated/Normalizer/AddressModelNormalizer.php index b3b8ec38..c526d996 100644 --- a/src/Api/Generated/Normalizer/AddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/AddressModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,103 +16,183 @@ class AddressModelNormalizer implements DenormalizerInterface, NormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\AddressModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\AddressModel(); - if (property_exists($data, 'companyName') && $data->{'companyName'} !== null) { - $object->setCompanyName($data->{'companyName'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('companyName', $data) && $data['companyName'] !== null) { + $object->setCompanyName($data['companyName']); + unset($data['companyName']); + } + elseif (\array_key_exists('companyName', $data) && $data['companyName'] === null) { + $object->setCompanyName(null); + } + if (\array_key_exists('firstName', $data) && $data['firstName'] !== null) { + $object->setFirstName($data['firstName']); + unset($data['firstName']); + } + elseif (\array_key_exists('firstName', $data) && $data['firstName'] === null) { + $object->setFirstName(null); + } + if (\array_key_exists('lastName', $data) && $data['lastName'] !== null) { + $object->setLastName($data['lastName']); + unset($data['lastName']); + } + elseif (\array_key_exists('lastName', $data) && $data['lastName'] === null) { + $object->setLastName(null); + } + if (\array_key_exists('careOf', $data) && $data['careOf'] !== null) { + $object->setCareOf($data['careOf']); + unset($data['careOf']); + } + elseif (\array_key_exists('careOf', $data) && $data['careOf'] === null) { + $object->setCareOf(null); + } + if (\array_key_exists('attention', $data) && $data['attention'] !== null) { + $object->setAttention($data['attention']); + unset($data['attention']); } - if (property_exists($data, 'firstName') && $data->{'firstName'} !== null) { - $object->setFirstName($data->{'firstName'}); + elseif (\array_key_exists('attention', $data) && $data['attention'] === null) { + $object->setAttention(null); } - if (property_exists($data, 'lastName') && $data->{'lastName'} !== null) { - $object->setLastName($data->{'lastName'}); + if (\array_key_exists('reference', $data) && $data['reference'] !== null) { + $object->setReference($data['reference']); + unset($data['reference']); } - if (property_exists($data, 'careOf') && $data->{'careOf'} !== null) { - $object->setCareOf($data->{'careOf'}); + elseif (\array_key_exists('reference', $data) && $data['reference'] === null) { + $object->setReference(null); } - if (property_exists($data, 'attention') && $data->{'attention'} !== null) { - $object->setAttention($data->{'attention'}); + if (\array_key_exists('address', $data) && $data['address'] !== null) { + $object->setAddress($data['address']); + unset($data['address']); } - if (property_exists($data, 'reference') && $data->{'reference'} !== null) { - $object->setReference($data->{'reference'}); + elseif (\array_key_exists('address', $data) && $data['address'] === null) { + $object->setAddress(null); } - if (property_exists($data, 'address') && $data->{'address'} !== null) { - $object->setAddress($data->{'address'}); + if (\array_key_exists('postalCode', $data) && $data['postalCode'] !== null) { + $object->setPostalCode($data['postalCode']); + unset($data['postalCode']); } - if (property_exists($data, 'postalCode') && $data->{'postalCode'} !== null) { - $object->setPostalCode($data->{'postalCode'}); + elseif (\array_key_exists('postalCode', $data) && $data['postalCode'] === null) { + $object->setPostalCode(null); } - if (property_exists($data, 'city') && $data->{'city'} !== null) { - $object->setCity($data->{'city'}); + if (\array_key_exists('city', $data) && $data['city'] !== null) { + $object->setCity($data['city']); + unset($data['city']); } - if (property_exists($data, 'state') && $data->{'state'} !== null) { - $object->setState($data->{'state'}); + elseif (\array_key_exists('city', $data) && $data['city'] === null) { + $object->setCity(null); } - if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { - $object->setCountryCode($data->{'countryCode'}); + if (\array_key_exists('state', $data) && $data['state'] !== null) { + $object->setState($data['state']); + unset($data['state']); } - if (property_exists($data, 'phoneNo') && $data->{'phoneNo'} !== null) { - $object->setPhoneNo($data->{'phoneNo'}); + elseif (\array_key_exists('state', $data) && $data['state'] === null) { + $object->setState(null); } - if (property_exists($data, 'mobilePhoneNo') && $data->{'mobilePhoneNo'} !== null) { - $object->setMobilePhoneNo($data->{'mobilePhoneNo'}); + if (\array_key_exists('countryCode', $data) && $data['countryCode'] !== null) { + $object->setCountryCode($data['countryCode']); + unset($data['countryCode']); + } + elseif (\array_key_exists('countryCode', $data) && $data['countryCode'] === null) { + $object->setCountryCode(null); + } + if (\array_key_exists('phoneNo', $data) && $data['phoneNo'] !== null) { + $object->setPhoneNo($data['phoneNo']); + unset($data['phoneNo']); + } + elseif (\array_key_exists('phoneNo', $data) && $data['phoneNo'] === null) { + $object->setPhoneNo(null); + } + if (\array_key_exists('mobilePhoneNo', $data) && $data['mobilePhoneNo'] !== null) { + $object->setMobilePhoneNo($data['mobilePhoneNo']); + unset($data['mobilePhoneNo']); + } + elseif (\array_key_exists('mobilePhoneNo', $data) && $data['mobilePhoneNo'] === null) { + $object->setMobilePhoneNo(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCompanyName()) { - $data->{'companyName'} = $object->getCompanyName(); + $data = array(); + if ($object->isInitialized('companyName') && null !== $object->getCompanyName()) { + $data['companyName'] = $object->getCompanyName(); + } + if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { + $data['firstName'] = $object->getFirstName(); } - if (null !== $object->getFirstName()) { - $data->{'firstName'} = $object->getFirstName(); + if ($object->isInitialized('lastName') && null !== $object->getLastName()) { + $data['lastName'] = $object->getLastName(); } - if (null !== $object->getLastName()) { - $data->{'lastName'} = $object->getLastName(); + if ($object->isInitialized('careOf') && null !== $object->getCareOf()) { + $data['careOf'] = $object->getCareOf(); } - if (null !== $object->getCareOf()) { - $data->{'careOf'} = $object->getCareOf(); + if ($object->isInitialized('attention') && null !== $object->getAttention()) { + $data['attention'] = $object->getAttention(); } - if (null !== $object->getAttention()) { - $data->{'attention'} = $object->getAttention(); + if ($object->isInitialized('reference') && null !== $object->getReference()) { + $data['reference'] = $object->getReference(); } - if (null !== $object->getReference()) { - $data->{'reference'} = $object->getReference(); + if ($object->isInitialized('address') && null !== $object->getAddress()) { + $data['address'] = $object->getAddress(); } - if (null !== $object->getAddress()) { - $data->{'address'} = $object->getAddress(); + if ($object->isInitialized('postalCode') && null !== $object->getPostalCode()) { + $data['postalCode'] = $object->getPostalCode(); } - if (null !== $object->getPostalCode()) { - $data->{'postalCode'} = $object->getPostalCode(); + if ($object->isInitialized('city') && null !== $object->getCity()) { + $data['city'] = $object->getCity(); } - if (null !== $object->getCity()) { - $data->{'city'} = $object->getCity(); + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['state'] = $object->getState(); } - if (null !== $object->getState()) { - $data->{'state'} = $object->getState(); + if ($object->isInitialized('countryCode') && null !== $object->getCountryCode()) { + $data['countryCode'] = $object->getCountryCode(); } - if (null !== $object->getCountryCode()) { - $data->{'countryCode'} = $object->getCountryCode(); + if ($object->isInitialized('phoneNo') && null !== $object->getPhoneNo()) { + $data['phoneNo'] = $object->getPhoneNo(); } - if (null !== $object->getPhoneNo()) { - $data->{'phoneNo'} = $object->getPhoneNo(); + if ($object->isInitialized('mobilePhoneNo') && null !== $object->getMobilePhoneNo()) { + $data['mobilePhoneNo'] = $object->getMobilePhoneNo(); } - if (null !== $object->getMobilePhoneNo()) { - $data->{'mobilePhoneNo'} = $object->getMobilePhoneNo(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\AddressModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php index ca035258..50c7c27e 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class BundledProductsModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\BundledProductsModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php index fa261ea8..5514c388 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class BundledProductsModelItemNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\BundledProductsModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\BundledProductsModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php index b2c47d00..b44daea5 100644 --- a/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php +++ b/src/Api/Generated/Normalizer/BundledProductsModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,67 +16,119 @@ class BundledProductsModelNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\BundledProductsModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\BundledProductsModel(); - if (property_exists($data, 'singleVariant') && $data->{'singleVariant'} !== null) { - $object->setSingleVariant($data->{'singleVariant'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('singleVariant', $data) && $data['singleVariant'] !== null) { + $object->setSingleVariant($data['singleVariant']); + unset($data['singleVariant']); + } + elseif (\array_key_exists('singleVariant', $data) && $data['singleVariant'] === null) { + $object->setSingleVariant(null); + } + if (\array_key_exists('bundledProductId', $data) && $data['bundledProductId'] !== null) { + $object->setBundledProductId($data['bundledProductId']); + unset($data['bundledProductId']); + } + elseif (\array_key_exists('bundledProductId', $data) && $data['bundledProductId'] === null) { + $object->setBundledProductId(null); + } + if (\array_key_exists('variantSku', $data) && $data['variantSku'] !== null) { + $object->setVariantSku($data['variantSku']); + unset($data['variantSku']); + } + elseif (\array_key_exists('variantSku', $data) && $data['variantSku'] === null) { + $object->setVariantSku(null); } - if (property_exists($data, 'bundledProductId') && $data->{'bundledProductId'} !== null) { - $object->setBundledProductId($data->{'bundledProductId'}); + if (\array_key_exists('quantity', $data) && $data['quantity'] !== null) { + $object->setQuantity($data['quantity']); + unset($data['quantity']); } - if (property_exists($data, 'variantSku') && $data->{'variantSku'} !== null) { - $object->setVariantSku($data->{'variantSku'}); + elseif (\array_key_exists('quantity', $data) && $data['quantity'] === null) { + $object->setQuantity(null); } - if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { - $object->setQuantity($data->{'quantity'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'prices') && $data->{'prices'} !== null) { + if (\array_key_exists('prices', $data) && $data['prices'] !== null) { $values = array(); - foreach ($data->{'prices'} as $value) { + foreach ($data['prices'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context); } $object->setPrices($values); + unset($data['prices']); + } + elseif (\array_key_exists('prices', $data) && $data['prices'] === null) { + $object->setPrices(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSingleVariant()) { - $data->{'singleVariant'} = $object->getSingleVariant(); + $data = array(); + if ($object->isInitialized('singleVariant') && null !== $object->getSingleVariant()) { + $data['singleVariant'] = $object->getSingleVariant(); } - if (null !== $object->getBundledProductId()) { - $data->{'bundledProductId'} = $object->getBundledProductId(); + $data['bundledProductId'] = $object->getBundledProductId(); + if ($object->isInitialized('variantSku') && null !== $object->getVariantSku()) { + $data['variantSku'] = $object->getVariantSku(); } - if (null !== $object->getVariantSku()) { - $data->{'variantSku'} = $object->getVariantSku(); + if ($object->isInitialized('quantity') && null !== $object->getQuantity()) { + $data['quantity'] = $object->getQuantity(); } - $data->{'quantity'} = $object->getQuantity(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getPrices()) { + if ($object->isInitialized('prices') && null !== $object->getPrices()) { $values = array(); foreach ($object->getPrices() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'prices'} = $values; + $data['prices'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\BundledProductsModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php index 02e52849..484118e8 100644 --- a/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ClientCredentialModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,43 +16,83 @@ class ClientCredentialModelNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ClientCredentialModel(); - if (property_exists($data, 'grant_type') && $data->{'grant_type'} !== null) { - $object->setGrantType($data->{'grant_type'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('grant_type', $data) && $data['grant_type'] !== null) { + $object->setGrantType($data['grant_type']); + unset($data['grant_type']); + } + elseif (\array_key_exists('grant_type', $data) && $data['grant_type'] === null) { + $object->setGrantType(null); + } + if (\array_key_exists('client_id', $data) && $data['client_id'] !== null) { + $object->setClientId($data['client_id']); + unset($data['client_id']); + } + elseif (\array_key_exists('client_id', $data) && $data['client_id'] === null) { + $object->setClientId(null); } - if (property_exists($data, 'client_id') && $data->{'client_id'} !== null) { - $object->setClientId($data->{'client_id'}); + if (\array_key_exists('client_secret', $data) && $data['client_secret'] !== null) { + $object->setClientSecret($data['client_secret']); + unset($data['client_secret']); } - if (property_exists($data, 'client_secret') && $data->{'client_secret'} !== null) { - $object->setClientSecret($data->{'client_secret'}); + elseif (\array_key_exists('client_secret', $data) && $data['client_secret'] === null) { + $object->setClientSecret(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getGrantType()) { - $data->{'grant_type'} = $object->getGrantType(); + $data = array(); + if ($object->isInitialized('grantType') && null !== $object->getGrantType()) { + $data['grant_type'] = $object->getGrantType(); + } + if ($object->isInitialized('clientId') && null !== $object->getClientId()) { + $data['client_id'] = $object->getClientId(); } - if (null !== $object->getClientId()) { - $data->{'client_id'} = $object->getClientId(); + if ($object->isInitialized('clientSecret') && null !== $object->getClientSecret()) { + $data['client_secret'] = $object->getClientSecret(); } - if (null !== $object->getClientSecret()) { - $data->{'client_secret'} = $object->getClientSecret(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ClientCredentialModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php index 208b0e24..eafeb085 100644 --- a/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class CurrencyCollectionNormalizer implements DenormalizerInterface, NormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CurrencyCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CurrencyCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CurrencyModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CurrencyCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php index 2f0f352e..e96cabd5 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CurrencyModelItemNormalizer implements DenormalizerInterface, NormalizerIn { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CurrencyModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CurrencyModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CurrencyModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CurrencyModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php index 4bc3d7d2..6f58ad98 100644 --- a/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CurrencyModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,40 +16,83 @@ class CurrencyModelNormalizer implements DenormalizerInterface, NormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CurrencyModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CurrencyModel(); - if (property_exists($data, 'code') && $data->{'code'} !== null) { - $object->setCode($data->{'code'}); + if (\array_key_exists('exchangeRate', $data) && \is_int($data['exchangeRate'])) { + $data['exchangeRate'] = (double) $data['exchangeRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('code', $data) && $data['code'] !== null) { + $object->setCode($data['code']); + unset($data['code']); + } + elseif (\array_key_exists('code', $data) && $data['code'] === null) { + $object->setCode(null); + } + if (\array_key_exists('exchangeRate', $data) && $data['exchangeRate'] !== null) { + $object->setExchangeRate($data['exchangeRate']); + unset($data['exchangeRate']); } - if (property_exists($data, 'exchangeRate') && $data->{'exchangeRate'} !== null) { - $object->setExchangeRate($data->{'exchangeRate'}); + elseif (\array_key_exists('exchangeRate', $data) && $data['exchangeRate'] === null) { + $object->setExchangeRate(null); } - if (property_exists($data, 'precision') && $data->{'precision'} !== null) { - $object->setPrecision($data->{'precision'}); + if (\array_key_exists('precision', $data) && $data['precision'] !== null) { + $object->setPrecision($data['precision']); + unset($data['precision']); + } + elseif (\array_key_exists('precision', $data) && $data['precision'] === null) { + $object->setPrecision(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getExchangeRate()) { - $data->{'exchangeRate'} = $object->getExchangeRate(); + $data = array(); + if ($object->isInitialized('exchangeRate') && null !== $object->getExchangeRate()) { + $data['exchangeRate'] = $object->getExchangeRate(); + } + if ($object->isInitialized('precision') && null !== $object->getPrecision()) { + $data['precision'] = $object->getPrecision(); } - if (null !== $object->getPrecision()) { - $data->{'precision'} = $object->getPrecision(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CurrencyModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php index dc7fac12..258832d0 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class CustomerAddedTagModelCollectionNormalizer implements DenormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php index a18cfd67..f550807b 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerAddedTagModelItemNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php index 202031aa..50e940e6 100644 --- a/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddedTagModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,34 +16,70 @@ class CustomerAddedTagModelNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerAddedTagModel(); - if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { - $object->setTagId($data->{'tagId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('tagId', $data) && $data['tagId'] !== null) { + $object->setTagId($data['tagId']); + unset($data['tagId']); + } + elseif (\array_key_exists('tagId', $data) && $data['tagId'] === null) { + $object->setTagId(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getTagId()) { - $data->{'tagId'} = $object->getTagId(); + $data = array(); + if ($object->isInitialized('tagId') && null !== $object->getTagId()) { + $data['tagId'] = $object->getTagId(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php index 7238425a..1edc0b07 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionDataNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class CustomerAddressesModelCollectionDataNormalizer implements DenormalizerInte { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelCollectionData(); - if (property_exists($data, 'invoice') && $data->{'invoice'} !== null) { - $object->setInvoice($this->denormalizer->denormalize($data->{'invoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('invoice', $data) && $data['invoice'] !== null) { + $object->setInvoice($this->denormalizer->denormalize($data['invoice'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['invoice']); + } + elseif (\array_key_exists('invoice', $data) && $data['invoice'] === null) { + $object->setInvoice(null); + } + if (\array_key_exists('delivery', $data) && $data['delivery'] !== null) { + $object->setDelivery($this->denormalizer->denormalize($data['delivery'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['delivery']); } - if (property_exists($data, 'delivery') && $data->{'delivery'} !== null) { - $object->setDelivery($this->denormalizer->denormalize($data->{'delivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + elseif (\array_key_exists('delivery', $data) && $data['delivery'] === null) { + $object->setDelivery(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getInvoice()) { - $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); + $data = array(); + if ($object->isInitialized('invoice') && null !== $object->getInvoice()) { + $data['invoice'] = $this->normalizer->normalize($object->getInvoice(), 'json', $context); + } + if ($object->isInitialized('delivery') && null !== $object->getDelivery()) { + $data['delivery'] = $this->normalizer->normalize($object->getDelivery(), 'json', $context); } - if (null !== $object->getDelivery()) { - $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php index 272d0996..1f1ddd7f 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerAddressesModelCollectionNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php index c3dc5c0c..126d1d00 100644 --- a/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerAddressesModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerAddressesModelItemNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerAddressesModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php index c93d3e80..78494249 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerCreatedModelItemNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerCreatedModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php index 3a5a96bb..f998202f 100644 --- a/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerCreatedModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,90 +16,178 @@ class CustomerCreatedModelNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerCreatedModel(); - if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { - $object->setCustomerId($data->{'customerId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) { + $object->setCustomerId($data['customerId']); + unset($data['customerId']); + } + elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) { + $object->setCustomerId(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('email', $data) && $data['email'] !== null) { + $object->setEmail($data['email']); + unset($data['email']); + } + elseif (\array_key_exists('email', $data) && $data['email'] === null) { + $object->setEmail(null); + } + if (\array_key_exists('nationalIdNo', $data) && $data['nationalIdNo'] !== null) { + $object->setNationalIdNo($data['nationalIdNo']); + unset($data['nationalIdNo']); + } + elseif (\array_key_exists('nationalIdNo', $data) && $data['nationalIdNo'] === null) { + $object->setNationalIdNo(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('vatNo', $data) && $data['vatNo'] !== null) { + $object->setVatNo($data['vatNo']); + unset($data['vatNo']); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + elseif (\array_key_exists('vatNo', $data) && $data['vatNo'] === null) { + $object->setVatNo(null); } - if (property_exists($data, 'email') && $data->{'email'} !== null) { - $object->setEmail($data->{'email'}); + if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) { + $object->setCustomInfo1($data['customInfo1']); + unset($data['customInfo1']); } - if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { - $object->setNationalIdNo($data->{'nationalIdNo'}); + elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) { + $object->setCustomInfo1(null); } - if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { - $object->setVatNo($data->{'vatNo'}); + if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) { + $object->setCustomInfo2($data['customInfo2']); + unset($data['customInfo2']); } - if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { - $object->setCustomInfo1($data->{'customInfo1'}); + elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) { + $object->setCustomInfo2(null); } - if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { - $object->setCustomInfo2($data->{'customInfo2'}); + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); } - if (property_exists($data, 'approved') && $data->{'approved'} !== null) { - $object->setApproved($data->{'approved'}); + if (\array_key_exists('approved', $data) && $data['approved'] !== null) { + $object->setApproved($data['approved']); + unset($data['approved']); } - if (property_exists($data, 'approvedAt') && $data->{'approvedAt'} !== null) { - $object->setApprovedAt($data->{'approvedAt'}); + elseif (\array_key_exists('approved', $data) && $data['approved'] === null) { + $object->setApproved(null); } - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + if (\array_key_exists('approvedAt', $data) && $data['approvedAt'] !== null) { + $object->setApprovedAt($data['approvedAt']); + unset($data['approvedAt']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('approvedAt', $data) && $data['approvedAt'] === null) { + $object->setApprovedAt(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); + } + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); } - if (null !== $object->getEmail()) { - $data->{'email'} = $object->getEmail(); + if ($object->isInitialized('email') && null !== $object->getEmail()) { + $data['email'] = $object->getEmail(); } - if (null !== $object->getNationalIdNo()) { - $data->{'nationalIdNo'} = $object->getNationalIdNo(); + if ($object->isInitialized('nationalIdNo') && null !== $object->getNationalIdNo()) { + $data['nationalIdNo'] = $object->getNationalIdNo(); } - if (null !== $object->getVatNo()) { - $data->{'vatNo'} = $object->getVatNo(); + if ($object->isInitialized('vatNo') && null !== $object->getVatNo()) { + $data['vatNo'] = $object->getVatNo(); } - if (null !== $object->getCustomInfo1()) { - $data->{'customInfo1'} = $object->getCustomInfo1(); + if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) { + $data['customInfo1'] = $object->getCustomInfo1(); } - if (null !== $object->getCustomInfo2()) { - $data->{'customInfo2'} = $object->getCustomInfo2(); + if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) { + $data['customInfo2'] = $object->getCustomInfo2(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerCreatedModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php index f59047b6..e8afa484 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class CustomerExternalServicesModelCollectionNormalizer implements DenormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php index 57a8b9e8..4f89ef44 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerExternalServicesModelItemNormalizer implements DenormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php index b33db242..02bbba61 100644 --- a/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerExternalServicesModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class CustomerExternalServicesModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerExternalServicesModel(); - if (property_exists($data, 'serviceName') && $data->{'serviceName'} !== null) { - $object->setServiceName($data->{'serviceName'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('serviceName', $data) && $data['serviceName'] !== null) { + $object->setServiceName($data['serviceName']); + unset($data['serviceName']); + } + elseif (\array_key_exists('serviceName', $data) && $data['serviceName'] === null) { + $object->setServiceName(null); + } + if (\array_key_exists('externalIdValue', $data) && $data['externalIdValue'] !== null) { + $object->setExternalIdValue($data['externalIdValue']); + unset($data['externalIdValue']); } - if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { - $object->setExternalIdValue($data->{'externalIdValue'}); + elseif (\array_key_exists('externalIdValue', $data) && $data['externalIdValue'] === null) { + $object->setExternalIdValue(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getServiceName()) { - $data->{'serviceName'} = $object->getServiceName(); + $data = array(); + if ($object->isInitialized('serviceName') && null !== $object->getServiceName()) { + $data['serviceName'] = $object->getServiceName(); + } + if ($object->isInitialized('externalIdValue') && null !== $object->getExternalIdValue()) { + $data['externalIdValue'] = $object->getExternalIdValue(); } - if (null !== $object->getExternalIdValue()) { - $data->{'externalIdValue'} = $object->getExternalIdValue(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php index 6cbe2860..b197a216 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionMetaNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerModelCollectionMetaNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerModelCollectionMeta(); - if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { - $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pagination', $data) && $data['pagination'] !== null) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + unset($data['pagination']); + } + elseif (\array_key_exists('pagination', $data) && $data['pagination'] === null) { + $object->setPagination(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + $data = array(); + if ($object->isInitialized('pagination') && null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php index 282f5382..d453476f 100644 --- a/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,81 @@ class CustomerModelCollectionNormalizer implements DenormalizerInterface, Normal { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + if (\array_key_exists('meta', $data) && $data['meta'] !== null) { + $object->setMeta($this->denormalizer->denormalize($data['meta'], 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta', 'json', $context)); + unset($data['meta']); + } + elseif (\array_key_exists('meta', $data) && $data['meta'] === null) { + $object->setMeta(null); } - if (property_exists($data, 'meta') && $data->{'meta'} !== null) { - $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta', 'json', $context)); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + if ($object->isInitialized('meta') && null !== $object->getMeta()) { + $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - if (null !== $object->getMeta()) { - $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php index d35c7837..d086e862 100644 --- a/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerModelItemNormalizer implements DenormalizerInterface, NormalizerIn { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CustomerModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php index b336e816..3a01f808 100644 --- a/src/Api/Generated/Normalizer/CustomerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,90 +16,178 @@ class CustomerModelNormalizer implements DenormalizerInterface, NormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerModel(); - if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { - $object->setCustomerId($data->{'customerId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) { + $object->setCustomerId($data['customerId']); + unset($data['customerId']); + } + elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) { + $object->setCustomerId(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('email', $data) && $data['email'] !== null) { + $object->setEmail($data['email']); + unset($data['email']); + } + elseif (\array_key_exists('email', $data) && $data['email'] === null) { + $object->setEmail(null); + } + if (\array_key_exists('nationalIdNo', $data) && $data['nationalIdNo'] !== null) { + $object->setNationalIdNo($data['nationalIdNo']); + unset($data['nationalIdNo']); + } + elseif (\array_key_exists('nationalIdNo', $data) && $data['nationalIdNo'] === null) { + $object->setNationalIdNo(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('vatNo', $data) && $data['vatNo'] !== null) { + $object->setVatNo($data['vatNo']); + unset($data['vatNo']); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + elseif (\array_key_exists('vatNo', $data) && $data['vatNo'] === null) { + $object->setVatNo(null); } - if (property_exists($data, 'email') && $data->{'email'} !== null) { - $object->setEmail($data->{'email'}); + if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) { + $object->setCustomInfo1($data['customInfo1']); + unset($data['customInfo1']); } - if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { - $object->setNationalIdNo($data->{'nationalIdNo'}); + elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) { + $object->setCustomInfo1(null); } - if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { - $object->setVatNo($data->{'vatNo'}); + if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) { + $object->setCustomInfo2($data['customInfo2']); + unset($data['customInfo2']); } - if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { - $object->setCustomInfo1($data->{'customInfo1'}); + elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) { + $object->setCustomInfo2(null); } - if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { - $object->setCustomInfo2($data->{'customInfo2'}); + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); } - if (property_exists($data, 'approved') && $data->{'approved'} !== null) { - $object->setApproved($data->{'approved'}); + if (\array_key_exists('approved', $data) && $data['approved'] !== null) { + $object->setApproved($data['approved']); + unset($data['approved']); } - if (property_exists($data, 'approvedAt') && $data->{'approvedAt'} !== null) { - $object->setApprovedAt($data->{'approvedAt'}); + elseif (\array_key_exists('approved', $data) && $data['approved'] === null) { + $object->setApproved(null); } - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + if (\array_key_exists('approvedAt', $data) && $data['approvedAt'] !== null) { + $object->setApprovedAt($data['approvedAt']); + unset($data['approvedAt']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('approvedAt', $data) && $data['approvedAt'] === null) { + $object->setApprovedAt(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); + } + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); } - if (null !== $object->getEmail()) { - $data->{'email'} = $object->getEmail(); + if ($object->isInitialized('email') && null !== $object->getEmail()) { + $data['email'] = $object->getEmail(); } - if (null !== $object->getNationalIdNo()) { - $data->{'nationalIdNo'} = $object->getNationalIdNo(); + if ($object->isInitialized('nationalIdNo') && null !== $object->getNationalIdNo()) { + $data['nationalIdNo'] = $object->getNationalIdNo(); } - if (null !== $object->getVatNo()) { - $data->{'vatNo'} = $object->getVatNo(); + if ($object->isInitialized('vatNo') && null !== $object->getVatNo()) { + $data['vatNo'] = $object->getVatNo(); } - if (null !== $object->getCustomInfo1()) { - $data->{'customInfo1'} = $object->getCustomInfo1(); + if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) { + $data['customInfo1'] = $object->getCustomInfo1(); } - if (null !== $object->getCustomInfo2()) { - $data->{'customInfo2'} = $object->getCustomInfo2(); + if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) { + $data['customInfo2'] = $object->getCustomInfo2(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php index d1c2b22b..3a8414ce 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class CustomerTagModelCollectionNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerTagModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\CustomerTagModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php index 0ddccaab..e1313d37 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class CustomerTagModelItemNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerTagModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\CustomerTagModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\CustomerTagModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerTagModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php index cc0334c1..1c91bbb0 100644 --- a/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerTagModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,67 @@ class CustomerTagModelNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerTagModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerTagModel(); - if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { - $object->setTagId($data->{'tagId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('tagId', $data) && $data['tagId'] !== null) { + $object->setTagId($data['tagId']); + unset($data['tagId']); + } + elseif (\array_key_exists('tagId', $data) && $data['tagId'] === null) { + $object->setTagId(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerTagModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php index 476926ef..6fd2ffab 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelAddressesNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class CustomerUpdateModelAddressesNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerUpdateModelAddresses(); - if (property_exists($data, 'invoice') && $data->{'invoice'} !== null) { - $object->setInvoice($this->denormalizer->denormalize($data->{'invoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('invoice', $data) && $data['invoice'] !== null) { + $object->setInvoice($this->denormalizer->denormalize($data['invoice'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['invoice']); + } + elseif (\array_key_exists('invoice', $data) && $data['invoice'] === null) { + $object->setInvoice(null); + } + if (\array_key_exists('delivery', $data) && $data['delivery'] !== null) { + $object->setDelivery($this->denormalizer->denormalize($data['delivery'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['delivery']); } - if (property_exists($data, 'delivery') && $data->{'delivery'} !== null) { - $object->setDelivery($this->denormalizer->denormalize($data->{'delivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + elseif (\array_key_exists('delivery', $data) && $data['delivery'] === null) { + $object->setDelivery(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getInvoice()) { - $data->{'invoice'} = $this->normalizer->normalize($object->getInvoice(), 'json', $context); + $data = array(); + if ($object->isInitialized('invoice') && null !== $object->getInvoice()) { + $data['invoice'] = $this->normalizer->normalize($object->getInvoice(), 'json', $context); + } + if ($object->isInitialized('delivery') && null !== $object->getDelivery()) { + $data['delivery'] = $this->normalizer->normalize($object->getDelivery(), 'json', $context); } - if (null !== $object->getDelivery()) { - $data->{'delivery'} = $this->normalizer->normalize($object->getDelivery(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php index 534301ba..6b5c7faf 100644 --- a/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/CustomerUpdateModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,91 +16,177 @@ class CustomerUpdateModelNormalizer implements DenormalizerInterface, Normalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\CustomerUpdateModel(); - if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { - $object->setCustomerId($data->{'customerId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) { + $object->setCustomerId($data['customerId']); + unset($data['customerId']); + } + elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) { + $object->setCustomerId(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('email', $data) && $data['email'] !== null) { + $object->setEmail($data['email']); + unset($data['email']); + } + elseif (\array_key_exists('email', $data) && $data['email'] === null) { + $object->setEmail(null); + } + if (\array_key_exists('nationalIdNo', $data) && $data['nationalIdNo'] !== null) { + $object->setNationalIdNo($data['nationalIdNo']); + unset($data['nationalIdNo']); + } + elseif (\array_key_exists('nationalIdNo', $data) && $data['nationalIdNo'] === null) { + $object->setNationalIdNo(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('vatNo', $data) && $data['vatNo'] !== null) { + $object->setVatNo($data['vatNo']); + unset($data['vatNo']); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + elseif (\array_key_exists('vatNo', $data) && $data['vatNo'] === null) { + $object->setVatNo(null); } - if (property_exists($data, 'email') && $data->{'email'} !== null) { - $object->setEmail($data->{'email'}); + if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) { + $object->setCustomInfo1($data['customInfo1']); + unset($data['customInfo1']); } - if (property_exists($data, 'nationalIdNo') && $data->{'nationalIdNo'} !== null) { - $object->setNationalIdNo($data->{'nationalIdNo'}); + elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) { + $object->setCustomInfo1(null); } - if (property_exists($data, 'vatNo') && $data->{'vatNo'} !== null) { - $object->setVatNo($data->{'vatNo'}); + if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) { + $object->setCustomInfo2($data['customInfo2']); + unset($data['customInfo2']); } - if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { - $object->setCustomInfo1($data->{'customInfo1'}); + elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) { + $object->setCustomInfo2(null); } - if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { - $object->setCustomInfo2($data->{'customInfo2'}); + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); } - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { - $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses', 'json', $context)); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('addresses', $data) && $data['addresses'] !== null) { + $object->setAddresses($this->denormalizer->denormalize($data['addresses'], 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses', 'json', $context)); + unset($data['addresses']); + } + elseif (\array_key_exists('addresses', $data) && $data['addresses'] === null) { + $object->setAddresses(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + if ($object->isInitialized('email') && null !== $object->getEmail()) { + $data['email'] = $object->getEmail(); } - if (null !== $object->getEmail()) { - $data->{'email'} = $object->getEmail(); + if ($object->isInitialized('nationalIdNo') && null !== $object->getNationalIdNo()) { + $data['nationalIdNo'] = $object->getNationalIdNo(); } - if (null !== $object->getNationalIdNo()) { - $data->{'nationalIdNo'} = $object->getNationalIdNo(); + if ($object->isInitialized('vatNo') && null !== $object->getVatNo()) { + $data['vatNo'] = $object->getVatNo(); } - if (null !== $object->getVatNo()) { - $data->{'vatNo'} = $object->getVatNo(); + if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) { + $data['customInfo1'] = $object->getCustomInfo1(); } - if (null !== $object->getCustomInfo1()) { - $data->{'customInfo1'} = $object->getCustomInfo1(); + if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) { + $data['customInfo2'] = $object->getCustomInfo2(); } - if (null !== $object->getCustomInfo2()) { - $data->{'customInfo2'} = $object->getCustomInfo2(); + if ($object->isInitialized('pricelistId') && null !== $object->getPricelistId()) { + $data['pricelistId'] = $object->getPricelistId(); } - $data->{'pricelistId'} = $object->getPricelistId(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('addresses') && null !== $object->getAddresses()) { + $data['addresses'] = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\CustomerUpdateModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php index 2a33d9cf..c325dbaa 100644 --- a/src/Api/Generated/Normalizer/ErrorModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ErrorModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,67 @@ class ErrorModelNormalizer implements DenormalizerInterface, NormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ErrorModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ErrorModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ErrorModel(); - if (property_exists($data, 'error') && $data->{'error'} !== null) { - $object->setError($data->{'error'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + unset($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('error_description', $data) && $data['error_description'] !== null) { + $object->setErrorDescription($data['error_description']); + unset($data['error_description']); } - if (property_exists($data, 'error_description') && $data->{'error_description'} !== null) { - $object->setErrorDescription($data->{'error_description'}); + elseif (\array_key_exists('error_description', $data) && $data['error_description'] === null) { + $object->setErrorDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ErrorModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/JaneObjectNormalizer.php b/src/Api/Generated/Normalizer/JaneObjectNormalizer.php new file mode 100644 index 00000000..d0e0b0e2 --- /dev/null +++ b/src/Api/Generated/Normalizer/JaneObjectNormalizer.php @@ -0,0 +1,62 @@ + 'Starweb\\Api\\Generated\\Normalizer\\ErrorModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaginationModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaginationModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderPutModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderPutModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderUpdateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\OrderModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingTrackingTypeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingTrackingTypeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\AddressModel' => 'Starweb\\Api\\Generated\\Normalizer\\AddressModelNormalizer', 'Starweb\\Api\\Generated\\Model\\AddressModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\AddressModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderAddressModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderAddressModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderAddressCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderStatusModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemBundledModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemBundledModelItemBundledItemsNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderItemModelCollectionDataItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServiceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServicesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderExternalServiceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyModel' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CurrencyCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CurrencyCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerUpdateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerUpdateModelAddressesNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerCreatedModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerCreatedModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddedTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerAddressesModelCollectionDataNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerExternalServicesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\TokenModel' => 'Starweb\\Api\\Generated\\Normalizer\\TokenModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel' => 'Starweb\\Api\\Generated\\Normalizer\\ClientCredentialModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\CustomerTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PaymentMethodModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ShippingMethodModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModel' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\PricelistModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModel' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\OrderCommentModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileUploadModelNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModel' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\MediaFileModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLanguagesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLanguagesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelPatchableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta' => 'Starweb\\Api\\Generated\\Normalizer\\ProductModelCollectionMetaNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMediaFileLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductLanguageSlimModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVatRateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductCategoryLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaLanguageDataModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductUnitLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantPriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantVolumePriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductManufacturerModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeLanguageModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductMetaDataTypeLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusResponseModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductStockStatusModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ShopModel' => 'Starweb\\Api\\Generated\\Normalizer\\ShopModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ShopItem' => 'Starweb\\Api\\Generated\\Normalizer\\ShopItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeValueModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelUpdatableNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantAttributeModelLanguagesNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductsAttributesModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\VatRateModel' => 'Starweb\\Api\\Generated\\Normalizer\\VatRateModelNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModel' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\WebHookModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\BundledProductsModel' => 'Starweb\\Api\\Generated\\Normalizer\\BundledProductsModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationLanguagesModelNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationLanguagesModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\StockLocationModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockResponseModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductVariantStockPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductBundleProductPriceModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagPatchRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagLinkPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionLanguageModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPostRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelItemNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionModelCollectionNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPutRequestModelNormalizer', 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel' => 'Starweb\\Api\\Generated\\Normalizer\\ProductTagOptionPatchRequestModelNormalizer', '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => '\\Starweb\\Api\\Generated\\Runtime\\Normalizer\\ReferenceNormalizer'), $normalizersCache = array(); + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool + { + return array_key_exists($type, $this->normalizers); + } + public function supportsNormalization($data, $format = null, array $context = array()) : bool + { + return is_object($data) && array_key_exists(get_class($data), $this->normalizers); + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = array()) + { + $normalizerClass = $this->normalizers[get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); + return $normalizer->normalize($object, $format, $context); + } + /** + * @return mixed + */ + public function denormalize($data, $class, $format = null, array $context = array()) + { + $denormalizerClass = $this->normalizers[$class]; + $denormalizer = $this->getNormalizer($denormalizerClass); + return $denormalizer->denormalize($data, $class, $format, $context); + } + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; + return $normalizer; + } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ErrorModel' => false, 'Starweb\\Api\\Generated\\Model\\PaginationModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderPutModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta' => false, 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel' => false, 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\AddressModel' => false, 'Starweb\\Api\\Generated\\Model\\AddressModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection' => false, 'Starweb\\Api\\Generated\\Model\\OrderStatusModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\OrderItemModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems' => false, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\CurrencyModel' => false, 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CurrencyCollection' => false, 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses' => false, 'Starweb\\Api\\Generated\\Model\\CustomerModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta' => false, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData' => false, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\TokenModel' => false, 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerTagModel' => false, 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem' => false, 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel' => false, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem' => false, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel' => false, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\PricelistModel' => false, 'Starweb\\Api\\Generated\\Model\\PricelistModelItem' => false, 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\OrderCommentModel' => false, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem' => false, 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel' => false, 'Starweb\\Api\\Generated\\Model\\MediaFileModel' => false, 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem' => false, 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta' => false, 'Starweb\\Api\\Generated\\Model\\ProductModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages' => false, 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable' => false, 'Starweb\\Api\\Generated\\Model\\ProductModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductUnitModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages' => false, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ShopModel' => false, 'Starweb\\Api\\Generated\\Model\\ShopItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages' => false, 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem' => false, 'Starweb\\Api\\Generated\\Model\\VatRateModelItem' => false, 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\VatRateModel' => false, 'Starweb\\Api\\Generated\\Model\\WebHookModel' => false, 'Starweb\\Api\\Generated\\Model\\WebHookModelItem' => false, 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem' => false, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationModel' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem' => false, 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPatchRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel' => false, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel' => false, '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => false); + } +} \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php index 086838fa..73e5e94a 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionMetaNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class MediaFileModelCollectionMetaNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\MediaFileModelCollectionMeta(); - if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { - $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pagination', $data) && $data['pagination'] !== null) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + unset($data['pagination']); + } + elseif (\array_key_exists('pagination', $data) && $data['pagination'] === null) { + $object->setPagination(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + $data = array(); + if ($object->isInitialized('pagination') && null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php index 0433bcfc..e8e9ec1d 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,81 @@ class MediaFileModelCollectionNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\MediaFileModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\MediaFileModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + if (\array_key_exists('meta', $data) && $data['meta'] !== null) { + $object->setMeta($this->denormalizer->denormalize($data['meta'], 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta', 'json', $context)); + unset($data['meta']); + } + elseif (\array_key_exists('meta', $data) && $data['meta'] === null) { + $object->setMeta(null); } - if (property_exists($data, 'meta') && $data->{'meta'} !== null) { - $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta', 'json', $context)); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + if ($object->isInitialized('meta') && null !== $object->getMeta()) { + $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - if (null !== $object->getMeta()) { - $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\MediaFileModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php index 7cbd0e23..3d4c2ff1 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class MediaFileModelItemNormalizer implements DenormalizerInterface, NormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\MediaFileModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\MediaFileModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\MediaFileModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\MediaFileModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php index 6550405a..35d2fb3f 100644 --- a/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,52 +16,116 @@ class MediaFileModelNormalizer implements DenormalizerInterface, NormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\MediaFileModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\MediaFileModel(); - if (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} !== null) { - $object->setMediaFileId($data->{'mediaFileId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('mediaFileId', $data) && $data['mediaFileId'] !== null) { + $object->setMediaFileId($data['mediaFileId']); + unset($data['mediaFileId']); + } + elseif (\array_key_exists('mediaFileId', $data) && $data['mediaFileId'] === null) { + $object->setMediaFileId(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('size', $data) && $data['size'] !== null) { + $object->setSize($data['size']); + unset($data['size']); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + elseif (\array_key_exists('size', $data) && $data['size'] === null) { + $object->setSize(null); } - if (property_exists($data, 'size') && $data->{'size'} !== null) { - $object->setSize($data->{'size'}); + if (\array_key_exists('mime', $data) && $data['mime'] !== null) { + $object->setMime($data['mime']); + unset($data['mime']); } - if (property_exists($data, 'mime') && $data->{'mime'} !== null) { - $object->setMime($data->{'mime'}); + elseif (\array_key_exists('mime', $data) && $data['mime'] === null) { + $object->setMime(null); } - if (property_exists($data, 'height') && $data->{'height'} !== null) { - $object->setHeight($data->{'height'}); + if (\array_key_exists('height', $data) && $data['height'] !== null) { + $object->setHeight($data['height']); + unset($data['height']); } - if (property_exists($data, 'width') && $data->{'width'} !== null) { - $object->setWidth($data->{'width'}); + elseif (\array_key_exists('height', $data) && $data['height'] === null) { + $object->setHeight(null); } - if (property_exists($data, 'url') && $data->{'url'} !== null) { - $object->setUrl($data->{'url'}); + if (\array_key_exists('width', $data) && $data['width'] !== null) { + $object->setWidth($data['width']); + unset($data['width']); + } + elseif (\array_key_exists('width', $data) && $data['width'] === null) { + $object->setWidth(null); + } + if (\array_key_exists('url', $data) && $data['url'] !== null) { + $object->setUrl($data['url']); + unset($data['url']); + } + elseif (\array_key_exists('url', $data) && $data['url'] === null) { + $object->setUrl(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\MediaFileModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php index e1371381..4c5906c6 100644 --- a/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php +++ b/src/Api/Generated/Normalizer/MediaFileUploadModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class MediaFileUploadModelNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\MediaFileUploadModel(); - if (property_exists($data, 'file') && $data->{'file'} !== null) { - $object->setFile($data->{'file'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('file', $data) && $data['file'] !== null) { + $object->setFile($data['file']); + unset($data['file']); + } + elseif (\array_key_exists('file', $data) && $data['file'] === null) { + $object->setFile(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getFile()) { - $data->{'file'} = $object->getFile(); + $data = array(); + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['file'] = $object->getFile(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\MediaFileUploadModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/NormalizerFactory.php b/src/Api/Generated/Normalizer/NormalizerFactory.php deleted file mode 100644 index 1d7e01c9..00000000 --- a/src/Api/Generated/Normalizer/NormalizerFactory.php +++ /dev/null @@ -1,211 +0,0 @@ -{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderAddressCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php index 1a80f70d..3a164841 100644 --- a/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderAddressModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,61 +16,113 @@ class OrderAddressModelNormalizer implements DenormalizerInterface, NormalizerIn { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderAddressModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderAddressModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderAddressModel(); - if (property_exists($data, 'originalInvoice') && $data->{'originalInvoice'} !== null) { - $object->setOriginalInvoice($this->denormalizer->denormalize($data->{'originalInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('originalInvoice', $data) && $data['originalInvoice'] !== null) { + $object->setOriginalInvoice($this->denormalizer->denormalize($data['originalInvoice'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['originalInvoice']); + } + elseif (\array_key_exists('originalInvoice', $data) && $data['originalInvoice'] === null) { + $object->setOriginalInvoice(null); + } + if (\array_key_exists('originalDelivery', $data) && $data['originalDelivery'] !== null) { + $object->setOriginalDelivery($this->denormalizer->denormalize($data['originalDelivery'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['originalDelivery']); + } + elseif (\array_key_exists('originalDelivery', $data) && $data['originalDelivery'] === null) { + $object->setOriginalDelivery(null); + } + if (\array_key_exists('customerInvoice', $data) && $data['customerInvoice'] !== null) { + $object->setCustomerInvoice($this->denormalizer->denormalize($data['customerInvoice'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['customerInvoice']); } - if (property_exists($data, 'originalDelivery') && $data->{'originalDelivery'} !== null) { - $object->setOriginalDelivery($this->denormalizer->denormalize($data->{'originalDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + elseif (\array_key_exists('customerInvoice', $data) && $data['customerInvoice'] === null) { + $object->setCustomerInvoice(null); } - if (property_exists($data, 'customerInvoice') && $data->{'customerInvoice'} !== null) { - $object->setCustomerInvoice($this->denormalizer->denormalize($data->{'customerInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (\array_key_exists('customerDelivery', $data) && $data['customerDelivery'] !== null) { + $object->setCustomerDelivery($this->denormalizer->denormalize($data['customerDelivery'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['customerDelivery']); } - if (property_exists($data, 'customerDelivery') && $data->{'customerDelivery'} !== null) { - $object->setCustomerDelivery($this->denormalizer->denormalize($data->{'customerDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + elseif (\array_key_exists('customerDelivery', $data) && $data['customerDelivery'] === null) { + $object->setCustomerDelivery(null); } - if (property_exists($data, 'paymentMethodInvoice') && $data->{'paymentMethodInvoice'} !== null) { - $object->setPaymentMethodInvoice($this->denormalizer->denormalize($data->{'paymentMethodInvoice'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + if (\array_key_exists('paymentMethodInvoice', $data) && $data['paymentMethodInvoice'] !== null) { + $object->setPaymentMethodInvoice($this->denormalizer->denormalize($data['paymentMethodInvoice'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['paymentMethodInvoice']); } - if (property_exists($data, 'paymentMethodDelivery') && $data->{'paymentMethodDelivery'} !== null) { - $object->setPaymentMethodDelivery($this->denormalizer->denormalize($data->{'paymentMethodDelivery'}, 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + elseif (\array_key_exists('paymentMethodInvoice', $data) && $data['paymentMethodInvoice'] === null) { + $object->setPaymentMethodInvoice(null); + } + if (\array_key_exists('paymentMethodDelivery', $data) && $data['paymentMethodDelivery'] !== null) { + $object->setPaymentMethodDelivery($this->denormalizer->denormalize($data['paymentMethodDelivery'], 'Starweb\\Api\\Generated\\Model\\AddressModel', 'json', $context)); + unset($data['paymentMethodDelivery']); + } + elseif (\array_key_exists('paymentMethodDelivery', $data) && $data['paymentMethodDelivery'] === null) { + $object->setPaymentMethodDelivery(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getOriginalInvoice()) { - $data->{'originalInvoice'} = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); + $data = array(); + if ($object->isInitialized('originalInvoice') && null !== $object->getOriginalInvoice()) { + $data['originalInvoice'] = $this->normalizer->normalize($object->getOriginalInvoice(), 'json', $context); } - if (null !== $object->getOriginalDelivery()) { - $data->{'originalDelivery'} = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); + if ($object->isInitialized('originalDelivery') && null !== $object->getOriginalDelivery()) { + $data['originalDelivery'] = $this->normalizer->normalize($object->getOriginalDelivery(), 'json', $context); } - if (null !== $object->getCustomerInvoice()) { - $data->{'customerInvoice'} = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); + if ($object->isInitialized('customerInvoice') && null !== $object->getCustomerInvoice()) { + $data['customerInvoice'] = $this->normalizer->normalize($object->getCustomerInvoice(), 'json', $context); } - if (null !== $object->getCustomerDelivery()) { - $data->{'customerDelivery'} = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); + if ($object->isInitialized('customerDelivery') && null !== $object->getCustomerDelivery()) { + $data['customerDelivery'] = $this->normalizer->normalize($object->getCustomerDelivery(), 'json', $context); } - if (null !== $object->getPaymentMethodInvoice()) { - $data->{'paymentMethodInvoice'} = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); + if ($object->isInitialized('paymentMethodInvoice') && null !== $object->getPaymentMethodInvoice()) { + $data['paymentMethodInvoice'] = $this->normalizer->normalize($object->getPaymentMethodInvoice(), 'json', $context); } - if (null !== $object->getPaymentMethodDelivery()) { - $data->{'paymentMethodDelivery'} = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); + if ($object->isInitialized('paymentMethodDelivery') && null !== $object->getPaymentMethodDelivery()) { + $data['paymentMethodDelivery'] = $this->normalizer->normalize($object->getPaymentMethodDelivery(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderAddressModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php index aecfa411..8310beb7 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class OrderCommentModelCollectionNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderCommentModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderCommentModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php index 2d86bbe2..2950987c 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderCommentModelItemNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderCommentModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderCommentModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\OrderCommentModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderCommentModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php index f9991635..faaa2f2f 100644 --- a/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderCommentModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,46 +16,90 @@ class OrderCommentModelNormalizer implements DenormalizerInterface, NormalizerIn { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderCommentModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderCommentModel(); - if (property_exists($data, 'commentId') && $data->{'commentId'} !== null) { - $object->setCommentId($data->{'commentId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('commentId', $data) && $data['commentId'] !== null) { + $object->setCommentId($data['commentId']); + unset($data['commentId']); + } + elseif (\array_key_exists('commentId', $data) && $data['commentId'] === null) { + $object->setCommentId(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('text', $data) && $data['text'] !== null) { + $object->setText($data['text']); + unset($data['text']); } - if (property_exists($data, 'text') && $data->{'text'} !== null) { - $object->setText($data->{'text'}); + elseif (\array_key_exists('text', $data) && $data['text'] === null) { + $object->setText(null); } - if (property_exists($data, 'from') && $data->{'from'} !== null) { - $object->setFrom($data->{'from'}); + if (\array_key_exists('from', $data) && $data['from'] !== null) { + $object->setFrom($data['from']); + unset($data['from']); + } + elseif (\array_key_exists('from', $data) && $data['from'] === null) { + $object->setFrom(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('text') && null !== $object->getText()) { + $data['text'] = $object->getText(); } - if (null !== $object->getText()) { - $data->{'text'} = $object->getText(); + if ($object->isInitialized('from') && null !== $object->getFrom()) { + $data['from'] = $object->getFrom(); } - if (null !== $object->getFrom()) { - $data->{'from'} = $object->getFrom(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderCommentModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php index 12f3235f..74b225ee 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class OrderExternalServiceModelCollectionNormalizer implements DenormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderExternalServiceModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php index 56b36bc0..c1aaeac8 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServiceModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,46 +16,90 @@ class OrderExternalServiceModelNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderExternalServiceModel(); - if (property_exists($data, 'serviceName') && $data->{'serviceName'} !== null) { - $object->setServiceName($data->{'serviceName'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('serviceName', $data) && $data['serviceName'] !== null) { + $object->setServiceName($data['serviceName']); + unset($data['serviceName']); + } + elseif (\array_key_exists('serviceName', $data) && $data['serviceName'] === null) { + $object->setServiceName(null); + } + if (\array_key_exists('externalIdValue', $data) && $data['externalIdValue'] !== null) { + $object->setExternalIdValue($data['externalIdValue']); + unset($data['externalIdValue']); + } + elseif (\array_key_exists('externalIdValue', $data) && $data['externalIdValue'] === null) { + $object->setExternalIdValue(null); } - if (property_exists($data, 'externalIdValue') && $data->{'externalIdValue'} !== null) { - $object->setExternalIdValue($data->{'externalIdValue'}); + if (\array_key_exists('agent', $data) && $data['agent'] !== null) { + $object->setAgent($data['agent']); + unset($data['agent']); } - if (property_exists($data, 'agent') && $data->{'agent'} !== null) { - $object->setAgent($data->{'agent'}); + elseif (\array_key_exists('agent', $data) && $data['agent'] === null) { + $object->setAgent(null); } - if (property_exists($data, 'readOnly') && $data->{'readOnly'} !== null) { - $object->setReadOnly($data->{'readOnly'}); + if (\array_key_exists('readOnly', $data) && $data['readOnly'] !== null) { + $object->setReadOnly($data['readOnly']); + unset($data['readOnly']); + } + elseif (\array_key_exists('readOnly', $data) && $data['readOnly'] === null) { + $object->setReadOnly(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getServiceName()) { - $data->{'serviceName'} = $object->getServiceName(); + $data = array(); + if ($object->isInitialized('serviceName') && null !== $object->getServiceName()) { + $data['serviceName'] = $object->getServiceName(); + } + if ($object->isInitialized('externalIdValue') && null !== $object->getExternalIdValue()) { + $data['externalIdValue'] = $object->getExternalIdValue(); } - if (null !== $object->getExternalIdValue()) { - $data->{'externalIdValue'} = $object->getExternalIdValue(); + if ($object->isInitialized('agent') && null !== $object->getAgent()) { + $data['agent'] = $object->getAgent(); } - if (null !== $object->getAgent()) { - $data->{'agent'} = $object->getAgent(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php index ed7b3bcc..6bca10e8 100644 --- a/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderExternalServicesModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderExternalServicesModelItemNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderExternalServicesModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php index f2973cfb..449095ef 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class OrderItemBundledModelItemBundledItemsNormalizer implements DenormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderItemBundledModelItemBundledItems(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php index 1f9b14e6..ee13c28f 100644 --- a/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderItemBundledModelItemNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderItemBundledModelItem(); - if (property_exists($data, 'bundledItems') && $data->{'bundledItems'} !== null) { - $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('bundledItems', $data) && $data['bundledItems'] !== null) { + $object->setBundledItems($this->denormalizer->denormalize($data['bundledItems'], 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); + unset($data['bundledItems']); + } + elseif (\array_key_exists('bundledItems', $data) && $data['bundledItems'] === null) { + $object->setBundledItems(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getBundledItems()) { - $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); + $data = array(); + if ($object->isInitialized('bundledItems') && null !== $object->getBundledItems()) { + $data['bundledItems'] = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php index 2fa9b6d2..309db660 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,88 +16,169 @@ class OrderItemModelCollectionDataItemNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderItemModelCollectionDataItem(); - if (property_exists($data, 'itemId') && $data->{'itemId'} !== null) { - $object->setItemId($data->{'itemId'}); + if (\array_key_exists('unitPrice', $data) && \is_int($data['unitPrice'])) { + $data['unitPrice'] = (double) $data['unitPrice']; + } + if (\array_key_exists('vatRate', $data) && \is_int($data['vatRate'])) { + $data['vatRate'] = (double) $data['vatRate']; + } + if (\array_key_exists('discount', $data) && \is_int($data['discount'])) { + $data['discount'] = (double) $data['discount']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('itemId', $data) && $data['itemId'] !== null) { + $object->setItemId($data['itemId']); + unset($data['itemId']); + } + elseif (\array_key_exists('itemId', $data) && $data['itemId'] === null) { + $object->setItemId(null); + } + if (\array_key_exists('sku', $data) && $data['sku'] !== null) { + $object->setSku($data['sku']); + unset($data['sku']); + } + elseif (\array_key_exists('sku', $data) && $data['sku'] === null) { + $object->setSku(null); + } + if (\array_key_exists('description', $data) && $data['description'] !== null) { + $object->setDescription($data['description']); + unset($data['description']); + } + elseif (\array_key_exists('description', $data) && $data['description'] === null) { + $object->setDescription(null); } - if (property_exists($data, 'sku') && $data->{'sku'} !== null) { - $object->setSku($data->{'sku'}); + if (\array_key_exists('quantity', $data) && $data['quantity'] !== null) { + $object->setQuantity($data['quantity']); + unset($data['quantity']); } - if (property_exists($data, 'description') && $data->{'description'} !== null) { - $object->setDescription($data->{'description'}); + elseif (\array_key_exists('quantity', $data) && $data['quantity'] === null) { + $object->setQuantity(null); } - if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { - $object->setQuantity($data->{'quantity'}); + if (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] !== null) { + $object->setUnitSymbol($data['unitSymbol']); + unset($data['unitSymbol']); } - if (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} !== null) { - $object->setUnitSymbol($data->{'unitSymbol'}); + elseif (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] === null) { + $object->setUnitSymbol(null); } - if (property_exists($data, 'unitPrice') && $data->{'unitPrice'} !== null) { - $object->setUnitPrice($data->{'unitPrice'}); + if (\array_key_exists('unitPrice', $data) && $data['unitPrice'] !== null) { + $object->setUnitPrice($data['unitPrice']); + unset($data['unitPrice']); } - if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { - $object->setVatRate($data->{'vatRate'}); + elseif (\array_key_exists('unitPrice', $data) && $data['unitPrice'] === null) { + $object->setUnitPrice(null); } - if (property_exists($data, 'discount') && $data->{'discount'} !== null) { - $object->setDiscount($data->{'discount'}); + if (\array_key_exists('vatRate', $data) && $data['vatRate'] !== null) { + $object->setVatRate($data['vatRate']); + unset($data['vatRate']); } - if (property_exists($data, 'discountType') && $data->{'discountType'} !== null) { - $object->setDiscountType($data->{'discountType'}); + elseif (\array_key_exists('vatRate', $data) && $data['vatRate'] === null) { + $object->setVatRate(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('discount', $data) && $data['discount'] !== null) { + $object->setDiscount($data['discount']); + unset($data['discount']); } - if (property_exists($data, 'bundledItems') && $data->{'bundledItems'} !== null) { - $object->setBundledItems($this->denormalizer->denormalize($data->{'bundledItems'}, 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); + elseif (\array_key_exists('discount', $data) && $data['discount'] === null) { + $object->setDiscount(null); + } + if (\array_key_exists('discountType', $data) && $data['discountType'] !== null) { + $object->setDiscountType($data['discountType']); + unset($data['discountType']); + } + elseif (\array_key_exists('discountType', $data) && $data['discountType'] === null) { + $object->setDiscountType(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('bundledItems', $data) && $data['bundledItems'] !== null) { + $object->setBundledItems($this->denormalizer->denormalize($data['bundledItems'], 'Starweb\\Api\\Generated\\Model\\OrderItemBundledModelItemBundledItems', 'json', $context)); + unset($data['bundledItems']); + } + elseif (\array_key_exists('bundledItems', $data) && $data['bundledItems'] === null) { + $object->setBundledItems(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSku()) { - $data->{'sku'} = $object->getSku(); + $data = array(); + if ($object->isInitialized('sku') && null !== $object->getSku()) { + $data['sku'] = $object->getSku(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['description'] = $object->getDescription(); } - if (null !== $object->getDescription()) { - $data->{'description'} = $object->getDescription(); + if ($object->isInitialized('quantity') && null !== $object->getQuantity()) { + $data['quantity'] = $object->getQuantity(); } - if (null !== $object->getQuantity()) { - $data->{'quantity'} = $object->getQuantity(); + if ($object->isInitialized('unitSymbol') && null !== $object->getUnitSymbol()) { + $data['unitSymbol'] = $object->getUnitSymbol(); } - if (null !== $object->getUnitSymbol()) { - $data->{'unitSymbol'} = $object->getUnitSymbol(); + if ($object->isInitialized('unitPrice') && null !== $object->getUnitPrice()) { + $data['unitPrice'] = $object->getUnitPrice(); } - if (null !== $object->getUnitPrice()) { - $data->{'unitPrice'} = $object->getUnitPrice(); + if ($object->isInitialized('vatRate') && null !== $object->getVatRate()) { + $data['vatRate'] = $object->getVatRate(); } - if (null !== $object->getVatRate()) { - $data->{'vatRate'} = $object->getVatRate(); + if ($object->isInitialized('discount') && null !== $object->getDiscount()) { + $data['discount'] = $object->getDiscount(); } - if (null !== $object->getDiscount()) { - $data->{'discount'} = $object->getDiscount(); + if ($object->isInitialized('discountType') && null !== $object->getDiscountType()) { + $data['discountType'] = $object->getDiscountType(); } - if (null !== $object->getDiscountType()) { - $data->{'discountType'} = $object->getDiscountType(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('bundledItems') && null !== $object->getBundledItems()) { + $data['bundledItems'] = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); } - if (null !== $object->getBundledItems()) { - $data->{'bundledItems'} = $this->normalizer->normalize($object->getBundledItems(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php index 3a0fa728..c9768452 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class OrderItemModelCollectionNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderItemModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollectionDataItem', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderItemModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php index 7e8545b1..6899c990 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderItemModelItemNormalizer implements DenormalizerInterface, NormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderItemModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderItemModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php index 57e00c12..a15eafb6 100644 --- a/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderItemModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,82 +16,159 @@ class OrderItemModelNormalizer implements DenormalizerInterface, NormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderItemModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderItemModel(); - if (property_exists($data, 'itemId') && $data->{'itemId'} !== null) { - $object->setItemId($data->{'itemId'}); + if (\array_key_exists('unitPrice', $data) && \is_int($data['unitPrice'])) { + $data['unitPrice'] = (double) $data['unitPrice']; + } + if (\array_key_exists('vatRate', $data) && \is_int($data['vatRate'])) { + $data['vatRate'] = (double) $data['vatRate']; + } + if (\array_key_exists('discount', $data) && \is_int($data['discount'])) { + $data['discount'] = (double) $data['discount']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('itemId', $data) && $data['itemId'] !== null) { + $object->setItemId($data['itemId']); + unset($data['itemId']); + } + elseif (\array_key_exists('itemId', $data) && $data['itemId'] === null) { + $object->setItemId(null); + } + if (\array_key_exists('sku', $data) && $data['sku'] !== null) { + $object->setSku($data['sku']); + unset($data['sku']); + } + elseif (\array_key_exists('sku', $data) && $data['sku'] === null) { + $object->setSku(null); + } + if (\array_key_exists('description', $data) && $data['description'] !== null) { + $object->setDescription($data['description']); + unset($data['description']); + } + elseif (\array_key_exists('description', $data) && $data['description'] === null) { + $object->setDescription(null); } - if (property_exists($data, 'sku') && $data->{'sku'} !== null) { - $object->setSku($data->{'sku'}); + if (\array_key_exists('quantity', $data) && $data['quantity'] !== null) { + $object->setQuantity($data['quantity']); + unset($data['quantity']); } - if (property_exists($data, 'description') && $data->{'description'} !== null) { - $object->setDescription($data->{'description'}); + elseif (\array_key_exists('quantity', $data) && $data['quantity'] === null) { + $object->setQuantity(null); } - if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { - $object->setQuantity($data->{'quantity'}); + if (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] !== null) { + $object->setUnitSymbol($data['unitSymbol']); + unset($data['unitSymbol']); } - if (property_exists($data, 'unitSymbol') && $data->{'unitSymbol'} !== null) { - $object->setUnitSymbol($data->{'unitSymbol'}); + elseif (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] === null) { + $object->setUnitSymbol(null); } - if (property_exists($data, 'unitPrice') && $data->{'unitPrice'} !== null) { - $object->setUnitPrice($data->{'unitPrice'}); + if (\array_key_exists('unitPrice', $data) && $data['unitPrice'] !== null) { + $object->setUnitPrice($data['unitPrice']); + unset($data['unitPrice']); } - if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { - $object->setVatRate($data->{'vatRate'}); + elseif (\array_key_exists('unitPrice', $data) && $data['unitPrice'] === null) { + $object->setUnitPrice(null); } - if (property_exists($data, 'discount') && $data->{'discount'} !== null) { - $object->setDiscount($data->{'discount'}); + if (\array_key_exists('vatRate', $data) && $data['vatRate'] !== null) { + $object->setVatRate($data['vatRate']); + unset($data['vatRate']); } - if (property_exists($data, 'discountType') && $data->{'discountType'} !== null) { - $object->setDiscountType($data->{'discountType'}); + elseif (\array_key_exists('vatRate', $data) && $data['vatRate'] === null) { + $object->setVatRate(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('discount', $data) && $data['discount'] !== null) { + $object->setDiscount($data['discount']); + unset($data['discount']); + } + elseif (\array_key_exists('discount', $data) && $data['discount'] === null) { + $object->setDiscount(null); + } + if (\array_key_exists('discountType', $data) && $data['discountType'] !== null) { + $object->setDiscountType($data['discountType']); + unset($data['discountType']); + } + elseif (\array_key_exists('discountType', $data) && $data['discountType'] === null) { + $object->setDiscountType(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSku()) { - $data->{'sku'} = $object->getSku(); + $data = array(); + if ($object->isInitialized('sku') && null !== $object->getSku()) { + $data['sku'] = $object->getSku(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['description'] = $object->getDescription(); } - if (null !== $object->getDescription()) { - $data->{'description'} = $object->getDescription(); + if ($object->isInitialized('quantity') && null !== $object->getQuantity()) { + $data['quantity'] = $object->getQuantity(); } - if (null !== $object->getQuantity()) { - $data->{'quantity'} = $object->getQuantity(); + if ($object->isInitialized('unitSymbol') && null !== $object->getUnitSymbol()) { + $data['unitSymbol'] = $object->getUnitSymbol(); } - if (null !== $object->getUnitSymbol()) { - $data->{'unitSymbol'} = $object->getUnitSymbol(); + if ($object->isInitialized('unitPrice') && null !== $object->getUnitPrice()) { + $data['unitPrice'] = $object->getUnitPrice(); } - if (null !== $object->getUnitPrice()) { - $data->{'unitPrice'} = $object->getUnitPrice(); + if ($object->isInitialized('vatRate') && null !== $object->getVatRate()) { + $data['vatRate'] = $object->getVatRate(); } - if (null !== $object->getVatRate()) { - $data->{'vatRate'} = $object->getVatRate(); + if ($object->isInitialized('discount') && null !== $object->getDiscount()) { + $data['discount'] = $object->getDiscount(); } - if (null !== $object->getDiscount()) { - $data->{'discount'} = $object->getDiscount(); + if ($object->isInitialized('discountType') && null !== $object->getDiscountType()) { + $data['discountType'] = $object->getDiscountType(); } - if (null !== $object->getDiscountType()) { - $data->{'discountType'} = $object->getDiscountType(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderItemModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php index cf9f71f4..29b5ff95 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionMetaNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderModelCollectionMetaNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderModelCollectionMeta(); - if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { - $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pagination', $data) && $data['pagination'] !== null) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + unset($data['pagination']); + } + elseif (\array_key_exists('pagination', $data) && $data['pagination'] === null) { + $object->setPagination(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + $data = array(); + if ($object->isInitialized('pagination') && null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php index 64a1e0f1..7f6567bb 100644 --- a/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,81 @@ class OrderModelCollectionNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + if (\array_key_exists('meta', $data) && $data['meta'] !== null) { + $object->setMeta($this->denormalizer->denormalize($data['meta'], 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta', 'json', $context)); + unset($data['meta']); + } + elseif (\array_key_exists('meta', $data) && $data['meta'] === null) { + $object->setMeta(null); } - if (property_exists($data, 'meta') && $data->{'meta'} !== null) { - $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta', 'json', $context)); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + if ($object->isInitialized('meta') && null !== $object->getMeta()) { + $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - if (null !== $object->getMeta()) { - $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php index 1cd544da..15949d6e 100644 --- a/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderModelItemNormalizer implements DenormalizerInterface, NormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\OrderModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderModelNormalizer.php b/src/Api/Generated/Normalizer/OrderModelNormalizer.php index ad1cfbc0..53c2148b 100644 --- a/src/Api/Generated/Normalizer/OrderModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,337 +16,647 @@ class OrderModelNormalizer implements DenormalizerInterface, NormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderModel(); - if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { - $object->setOrderId($data->{'orderId'}); + if (\array_key_exists('totalAmount', $data) && \is_int($data['totalAmount'])) { + $data['totalAmount'] = (double) $data['totalAmount']; + } + if (\array_key_exists('totalVat', $data) && \is_int($data['totalVat'])) { + $data['totalVat'] = (double) $data['totalVat']; + } + if (\array_key_exists('amountToPay', $data) && \is_int($data['amountToPay'])) { + $data['amountToPay'] = (double) $data['amountToPay']; + } + if (\array_key_exists('totalAmountInBaseCurrency', $data) && \is_int($data['totalAmountInBaseCurrency'])) { + $data['totalAmountInBaseCurrency'] = (double) $data['totalAmountInBaseCurrency']; + } + if (\array_key_exists('totalVatInBaseCurrency', $data) && \is_int($data['totalVatInBaseCurrency'])) { + $data['totalVatInBaseCurrency'] = (double) $data['totalVatInBaseCurrency']; + } + if (\array_key_exists('amountToPayInBaseCurrency', $data) && \is_int($data['amountToPayInBaseCurrency'])) { + $data['amountToPayInBaseCurrency'] = (double) $data['amountToPayInBaseCurrency']; + } + if (\array_key_exists('paymentFee', $data) && \is_int($data['paymentFee'])) { + $data['paymentFee'] = (double) $data['paymentFee']; + } + if (\array_key_exists('paymentVatRate', $data) && \is_int($data['paymentVatRate'])) { + $data['paymentVatRate'] = (double) $data['paymentVatRate']; + } + if (\array_key_exists('shippingCost', $data) && \is_int($data['shippingCost'])) { + $data['shippingCost'] = (double) $data['shippingCost']; + } + if (\array_key_exists('shippingVatRate', $data) && \is_int($data['shippingVatRate'])) { + $data['shippingVatRate'] = (double) $data['shippingVatRate']; + } + if (\array_key_exists('totalWeight', $data) && \is_int($data['totalWeight'])) { + $data['totalWeight'] = (double) $data['totalWeight']; + } + if (\array_key_exists('amountPaid', $data) && \is_int($data['amountPaid'])) { + $data['amountPaid'] = (double) $data['amountPaid']; + } + if (\array_key_exists('amountPaidInBaseCurrency', $data) && \is_int($data['amountPaidInBaseCurrency'])) { + $data['amountPaidInBaseCurrency'] = (double) $data['amountPaidInBaseCurrency']; + } + if (\array_key_exists('currencyExchangeRate', $data) && \is_int($data['currencyExchangeRate'])) { + $data['currencyExchangeRate'] = (double) $data['currencyExchangeRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('orderId', $data) && $data['orderId'] !== null) { + $object->setOrderId($data['orderId']); + unset($data['orderId']); + } + elseif (\array_key_exists('orderId', $data) && $data['orderId'] === null) { + $object->setOrderId(null); + } + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); + } + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); + } + if (\array_key_exists('paymentMethodExternalId', $data) && $data['paymentMethodExternalId'] !== null) { + $object->setPaymentMethodExternalId($data['paymentMethodExternalId']); + unset($data['paymentMethodExternalId']); + } + elseif (\array_key_exists('paymentMethodExternalId', $data) && $data['paymentMethodExternalId'] === null) { + $object->setPaymentMethodExternalId(null); + } + if (\array_key_exists('shippingMethodExternalId', $data) && $data['shippingMethodExternalId'] !== null) { + $object->setShippingMethodExternalId($data['shippingMethodExternalId']); + unset($data['shippingMethodExternalId']); + } + elseif (\array_key_exists('shippingMethodExternalId', $data) && $data['shippingMethodExternalId'] === null) { + $object->setShippingMethodExternalId(null); + } + if (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] !== null) { + $object->setBaseCurrencyCode($data['baseCurrencyCode']); + unset($data['baseCurrencyCode']); + } + elseif (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] === null) { + $object->setBaseCurrencyCode(null); + } + if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) { + $object->setShopCountryCode($data['shopCountryCode']); + unset($data['shopCountryCode']); + } + elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) { + $object->setShopCountryCode(null); + } + if (\array_key_exists('totalAmount', $data) && $data['totalAmount'] !== null) { + $object->setTotalAmount($data['totalAmount']); + unset($data['totalAmount']); + } + elseif (\array_key_exists('totalAmount', $data) && $data['totalAmount'] === null) { + $object->setTotalAmount(null); + } + if (\array_key_exists('totalVat', $data) && $data['totalVat'] !== null) { + $object->setTotalVat($data['totalVat']); + unset($data['totalVat']); + } + elseif (\array_key_exists('totalVat', $data) && $data['totalVat'] === null) { + $object->setTotalVat(null); + } + if (\array_key_exists('amountToPay', $data) && $data['amountToPay'] !== null) { + $object->setAmountToPay($data['amountToPay']); + unset($data['amountToPay']); + } + elseif (\array_key_exists('amountToPay', $data) && $data['amountToPay'] === null) { + $object->setAmountToPay(null); + } + if (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] !== null) { + $object->setTotalAmountInBaseCurrency($data['totalAmountInBaseCurrency']); + unset($data['totalAmountInBaseCurrency']); + } + elseif (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] === null) { + $object->setTotalAmountInBaseCurrency(null); + } + if (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] !== null) { + $object->setTotalVatInBaseCurrency($data['totalVatInBaseCurrency']); + unset($data['totalVatInBaseCurrency']); + } + elseif (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] === null) { + $object->setTotalVatInBaseCurrency(null); + } + if (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] !== null) { + $object->setAmountToPayInBaseCurrency($data['amountToPayInBaseCurrency']); + unset($data['amountToPayInBaseCurrency']); + } + elseif (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] === null) { + $object->setAmountToPayInBaseCurrency(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); } - if (property_exists($data, 'paymentMethodExternalId') && $data->{'paymentMethodExternalId'} !== null) { - $object->setPaymentMethodExternalId($data->{'paymentMethodExternalId'}); + if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) { + $object->setCustomerId($data['customerId']); + unset($data['customerId']); } - if (property_exists($data, 'shippingMethodExternalId') && $data->{'shippingMethodExternalId'} !== null) { - $object->setShippingMethodExternalId($data->{'shippingMethodExternalId'}); + elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) { + $object->setCustomerId(null); } - if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { - $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); + if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) { + $object->setStatusId($data['statusId']); + unset($data['statusId']); } - if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { - $object->setShopCountryCode($data->{'shopCountryCode'}); + elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) { + $object->setStatusId(null); } - if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { - $object->setTotalAmount($data->{'totalAmount'}); + if (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] !== null) { + $object->setOnOrderStatusChangeSendEmail($data['onOrderStatusChangeSendEmail']); + unset($data['onOrderStatusChangeSendEmail']); } - if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { - $object->setTotalVat($data->{'totalVat'}); + elseif (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] === null) { + $object->setOnOrderStatusChangeSendEmail(null); } - if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { - $object->setAmountToPay($data->{'amountToPay'}); + if (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] !== null) { + $object->setOnOrderStatusChangeProcessPayment($data['onOrderStatusChangeProcessPayment']); + unset($data['onOrderStatusChangeProcessPayment']); } - if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { - $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); + elseif (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] === null) { + $object->setOnOrderStatusChangeProcessPayment(null); } - if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { - $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); + if (\array_key_exists('sendEmailsOnStatusChange', $data) && $data['sendEmailsOnStatusChange'] !== null) { + $object->setSendEmailsOnStatusChange($data['sendEmailsOnStatusChange']); + unset($data['sendEmailsOnStatusChange']); } - if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { - $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); + elseif (\array_key_exists('sendEmailsOnStatusChange', $data) && $data['sendEmailsOnStatusChange'] === null) { + $object->setSendEmailsOnStatusChange(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] !== null) { + $object->setStockLocationId($data['stockLocationId']); + unset($data['stockLocationId']); } - if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { - $object->setCustomerId($data->{'customerId'}); + elseif (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] === null) { + $object->setStockLocationId(null); } - if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { - $object->setStatusId($data->{'statusId'}); + if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) { + $object->setShippingMethodId($data['shippingMethodId']); + unset($data['shippingMethodId']); } - if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { - $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); + elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) { + $object->setShippingMethodId(null); } - if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { - $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); + if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) { + $object->setPaymentMethodId($data['paymentMethodId']); + unset($data['paymentMethodId']); } - if (property_exists($data, 'sendEmailsOnStatusChange') && $data->{'sendEmailsOnStatusChange'} !== null) { - $object->setSendEmailsOnStatusChange($data->{'sendEmailsOnStatusChange'}); + elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) { + $object->setPaymentMethodId(null); } - if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { - $object->setStockLocationId($data->{'stockLocationId'}); + if (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] !== null) { + $object->setPaymentMethodIdCode($data['paymentMethodIdCode']); + unset($data['paymentMethodIdCode']); } - if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { - $object->setShippingMethodId($data->{'shippingMethodId'}); + elseif (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] === null) { + $object->setPaymentMethodIdCode(null); } - if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { - $object->setPaymentMethodId($data->{'paymentMethodId'}); + if (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] !== null) { + $object->setPaymentMethodName($data['paymentMethodName']); + unset($data['paymentMethodName']); } - if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { - $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); + elseif (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] === null) { + $object->setPaymentMethodName(null); } - if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { - $object->setPaymentMethodName($data->{'paymentMethodName'}); + if (\array_key_exists('paymentFee', $data) && $data['paymentFee'] !== null) { + $object->setPaymentFee($data['paymentFee']); + unset($data['paymentFee']); } - if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { - $object->setPaymentFee($data->{'paymentFee'}); + elseif (\array_key_exists('paymentFee', $data) && $data['paymentFee'] === null) { + $object->setPaymentFee(null); } - if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { - $object->setPaymentVatRate($data->{'paymentVatRate'}); + if (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] !== null) { + $object->setPaymentVatRate($data['paymentVatRate']); + unset($data['paymentVatRate']); } - if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { - $object->setShippingMethodName($data->{'shippingMethodName'}); + elseif (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] === null) { + $object->setPaymentVatRate(null); } - if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { - $object->setShippingCost($data->{'shippingCost'}); + if (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] !== null) { + $object->setShippingMethodName($data['shippingMethodName']); + unset($data['shippingMethodName']); } - if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { - $object->setShippingVatRate($data->{'shippingVatRate'}); + elseif (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] === null) { + $object->setShippingMethodName(null); } - if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { - $object->setTotalWeight($data->{'totalWeight'}); + if (\array_key_exists('shippingCost', $data) && $data['shippingCost'] !== null) { + $object->setShippingCost($data['shippingCost']); + unset($data['shippingCost']); } - if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { - $object->setCustomInfo1($data->{'customInfo1'}); + elseif (\array_key_exists('shippingCost', $data) && $data['shippingCost'] === null) { + $object->setShippingCost(null); } - if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { - $object->setCustomInfo2($data->{'customInfo2'}); + if (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] !== null) { + $object->setShippingVatRate($data['shippingVatRate']); + unset($data['shippingVatRate']); } - if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { - $object->setCustomInfo3($data->{'customInfo3'}); + elseif (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] === null) { + $object->setShippingVatRate(null); } - if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { - $object->setCustomInfo4($data->{'customInfo4'}); + if (\array_key_exists('totalWeight', $data) && $data['totalWeight'] !== null) { + $object->setTotalWeight($data['totalWeight']); + unset($data['totalWeight']); } - if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { - $object->setDiscountCode($data->{'discountCode'}); + elseif (\array_key_exists('totalWeight', $data) && $data['totalWeight'] === null) { + $object->setTotalWeight(null); } - if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { - $object->setAmountPaid($data->{'amountPaid'}); + if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) { + $object->setCustomInfo1($data['customInfo1']); + unset($data['customInfo1']); } - if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { - $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); + elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) { + $object->setCustomInfo1(null); } - if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { - $object->setIsComplete($data->{'isComplete'}); + if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) { + $object->setCustomInfo2($data['customInfo2']); + unset($data['customInfo2']); } - if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { - $object->setCurrencyCode($data->{'currencyCode'}); + elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) { + $object->setCustomInfo2(null); } - if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { - $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); + if (\array_key_exists('customInfo3', $data) && $data['customInfo3'] !== null) { + $object->setCustomInfo3($data['customInfo3']); + unset($data['customInfo3']); } - if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { - $object->setCurrencyPrecision($data->{'currencyPrecision'}); + elseif (\array_key_exists('customInfo3', $data) && $data['customInfo3'] === null) { + $object->setCustomInfo3(null); } - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (\array_key_exists('customInfo4', $data) && $data['customInfo4'] !== null) { + $object->setCustomInfo4($data['customInfo4']); + unset($data['customInfo4']); } - if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { - $object->setPaymentReference($data->{'paymentReference'}); + elseif (\array_key_exists('customInfo4', $data) && $data['customInfo4'] === null) { + $object->setCustomInfo4(null); } - if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { - $object->setPaymentStatus($data->{'paymentStatus'}); + if (\array_key_exists('discountCode', $data) && $data['discountCode'] !== null) { + $object->setDiscountCode($data['discountCode']); + unset($data['discountCode']); } - if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { - $object->setIsRead($data->{'isRead'}); + elseif (\array_key_exists('discountCode', $data) && $data['discountCode'] === null) { + $object->setDiscountCode(null); } - if (property_exists($data, 'hasComments') && $data->{'hasComments'} !== null) { - $object->setHasComments($data->{'hasComments'}); + if (\array_key_exists('amountPaid', $data) && $data['amountPaid'] !== null) { + $object->setAmountPaid($data['amountPaid']); + unset($data['amountPaid']); } - if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { - $object->setInternalComment($data->{'internalComment'}); + elseif (\array_key_exists('amountPaid', $data) && $data['amountPaid'] === null) { + $object->setAmountPaid(null); } - if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { - $object->setShippingTrackerType($data->{'shippingTrackerType'}); + if (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] !== null) { + $object->setAmountPaidInBaseCurrency($data['amountPaidInBaseCurrency']); + unset($data['amountPaidInBaseCurrency']); } - if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { - $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); + elseif (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] === null) { + $object->setAmountPaidInBaseCurrency(null); } - if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { - $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); + if (\array_key_exists('isComplete', $data) && $data['isComplete'] !== null) { + $object->setIsComplete($data['isComplete']); + unset($data['isComplete']); } - if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { - $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); + elseif (\array_key_exists('isComplete', $data) && $data['isComplete'] === null) { + $object->setIsComplete(null); } - if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { - $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); + if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) { + $object->setCurrencyCode($data['currencyCode']); + unset($data['currencyCode']); } - if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { - $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); + elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) { + $object->setCurrencyCode(null); } - if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { - $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); + if (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] !== null) { + $object->setCurrencyExchangeRate($data['currencyExchangeRate']); + unset($data['currencyExchangeRate']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] === null) { + $object->setCurrencyExchangeRate(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] !== null) { + $object->setCurrencyPrecision($data['currencyPrecision']); + unset($data['currencyPrecision']); } - if (property_exists($data, 'items') && $data->{'items'} !== null) { - $object->setItems($this->denormalizer->denormalize($data->{'items'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json', $context)); + elseif (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] === null) { + $object->setCurrencyPrecision(null); } - if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { - $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection', 'json', $context)); + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); } - if (property_exists($data, 'externalServices') && $data->{'externalServices'} !== null) { - $object->setExternalServices($this->denormalizer->denormalize($data->{'externalServices'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection', 'json', $context)); + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); } - if (property_exists($data, 'customer') && $data->{'customer'} !== null) { - $object->setCustomer($this->denormalizer->denormalize($data->{'customer'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json', $context)); + if (\array_key_exists('paymentReference', $data) && $data['paymentReference'] !== null) { + $object->setPaymentReference($data['paymentReference']); + unset($data['paymentReference']); } - if (property_exists($data, 'status') && $data->{'status'} !== null) { - $object->setStatus($this->denormalizer->denormalize($data->{'status'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json', $context)); + elseif (\array_key_exists('paymentReference', $data) && $data['paymentReference'] === null) { + $object->setPaymentReference(null); + } + if (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] !== null) { + $object->setPaymentStatus($data['paymentStatus']); + unset($data['paymentStatus']); + } + elseif (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] === null) { + $object->setPaymentStatus(null); + } + if (\array_key_exists('isRead', $data) && $data['isRead'] !== null) { + $object->setIsRead($data['isRead']); + unset($data['isRead']); + } + elseif (\array_key_exists('isRead', $data) && $data['isRead'] === null) { + $object->setIsRead(null); + } + if (\array_key_exists('hasComments', $data) && $data['hasComments'] !== null) { + $object->setHasComments($data['hasComments']); + unset($data['hasComments']); + } + elseif (\array_key_exists('hasComments', $data) && $data['hasComments'] === null) { + $object->setHasComments(null); + } + if (\array_key_exists('internalComment', $data) && $data['internalComment'] !== null) { + $object->setInternalComment($data['internalComment']); + unset($data['internalComment']); + } + elseif (\array_key_exists('internalComment', $data) && $data['internalComment'] === null) { + $object->setInternalComment(null); + } + if (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] !== null) { + $object->setShippingTrackerType($data['shippingTrackerType']); + unset($data['shippingTrackerType']); + } + elseif (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] === null) { + $object->setShippingTrackerType(null); + } + if (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] !== null) { + $object->setShippingTrackingNo($data['shippingTrackingNo']); + unset($data['shippingTrackingNo']); + } + elseif (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] === null) { + $object->setShippingTrackingNo(null); + } + if (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] !== null) { + $object->setOriginalCustomerEmail($data['originalCustomerEmail']); + unset($data['originalCustomerEmail']); + } + elseif (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] === null) { + $object->setOriginalCustomerEmail(null); + } + if (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] !== null) { + $object->setOriginalCustomerNationalIdNo($data['originalCustomerNationalIdNo']); + unset($data['originalCustomerNationalIdNo']); + } + elseif (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] === null) { + $object->setOriginalCustomerNationalIdNo(null); + } + if (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] !== null) { + $object->setOriginalCustomerVatNo($data['originalCustomerVatNo']); + unset($data['originalCustomerVatNo']); + } + elseif (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] === null) { + $object->setOriginalCustomerVatNo(null); + } + if (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] !== null) { + $object->setOriginalCustomerCustomInfo1($data['originalCustomerCustomInfo1']); + unset($data['originalCustomerCustomInfo1']); + } + elseif (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] === null) { + $object->setOriginalCustomerCustomInfo1(null); + } + if (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] !== null) { + $object->setOriginalCustomerCustomInfo2($data['originalCustomerCustomInfo2']); + unset($data['originalCustomerCustomInfo2']); + } + elseif (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] === null) { + $object->setOriginalCustomerCustomInfo2(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('items', $data) && $data['items'] !== null) { + $object->setItems($this->denormalizer->denormalize($data['items'], 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json', $context)); + unset($data['items']); + } + elseif (\array_key_exists('items', $data) && $data['items'] === null) { + $object->setItems(null); + } + if (\array_key_exists('addresses', $data) && $data['addresses'] !== null) { + $object->setAddresses($this->denormalizer->denormalize($data['addresses'], 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection', 'json', $context)); + unset($data['addresses']); + } + elseif (\array_key_exists('addresses', $data) && $data['addresses'] === null) { + $object->setAddresses(null); + } + if (\array_key_exists('externalServices', $data) && $data['externalServices'] !== null) { + $object->setExternalServices($this->denormalizer->denormalize($data['externalServices'], 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection', 'json', $context)); + unset($data['externalServices']); + } + elseif (\array_key_exists('externalServices', $data) && $data['externalServices'] === null) { + $object->setExternalServices(null); + } + if (\array_key_exists('customer', $data) && $data['customer'] !== null) { + $object->setCustomer($this->denormalizer->denormalize($data['customer'], 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json', $context)); + unset($data['customer']); + } + elseif (\array_key_exists('customer', $data) && $data['customer'] === null) { + $object->setCustomer(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($this->denormalizer->denormalize($data['status'], 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json', $context)); + unset($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('customerId') && null !== $object->getCustomerId()) { + $data['customerId'] = $object->getCustomerId(); } - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); + if ($object->isInitialized('statusId') && null !== $object->getStatusId()) { + $data['statusId'] = $object->getStatusId(); } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); + if ($object->isInitialized('onOrderStatusChangeSendEmail') && null !== $object->getOnOrderStatusChangeSendEmail()) { + $data['onOrderStatusChangeSendEmail'] = $object->getOnOrderStatusChangeSendEmail(); } - if (null !== $object->getOnOrderStatusChangeSendEmail()) { - $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); + if ($object->isInitialized('onOrderStatusChangeProcessPayment') && null !== $object->getOnOrderStatusChangeProcessPayment()) { + $data['onOrderStatusChangeProcessPayment'] = $object->getOnOrderStatusChangeProcessPayment(); } - if (null !== $object->getOnOrderStatusChangeProcessPayment()) { - $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); + if ($object->isInitialized('sendEmailsOnStatusChange') && null !== $object->getSendEmailsOnStatusChange()) { + $data['sendEmailsOnStatusChange'] = $object->getSendEmailsOnStatusChange(); } - if (null !== $object->getSendEmailsOnStatusChange()) { - $data->{'sendEmailsOnStatusChange'} = $object->getSendEmailsOnStatusChange(); + if ($object->isInitialized('stockLocationId') && null !== $object->getStockLocationId()) { + $data['stockLocationId'] = $object->getStockLocationId(); } - if (null !== $object->getStockLocationId()) { - $data->{'stockLocationId'} = $object->getStockLocationId(); + if ($object->isInitialized('shippingMethodId') && null !== $object->getShippingMethodId()) { + $data['shippingMethodId'] = $object->getShippingMethodId(); } - if (null !== $object->getShippingMethodId()) { - $data->{'shippingMethodId'} = $object->getShippingMethodId(); + if ($object->isInitialized('paymentMethodId') && null !== $object->getPaymentMethodId()) { + $data['paymentMethodId'] = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodId()) { - $data->{'paymentMethodId'} = $object->getPaymentMethodId(); + if ($object->isInitialized('paymentMethodName') && null !== $object->getPaymentMethodName()) { + $data['paymentMethodName'] = $object->getPaymentMethodName(); } - if (null !== $object->getPaymentMethodName()) { - $data->{'paymentMethodName'} = $object->getPaymentMethodName(); + if ($object->isInitialized('paymentFee') && null !== $object->getPaymentFee()) { + $data['paymentFee'] = $object->getPaymentFee(); } - if (null !== $object->getPaymentFee()) { - $data->{'paymentFee'} = $object->getPaymentFee(); + if ($object->isInitialized('paymentVatRate') && null !== $object->getPaymentVatRate()) { + $data['paymentVatRate'] = $object->getPaymentVatRate(); } - if (null !== $object->getPaymentVatRate()) { - $data->{'paymentVatRate'} = $object->getPaymentVatRate(); + if ($object->isInitialized('shippingMethodName') && null !== $object->getShippingMethodName()) { + $data['shippingMethodName'] = $object->getShippingMethodName(); } - if (null !== $object->getShippingMethodName()) { - $data->{'shippingMethodName'} = $object->getShippingMethodName(); + if ($object->isInitialized('shippingCost') && null !== $object->getShippingCost()) { + $data['shippingCost'] = $object->getShippingCost(); } - if (null !== $object->getShippingCost()) { - $data->{'shippingCost'} = $object->getShippingCost(); + if ($object->isInitialized('shippingVatRate') && null !== $object->getShippingVatRate()) { + $data['shippingVatRate'] = $object->getShippingVatRate(); } - if (null !== $object->getShippingVatRate()) { - $data->{'shippingVatRate'} = $object->getShippingVatRate(); + if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) { + $data['customInfo1'] = $object->getCustomInfo1(); } - if (null !== $object->getCustomInfo1()) { - $data->{'customInfo1'} = $object->getCustomInfo1(); + if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) { + $data['customInfo2'] = $object->getCustomInfo2(); } - if (null !== $object->getCustomInfo2()) { - $data->{'customInfo2'} = $object->getCustomInfo2(); + if ($object->isInitialized('customInfo3') && null !== $object->getCustomInfo3()) { + $data['customInfo3'] = $object->getCustomInfo3(); } - if (null !== $object->getCustomInfo3()) { - $data->{'customInfo3'} = $object->getCustomInfo3(); + if ($object->isInitialized('customInfo4') && null !== $object->getCustomInfo4()) { + $data['customInfo4'] = $object->getCustomInfo4(); } - if (null !== $object->getCustomInfo4()) { - $data->{'customInfo4'} = $object->getCustomInfo4(); + if ($object->isInitialized('discountCode') && null !== $object->getDiscountCode()) { + $data['discountCode'] = $object->getDiscountCode(); } - if (null !== $object->getDiscountCode()) { - $data->{'discountCode'} = $object->getDiscountCode(); + if ($object->isInitialized('amountPaid') && null !== $object->getAmountPaid()) { + $data['amountPaid'] = $object->getAmountPaid(); } - if (null !== $object->getAmountPaid()) { - $data->{'amountPaid'} = $object->getAmountPaid(); + if ($object->isInitialized('isComplete') && null !== $object->getIsComplete()) { + $data['isComplete'] = $object->getIsComplete(); } - if (null !== $object->getIsComplete()) { - $data->{'isComplete'} = $object->getIsComplete(); + if ($object->isInitialized('currencyCode') && null !== $object->getCurrencyCode()) { + $data['currencyCode'] = $object->getCurrencyCode(); } - if (null !== $object->getCurrencyCode()) { - $data->{'currencyCode'} = $object->getCurrencyCode(); + if ($object->isInitialized('currencyExchangeRate') && null !== $object->getCurrencyExchangeRate()) { + $data['currencyExchangeRate'] = $object->getCurrencyExchangeRate(); } - if (null !== $object->getCurrencyExchangeRate()) { - $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); + if ($object->isInitialized('currencyPrecision') && null !== $object->getCurrencyPrecision()) { + $data['currencyPrecision'] = $object->getCurrencyPrecision(); } - if (null !== $object->getCurrencyPrecision()) { - $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); } - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + if ($object->isInitialized('paymentReference') && null !== $object->getPaymentReference()) { + $data['paymentReference'] = $object->getPaymentReference(); } - if (null !== $object->getPaymentReference()) { - $data->{'paymentReference'} = $object->getPaymentReference(); + if ($object->isInitialized('paymentStatus') && null !== $object->getPaymentStatus()) { + $data['paymentStatus'] = $object->getPaymentStatus(); } - if (null !== $object->getPaymentStatus()) { - $data->{'paymentStatus'} = $object->getPaymentStatus(); + if ($object->isInitialized('isRead') && null !== $object->getIsRead()) { + $data['isRead'] = $object->getIsRead(); } - if (null !== $object->getIsRead()) { - $data->{'isRead'} = $object->getIsRead(); + if ($object->isInitialized('internalComment') && null !== $object->getInternalComment()) { + $data['internalComment'] = $object->getInternalComment(); } - if (null !== $object->getInternalComment()) { - $data->{'internalComment'} = $object->getInternalComment(); + if ($object->isInitialized('shippingTrackerType') && null !== $object->getShippingTrackerType()) { + $data['shippingTrackerType'] = $object->getShippingTrackerType(); } - if (null !== $object->getShippingTrackerType()) { - $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); + if ($object->isInitialized('shippingTrackingNo') && null !== $object->getShippingTrackingNo()) { + $data['shippingTrackingNo'] = $object->getShippingTrackingNo(); } - if (null !== $object->getShippingTrackingNo()) { - $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); + if ($object->isInitialized('originalCustomerEmail') && null !== $object->getOriginalCustomerEmail()) { + $data['originalCustomerEmail'] = $object->getOriginalCustomerEmail(); } - if (null !== $object->getOriginalCustomerEmail()) { - $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); + if ($object->isInitialized('originalCustomerNationalIdNo') && null !== $object->getOriginalCustomerNationalIdNo()) { + $data['originalCustomerNationalIdNo'] = $object->getOriginalCustomerNationalIdNo(); } - if (null !== $object->getOriginalCustomerNationalIdNo()) { - $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); + if ($object->isInitialized('originalCustomerVatNo') && null !== $object->getOriginalCustomerVatNo()) { + $data['originalCustomerVatNo'] = $object->getOriginalCustomerVatNo(); } - if (null !== $object->getOriginalCustomerVatNo()) { - $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); + if ($object->isInitialized('originalCustomerCustomInfo1') && null !== $object->getOriginalCustomerCustomInfo1()) { + $data['originalCustomerCustomInfo1'] = $object->getOriginalCustomerCustomInfo1(); } - if (null !== $object->getOriginalCustomerCustomInfo1()) { - $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); + if ($object->isInitialized('originalCustomerCustomInfo2') && null !== $object->getOriginalCustomerCustomInfo2()) { + $data['originalCustomerCustomInfo2'] = $object->getOriginalCustomerCustomInfo2(); } - if (null !== $object->getOriginalCustomerCustomInfo2()) { - $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); + if ($object->isInitialized('items') && null !== $object->getItems()) { + $data['items'] = $this->normalizer->normalize($object->getItems(), 'json', $context); } - if (null !== $object->getItems()) { - $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context); + if ($object->isInitialized('addresses') && null !== $object->getAddresses()) { + $data['addresses'] = $this->normalizer->normalize($object->getAddresses(), 'json', $context); } - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + if ($object->isInitialized('externalServices') && null !== $object->getExternalServices()) { + $data['externalServices'] = $this->normalizer->normalize($object->getExternalServices(), 'json', $context); } - if (null !== $object->getExternalServices()) { - $data->{'externalServices'} = $this->normalizer->normalize($object->getExternalServices(), 'json', $context); + if ($object->isInitialized('customer') && null !== $object->getCustomer()) { + $data['customer'] = $this->normalizer->normalize($object->getCustomer(), 'json', $context); } - if (null !== $object->getCustomer()) { - $data->{'customer'} = $this->normalizer->normalize($object->getCustomer(), 'json', $context); + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); } - if (null !== $object->getStatus()) { - $data->{'status'} = $this->normalizer->normalize($object->getStatus(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php index 8f285625..52642f13 100644 --- a/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderPutModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,297 +16,569 @@ class OrderPutModelNormalizer implements DenormalizerInterface, NormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderPutModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderPutModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderPutModel(); - if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { - $object->setOrderId($data->{'orderId'}); + if (\array_key_exists('totalAmount', $data) && \is_int($data['totalAmount'])) { + $data['totalAmount'] = (double) $data['totalAmount']; + } + if (\array_key_exists('totalVat', $data) && \is_int($data['totalVat'])) { + $data['totalVat'] = (double) $data['totalVat']; + } + if (\array_key_exists('amountToPay', $data) && \is_int($data['amountToPay'])) { + $data['amountToPay'] = (double) $data['amountToPay']; + } + if (\array_key_exists('totalAmountInBaseCurrency', $data) && \is_int($data['totalAmountInBaseCurrency'])) { + $data['totalAmountInBaseCurrency'] = (double) $data['totalAmountInBaseCurrency']; + } + if (\array_key_exists('totalVatInBaseCurrency', $data) && \is_int($data['totalVatInBaseCurrency'])) { + $data['totalVatInBaseCurrency'] = (double) $data['totalVatInBaseCurrency']; + } + if (\array_key_exists('amountToPayInBaseCurrency', $data) && \is_int($data['amountToPayInBaseCurrency'])) { + $data['amountToPayInBaseCurrency'] = (double) $data['amountToPayInBaseCurrency']; + } + if (\array_key_exists('paymentFee', $data) && \is_int($data['paymentFee'])) { + $data['paymentFee'] = (double) $data['paymentFee']; + } + if (\array_key_exists('paymentVatRate', $data) && \is_int($data['paymentVatRate'])) { + $data['paymentVatRate'] = (double) $data['paymentVatRate']; + } + if (\array_key_exists('shippingCost', $data) && \is_int($data['shippingCost'])) { + $data['shippingCost'] = (double) $data['shippingCost']; + } + if (\array_key_exists('shippingVatRate', $data) && \is_int($data['shippingVatRate'])) { + $data['shippingVatRate'] = (double) $data['shippingVatRate']; + } + if (\array_key_exists('totalWeight', $data) && \is_int($data['totalWeight'])) { + $data['totalWeight'] = (double) $data['totalWeight']; + } + if (\array_key_exists('amountPaid', $data) && \is_int($data['amountPaid'])) { + $data['amountPaid'] = (double) $data['amountPaid']; + } + if (\array_key_exists('amountPaidInBaseCurrency', $data) && \is_int($data['amountPaidInBaseCurrency'])) { + $data['amountPaidInBaseCurrency'] = (double) $data['amountPaidInBaseCurrency']; + } + if (\array_key_exists('currencyExchangeRate', $data) && \is_int($data['currencyExchangeRate'])) { + $data['currencyExchangeRate'] = (double) $data['currencyExchangeRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('orderId', $data) && $data['orderId'] !== null) { + $object->setOrderId($data['orderId']); + unset($data['orderId']); + } + elseif (\array_key_exists('orderId', $data) && $data['orderId'] === null) { + $object->setOrderId(null); + } + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); + } + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); + } + if (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] !== null) { + $object->setBaseCurrencyCode($data['baseCurrencyCode']); + unset($data['baseCurrencyCode']); + } + elseif (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] === null) { + $object->setBaseCurrencyCode(null); + } + if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) { + $object->setShopCountryCode($data['shopCountryCode']); + unset($data['shopCountryCode']); + } + elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) { + $object->setShopCountryCode(null); + } + if (\array_key_exists('totalAmount', $data) && $data['totalAmount'] !== null) { + $object->setTotalAmount($data['totalAmount']); + unset($data['totalAmount']); + } + elseif (\array_key_exists('totalAmount', $data) && $data['totalAmount'] === null) { + $object->setTotalAmount(null); + } + if (\array_key_exists('totalVat', $data) && $data['totalVat'] !== null) { + $object->setTotalVat($data['totalVat']); + unset($data['totalVat']); + } + elseif (\array_key_exists('totalVat', $data) && $data['totalVat'] === null) { + $object->setTotalVat(null); + } + if (\array_key_exists('amountToPay', $data) && $data['amountToPay'] !== null) { + $object->setAmountToPay($data['amountToPay']); + unset($data['amountToPay']); + } + elseif (\array_key_exists('amountToPay', $data) && $data['amountToPay'] === null) { + $object->setAmountToPay(null); + } + if (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] !== null) { + $object->setTotalAmountInBaseCurrency($data['totalAmountInBaseCurrency']); + unset($data['totalAmountInBaseCurrency']); + } + elseif (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] === null) { + $object->setTotalAmountInBaseCurrency(null); + } + if (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] !== null) { + $object->setTotalVatInBaseCurrency($data['totalVatInBaseCurrency']); + unset($data['totalVatInBaseCurrency']); + } + elseif (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] === null) { + $object->setTotalVatInBaseCurrency(null); + } + if (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] !== null) { + $object->setAmountToPayInBaseCurrency($data['amountToPayInBaseCurrency']); + unset($data['amountToPayInBaseCurrency']); + } + elseif (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] === null) { + $object->setAmountToPayInBaseCurrency(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) { + $object->setCustomerId($data['customerId']); + unset($data['customerId']); } - if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { - $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); + elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) { + $object->setCustomerId(null); } - if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { - $object->setShopCountryCode($data->{'shopCountryCode'}); + if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) { + $object->setStatusId($data['statusId']); + unset($data['statusId']); } - if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { - $object->setTotalAmount($data->{'totalAmount'}); + elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) { + $object->setStatusId(null); } - if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { - $object->setTotalVat($data->{'totalVat'}); + if (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] !== null) { + $object->setOnOrderStatusChangeSendEmail($data['onOrderStatusChangeSendEmail']); + unset($data['onOrderStatusChangeSendEmail']); } - if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { - $object->setAmountToPay($data->{'amountToPay'}); + elseif (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] === null) { + $object->setOnOrderStatusChangeSendEmail(null); } - if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { - $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); + if (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] !== null) { + $object->setOnOrderStatusChangeProcessPayment($data['onOrderStatusChangeProcessPayment']); + unset($data['onOrderStatusChangeProcessPayment']); } - if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { - $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); + elseif (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] === null) { + $object->setOnOrderStatusChangeProcessPayment(null); } - if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { - $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); + if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) { + $object->setShippingMethodId($data['shippingMethodId']); + unset($data['shippingMethodId']); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) { + $object->setShippingMethodId(null); } - if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { - $object->setCustomerId($data->{'customerId'}); + if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) { + $object->setPaymentMethodId($data['paymentMethodId']); + unset($data['paymentMethodId']); } - if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { - $object->setStatusId($data->{'statusId'}); + elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) { + $object->setPaymentMethodId(null); } - if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { - $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); + if (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] !== null) { + $object->setPaymentMethodIdCode($data['paymentMethodIdCode']); + unset($data['paymentMethodIdCode']); } - if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { - $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); + elseif (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] === null) { + $object->setPaymentMethodIdCode(null); } - if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { - $object->setShippingMethodId($data->{'shippingMethodId'}); + if (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] !== null) { + $object->setPaymentMethodName($data['paymentMethodName']); + unset($data['paymentMethodName']); } - if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { - $object->setPaymentMethodId($data->{'paymentMethodId'}); + elseif (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] === null) { + $object->setPaymentMethodName(null); } - if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { - $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); + if (\array_key_exists('paymentFee', $data) && $data['paymentFee'] !== null) { + $object->setPaymentFee($data['paymentFee']); + unset($data['paymentFee']); } - if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { - $object->setPaymentMethodName($data->{'paymentMethodName'}); + elseif (\array_key_exists('paymentFee', $data) && $data['paymentFee'] === null) { + $object->setPaymentFee(null); } - if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { - $object->setPaymentFee($data->{'paymentFee'}); + if (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] !== null) { + $object->setPaymentVatRate($data['paymentVatRate']); + unset($data['paymentVatRate']); } - if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { - $object->setPaymentVatRate($data->{'paymentVatRate'}); + elseif (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] === null) { + $object->setPaymentVatRate(null); } - if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { - $object->setShippingMethodName($data->{'shippingMethodName'}); + if (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] !== null) { + $object->setShippingMethodName($data['shippingMethodName']); + unset($data['shippingMethodName']); } - if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { - $object->setShippingCost($data->{'shippingCost'}); + elseif (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] === null) { + $object->setShippingMethodName(null); } - if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { - $object->setShippingVatRate($data->{'shippingVatRate'}); + if (\array_key_exists('shippingCost', $data) && $data['shippingCost'] !== null) { + $object->setShippingCost($data['shippingCost']); + unset($data['shippingCost']); } - if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { - $object->setTotalWeight($data->{'totalWeight'}); + elseif (\array_key_exists('shippingCost', $data) && $data['shippingCost'] === null) { + $object->setShippingCost(null); } - if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { - $object->setCustomInfo1($data->{'customInfo1'}); + if (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] !== null) { + $object->setShippingVatRate($data['shippingVatRate']); + unset($data['shippingVatRate']); } - if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { - $object->setCustomInfo2($data->{'customInfo2'}); + elseif (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] === null) { + $object->setShippingVatRate(null); } - if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { - $object->setCustomInfo3($data->{'customInfo3'}); + if (\array_key_exists('totalWeight', $data) && $data['totalWeight'] !== null) { + $object->setTotalWeight($data['totalWeight']); + unset($data['totalWeight']); } - if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { - $object->setCustomInfo4($data->{'customInfo4'}); + elseif (\array_key_exists('totalWeight', $data) && $data['totalWeight'] === null) { + $object->setTotalWeight(null); } - if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { - $object->setDiscountCode($data->{'discountCode'}); + if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) { + $object->setCustomInfo1($data['customInfo1']); + unset($data['customInfo1']); } - if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { - $object->setAmountPaid($data->{'amountPaid'}); + elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) { + $object->setCustomInfo1(null); } - if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { - $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); + if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) { + $object->setCustomInfo2($data['customInfo2']); + unset($data['customInfo2']); } - if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { - $object->setIsComplete($data->{'isComplete'}); + elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) { + $object->setCustomInfo2(null); } - if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { - $object->setCurrencyCode($data->{'currencyCode'}); + if (\array_key_exists('customInfo3', $data) && $data['customInfo3'] !== null) { + $object->setCustomInfo3($data['customInfo3']); + unset($data['customInfo3']); } - if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { - $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); + elseif (\array_key_exists('customInfo3', $data) && $data['customInfo3'] === null) { + $object->setCustomInfo3(null); } - if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { - $object->setCurrencyPrecision($data->{'currencyPrecision'}); + if (\array_key_exists('customInfo4', $data) && $data['customInfo4'] !== null) { + $object->setCustomInfo4($data['customInfo4']); + unset($data['customInfo4']); } - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + elseif (\array_key_exists('customInfo4', $data) && $data['customInfo4'] === null) { + $object->setCustomInfo4(null); } - if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { - $object->setPaymentReference($data->{'paymentReference'}); + if (\array_key_exists('discountCode', $data) && $data['discountCode'] !== null) { + $object->setDiscountCode($data['discountCode']); + unset($data['discountCode']); } - if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { - $object->setPaymentStatus($data->{'paymentStatus'}); + elseif (\array_key_exists('discountCode', $data) && $data['discountCode'] === null) { + $object->setDiscountCode(null); } - if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { - $object->setIsRead($data->{'isRead'}); + if (\array_key_exists('amountPaid', $data) && $data['amountPaid'] !== null) { + $object->setAmountPaid($data['amountPaid']); + unset($data['amountPaid']); } - if (property_exists($data, 'hasComment') && $data->{'hasComment'} !== null) { - $object->setHasComment($data->{'hasComment'}); + elseif (\array_key_exists('amountPaid', $data) && $data['amountPaid'] === null) { + $object->setAmountPaid(null); } - if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { - $object->setInternalComment($data->{'internalComment'}); + if (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] !== null) { + $object->setAmountPaidInBaseCurrency($data['amountPaidInBaseCurrency']); + unset($data['amountPaidInBaseCurrency']); } - if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { - $object->setShippingTrackerType($data->{'shippingTrackerType'}); + elseif (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] === null) { + $object->setAmountPaidInBaseCurrency(null); } - if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { - $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); + if (\array_key_exists('isComplete', $data) && $data['isComplete'] !== null) { + $object->setIsComplete($data['isComplete']); + unset($data['isComplete']); } - if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { - $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); + elseif (\array_key_exists('isComplete', $data) && $data['isComplete'] === null) { + $object->setIsComplete(null); } - if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { - $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); + if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) { + $object->setCurrencyCode($data['currencyCode']); + unset($data['currencyCode']); } - if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { - $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); + elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) { + $object->setCurrencyCode(null); } - if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { - $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); + if (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] !== null) { + $object->setCurrencyExchangeRate($data['currencyExchangeRate']); + unset($data['currencyExchangeRate']); } - if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { - $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); + elseif (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] === null) { + $object->setCurrencyExchangeRate(null); } - if (property_exists($data, 'items') && $data->{'items'} !== null) { + if (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] !== null) { + $object->setCurrencyPrecision($data['currencyPrecision']); + unset($data['currencyPrecision']); + } + elseif (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] === null) { + $object->setCurrencyPrecision(null); + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('paymentReference', $data) && $data['paymentReference'] !== null) { + $object->setPaymentReference($data['paymentReference']); + unset($data['paymentReference']); + } + elseif (\array_key_exists('paymentReference', $data) && $data['paymentReference'] === null) { + $object->setPaymentReference(null); + } + if (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] !== null) { + $object->setPaymentStatus($data['paymentStatus']); + unset($data['paymentStatus']); + } + elseif (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] === null) { + $object->setPaymentStatus(null); + } + if (\array_key_exists('isRead', $data) && $data['isRead'] !== null) { + $object->setIsRead($data['isRead']); + unset($data['isRead']); + } + elseif (\array_key_exists('isRead', $data) && $data['isRead'] === null) { + $object->setIsRead(null); + } + if (\array_key_exists('hasComment', $data) && $data['hasComment'] !== null) { + $object->setHasComment($data['hasComment']); + unset($data['hasComment']); + } + elseif (\array_key_exists('hasComment', $data) && $data['hasComment'] === null) { + $object->setHasComment(null); + } + if (\array_key_exists('internalComment', $data) && $data['internalComment'] !== null) { + $object->setInternalComment($data['internalComment']); + unset($data['internalComment']); + } + elseif (\array_key_exists('internalComment', $data) && $data['internalComment'] === null) { + $object->setInternalComment(null); + } + if (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] !== null) { + $object->setShippingTrackerType($data['shippingTrackerType']); + unset($data['shippingTrackerType']); + } + elseif (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] === null) { + $object->setShippingTrackerType(null); + } + if (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] !== null) { + $object->setShippingTrackingNo($data['shippingTrackingNo']); + unset($data['shippingTrackingNo']); + } + elseif (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] === null) { + $object->setShippingTrackingNo(null); + } + if (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] !== null) { + $object->setOriginalCustomerEmail($data['originalCustomerEmail']); + unset($data['originalCustomerEmail']); + } + elseif (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] === null) { + $object->setOriginalCustomerEmail(null); + } + if (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] !== null) { + $object->setOriginalCustomerNationalIdNo($data['originalCustomerNationalIdNo']); + unset($data['originalCustomerNationalIdNo']); + } + elseif (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] === null) { + $object->setOriginalCustomerNationalIdNo(null); + } + if (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] !== null) { + $object->setOriginalCustomerVatNo($data['originalCustomerVatNo']); + unset($data['originalCustomerVatNo']); + } + elseif (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] === null) { + $object->setOriginalCustomerVatNo(null); + } + if (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] !== null) { + $object->setOriginalCustomerCustomInfo1($data['originalCustomerCustomInfo1']); + unset($data['originalCustomerCustomInfo1']); + } + elseif (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] === null) { + $object->setOriginalCustomerCustomInfo1(null); + } + if (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] !== null) { + $object->setOriginalCustomerCustomInfo2($data['originalCustomerCustomInfo2']); + unset($data['originalCustomerCustomInfo2']); + } + elseif (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] === null) { + $object->setOriginalCustomerCustomInfo2(null); + } + if (\array_key_exists('items', $data) && $data['items'] !== null) { $values = array(); - foreach ($data->{'items'} as $value) { + foreach ($data['items'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); } $object->setItems($values); + unset($data['items']); } - if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { - $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); + elseif (\array_key_exists('items', $data) && $data['items'] === null) { + $object->setItems(null); + } + if (\array_key_exists('addresses', $data) && $data['addresses'] !== null) { + $object->setAddresses($this->denormalizer->denormalize($data['addresses'], 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); + unset($data['addresses']); + } + elseif (\array_key_exists('addresses', $data) && $data['addresses'] === null) { + $object->setAddresses(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); - } - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); + if ($object->isInitialized('customerId') && null !== $object->getCustomerId()) { + $data['customerId'] = $object->getCustomerId(); } - if (null !== $object->getOnOrderStatusChangeSendEmail()) { - $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); + $data['statusId'] = $object->getStatusId(); + if ($object->isInitialized('onOrderStatusChangeSendEmail') && null !== $object->getOnOrderStatusChangeSendEmail()) { + $data['onOrderStatusChangeSendEmail'] = $object->getOnOrderStatusChangeSendEmail(); } - if (null !== $object->getOnOrderStatusChangeProcessPayment()) { - $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); + if ($object->isInitialized('onOrderStatusChangeProcessPayment') && null !== $object->getOnOrderStatusChangeProcessPayment()) { + $data['onOrderStatusChangeProcessPayment'] = $object->getOnOrderStatusChangeProcessPayment(); } - if (null !== $object->getShippingMethodId()) { - $data->{'shippingMethodId'} = $object->getShippingMethodId(); + if ($object->isInitialized('shippingMethodId') && null !== $object->getShippingMethodId()) { + $data['shippingMethodId'] = $object->getShippingMethodId(); } - if (null !== $object->getPaymentMethodId()) { - $data->{'paymentMethodId'} = $object->getPaymentMethodId(); + if ($object->isInitialized('paymentMethodId') && null !== $object->getPaymentMethodId()) { + $data['paymentMethodId'] = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodName()) { - $data->{'paymentMethodName'} = $object->getPaymentMethodName(); + if ($object->isInitialized('paymentMethodName') && null !== $object->getPaymentMethodName()) { + $data['paymentMethodName'] = $object->getPaymentMethodName(); } - if (null !== $object->getPaymentFee()) { - $data->{'paymentFee'} = $object->getPaymentFee(); + if ($object->isInitialized('paymentFee') && null !== $object->getPaymentFee()) { + $data['paymentFee'] = $object->getPaymentFee(); } - if (null !== $object->getPaymentVatRate()) { - $data->{'paymentVatRate'} = $object->getPaymentVatRate(); + if ($object->isInitialized('paymentVatRate') && null !== $object->getPaymentVatRate()) { + $data['paymentVatRate'] = $object->getPaymentVatRate(); } - if (null !== $object->getShippingMethodName()) { - $data->{'shippingMethodName'} = $object->getShippingMethodName(); + if ($object->isInitialized('shippingMethodName') && null !== $object->getShippingMethodName()) { + $data['shippingMethodName'] = $object->getShippingMethodName(); } - if (null !== $object->getShippingCost()) { - $data->{'shippingCost'} = $object->getShippingCost(); + if ($object->isInitialized('shippingCost') && null !== $object->getShippingCost()) { + $data['shippingCost'] = $object->getShippingCost(); } - if (null !== $object->getShippingVatRate()) { - $data->{'shippingVatRate'} = $object->getShippingVatRate(); + if ($object->isInitialized('shippingVatRate') && null !== $object->getShippingVatRate()) { + $data['shippingVatRate'] = $object->getShippingVatRate(); } - if (null !== $object->getCustomInfo1()) { - $data->{'customInfo1'} = $object->getCustomInfo1(); + if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) { + $data['customInfo1'] = $object->getCustomInfo1(); } - if (null !== $object->getCustomInfo2()) { - $data->{'customInfo2'} = $object->getCustomInfo2(); + if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) { + $data['customInfo2'] = $object->getCustomInfo2(); } - if (null !== $object->getCustomInfo3()) { - $data->{'customInfo3'} = $object->getCustomInfo3(); + if ($object->isInitialized('customInfo3') && null !== $object->getCustomInfo3()) { + $data['customInfo3'] = $object->getCustomInfo3(); } - if (null !== $object->getCustomInfo4()) { - $data->{'customInfo4'} = $object->getCustomInfo4(); + if ($object->isInitialized('customInfo4') && null !== $object->getCustomInfo4()) { + $data['customInfo4'] = $object->getCustomInfo4(); } - if (null !== $object->getDiscountCode()) { - $data->{'discountCode'} = $object->getDiscountCode(); + if ($object->isInitialized('discountCode') && null !== $object->getDiscountCode()) { + $data['discountCode'] = $object->getDiscountCode(); } - if (null !== $object->getAmountPaid()) { - $data->{'amountPaid'} = $object->getAmountPaid(); + if ($object->isInitialized('amountPaid') && null !== $object->getAmountPaid()) { + $data['amountPaid'] = $object->getAmountPaid(); } - if (null !== $object->getIsComplete()) { - $data->{'isComplete'} = $object->getIsComplete(); + if ($object->isInitialized('isComplete') && null !== $object->getIsComplete()) { + $data['isComplete'] = $object->getIsComplete(); } - if (null !== $object->getCurrencyCode()) { - $data->{'currencyCode'} = $object->getCurrencyCode(); + if ($object->isInitialized('currencyCode') && null !== $object->getCurrencyCode()) { + $data['currencyCode'] = $object->getCurrencyCode(); } - if (null !== $object->getCurrencyExchangeRate()) { - $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); + if ($object->isInitialized('currencyExchangeRate') && null !== $object->getCurrencyExchangeRate()) { + $data['currencyExchangeRate'] = $object->getCurrencyExchangeRate(); } - if (null !== $object->getCurrencyPrecision()) { - $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); + if ($object->isInitialized('currencyPrecision') && null !== $object->getCurrencyPrecision()) { + $data['currencyPrecision'] = $object->getCurrencyPrecision(); } - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); } - if (null !== $object->getPaymentReference()) { - $data->{'paymentReference'} = $object->getPaymentReference(); + if ($object->isInitialized('paymentReference') && null !== $object->getPaymentReference()) { + $data['paymentReference'] = $object->getPaymentReference(); } - if (null !== $object->getPaymentStatus()) { - $data->{'paymentStatus'} = $object->getPaymentStatus(); + if ($object->isInitialized('paymentStatus') && null !== $object->getPaymentStatus()) { + $data['paymentStatus'] = $object->getPaymentStatus(); } - if (null !== $object->getIsRead()) { - $data->{'isRead'} = $object->getIsRead(); + if ($object->isInitialized('isRead') && null !== $object->getIsRead()) { + $data['isRead'] = $object->getIsRead(); } - if (null !== $object->getInternalComment()) { - $data->{'internalComment'} = $object->getInternalComment(); + if ($object->isInitialized('internalComment') && null !== $object->getInternalComment()) { + $data['internalComment'] = $object->getInternalComment(); } - if (null !== $object->getShippingTrackerType()) { - $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); + if ($object->isInitialized('shippingTrackerType') && null !== $object->getShippingTrackerType()) { + $data['shippingTrackerType'] = $object->getShippingTrackerType(); } - if (null !== $object->getShippingTrackingNo()) { - $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); + if ($object->isInitialized('shippingTrackingNo') && null !== $object->getShippingTrackingNo()) { + $data['shippingTrackingNo'] = $object->getShippingTrackingNo(); } - if (null !== $object->getOriginalCustomerEmail()) { - $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); + if ($object->isInitialized('originalCustomerEmail') && null !== $object->getOriginalCustomerEmail()) { + $data['originalCustomerEmail'] = $object->getOriginalCustomerEmail(); } - if (null !== $object->getOriginalCustomerNationalIdNo()) { - $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); + if ($object->isInitialized('originalCustomerNationalIdNo') && null !== $object->getOriginalCustomerNationalIdNo()) { + $data['originalCustomerNationalIdNo'] = $object->getOriginalCustomerNationalIdNo(); } - if (null !== $object->getOriginalCustomerVatNo()) { - $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); + if ($object->isInitialized('originalCustomerVatNo') && null !== $object->getOriginalCustomerVatNo()) { + $data['originalCustomerVatNo'] = $object->getOriginalCustomerVatNo(); } - if (null !== $object->getOriginalCustomerCustomInfo1()) { - $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); + if ($object->isInitialized('originalCustomerCustomInfo1') && null !== $object->getOriginalCustomerCustomInfo1()) { + $data['originalCustomerCustomInfo1'] = $object->getOriginalCustomerCustomInfo1(); } - if (null !== $object->getOriginalCustomerCustomInfo2()) { - $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); + if ($object->isInitialized('originalCustomerCustomInfo2') && null !== $object->getOriginalCustomerCustomInfo2()) { + $data['originalCustomerCustomInfo2'] = $object->getOriginalCustomerCustomInfo2(); } - if (null !== $object->getItems()) { + if ($object->isInitialized('items') && null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'items'} = $values; + $data['items'] = $values; } - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + if ($object->isInitialized('addresses') && null !== $object->getAddresses()) { + $data['addresses'] = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderPutModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php index 8ba85601..9e88e8b5 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class OrderStatusLanguageModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderStatusLanguageModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php index 13b5cfb8..57fc5877 100644 --- a/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class OrderStatusLanguageModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderStatusLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php index c76d7e66..e4ddc16a 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class OrderStatusModelCollectionNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderStatusModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php index fe084284..61552110 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class OrderStatusModelItemNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderStatusModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\OrderStatusModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderStatusModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php index 21178e7f..a9bc6d16 100644 --- a/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderStatusModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,43 +16,87 @@ class OrderStatusModelNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderStatusModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderStatusModel(); - if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { - $object->setStatusId($data->{'statusId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) { + $object->setStatusId($data['statusId']); + unset($data['statusId']); + } + elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) { + $object->setStatusId(null); + } + if (\array_key_exists('shouldSendEmail', $data) && $data['shouldSendEmail'] !== null) { + $object->setShouldSendEmail($data['shouldSendEmail']); + unset($data['shouldSendEmail']); + } + elseif (\array_key_exists('shouldSendEmail', $data) && $data['shouldSendEmail'] === null) { + $object->setShouldSendEmail(null); } - if (property_exists($data, 'shouldSendEmail') && $data->{'shouldSendEmail'} !== null) { - $object->setShouldSendEmail($data->{'shouldSendEmail'}); + if (\array_key_exists('idCode', $data) && $data['idCode'] !== null) { + $object->setIdCode($data['idCode']); + unset($data['idCode']); } - if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { - $object->setIdCode($data->{'idCode'}); + elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) { + $object->setIdCode(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection', 'json', $context)); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getShouldSendEmail()) { - $data->{'shouldSendEmail'} = $object->getShouldSendEmail(); + $data = array(); + if ($object->isInitialized('shouldSendEmail') && null !== $object->getShouldSendEmail()) { + $data['shouldSendEmail'] = $object->getShouldSendEmail(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderStatusModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php index 90feda22..31353b4c 100644 --- a/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/OrderUpdateModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,309 +16,591 @@ class OrderUpdateModelNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\OrderUpdateModel(); - if (property_exists($data, 'orderId') && $data->{'orderId'} !== null) { - $object->setOrderId($data->{'orderId'}); + if (\array_key_exists('totalAmount', $data) && \is_int($data['totalAmount'])) { + $data['totalAmount'] = (double) $data['totalAmount']; + } + if (\array_key_exists('totalVat', $data) && \is_int($data['totalVat'])) { + $data['totalVat'] = (double) $data['totalVat']; + } + if (\array_key_exists('amountToPay', $data) && \is_int($data['amountToPay'])) { + $data['amountToPay'] = (double) $data['amountToPay']; + } + if (\array_key_exists('totalAmountInBaseCurrency', $data) && \is_int($data['totalAmountInBaseCurrency'])) { + $data['totalAmountInBaseCurrency'] = (double) $data['totalAmountInBaseCurrency']; + } + if (\array_key_exists('totalVatInBaseCurrency', $data) && \is_int($data['totalVatInBaseCurrency'])) { + $data['totalVatInBaseCurrency'] = (double) $data['totalVatInBaseCurrency']; + } + if (\array_key_exists('amountToPayInBaseCurrency', $data) && \is_int($data['amountToPayInBaseCurrency'])) { + $data['amountToPayInBaseCurrency'] = (double) $data['amountToPayInBaseCurrency']; + } + if (\array_key_exists('paymentFee', $data) && \is_int($data['paymentFee'])) { + $data['paymentFee'] = (double) $data['paymentFee']; + } + if (\array_key_exists('paymentVatRate', $data) && \is_int($data['paymentVatRate'])) { + $data['paymentVatRate'] = (double) $data['paymentVatRate']; + } + if (\array_key_exists('shippingCost', $data) && \is_int($data['shippingCost'])) { + $data['shippingCost'] = (double) $data['shippingCost']; + } + if (\array_key_exists('shippingVatRate', $data) && \is_int($data['shippingVatRate'])) { + $data['shippingVatRate'] = (double) $data['shippingVatRate']; + } + if (\array_key_exists('totalWeight', $data) && \is_int($data['totalWeight'])) { + $data['totalWeight'] = (double) $data['totalWeight']; + } + if (\array_key_exists('amountPaid', $data) && \is_int($data['amountPaid'])) { + $data['amountPaid'] = (double) $data['amountPaid']; + } + if (\array_key_exists('amountPaidInBaseCurrency', $data) && \is_int($data['amountPaidInBaseCurrency'])) { + $data['amountPaidInBaseCurrency'] = (double) $data['amountPaidInBaseCurrency']; + } + if (\array_key_exists('currencyExchangeRate', $data) && \is_int($data['currencyExchangeRate'])) { + $data['currencyExchangeRate'] = (double) $data['currencyExchangeRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('orderId', $data) && $data['orderId'] !== null) { + $object->setOrderId($data['orderId']); + unset($data['orderId']); + } + elseif (\array_key_exists('orderId', $data) && $data['orderId'] === null) { + $object->setOrderId(null); + } + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); + } + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); + } + if (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] !== null) { + $object->setBaseCurrencyCode($data['baseCurrencyCode']); + unset($data['baseCurrencyCode']); + } + elseif (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] === null) { + $object->setBaseCurrencyCode(null); + } + if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) { + $object->setShopCountryCode($data['shopCountryCode']); + unset($data['shopCountryCode']); + } + elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) { + $object->setShopCountryCode(null); + } + if (\array_key_exists('totalAmount', $data) && $data['totalAmount'] !== null) { + $object->setTotalAmount($data['totalAmount']); + unset($data['totalAmount']); + } + elseif (\array_key_exists('totalAmount', $data) && $data['totalAmount'] === null) { + $object->setTotalAmount(null); + } + if (\array_key_exists('totalVat', $data) && $data['totalVat'] !== null) { + $object->setTotalVat($data['totalVat']); + unset($data['totalVat']); + } + elseif (\array_key_exists('totalVat', $data) && $data['totalVat'] === null) { + $object->setTotalVat(null); + } + if (\array_key_exists('amountToPay', $data) && $data['amountToPay'] !== null) { + $object->setAmountToPay($data['amountToPay']); + unset($data['amountToPay']); + } + elseif (\array_key_exists('amountToPay', $data) && $data['amountToPay'] === null) { + $object->setAmountToPay(null); + } + if (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] !== null) { + $object->setTotalAmountInBaseCurrency($data['totalAmountInBaseCurrency']); + unset($data['totalAmountInBaseCurrency']); + } + elseif (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] === null) { + $object->setTotalAmountInBaseCurrency(null); + } + if (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] !== null) { + $object->setTotalVatInBaseCurrency($data['totalVatInBaseCurrency']); + unset($data['totalVatInBaseCurrency']); + } + elseif (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] === null) { + $object->setTotalVatInBaseCurrency(null); + } + if (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] !== null) { + $object->setAmountToPayInBaseCurrency($data['amountToPayInBaseCurrency']); + unset($data['amountToPayInBaseCurrency']); + } + elseif (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] === null) { + $object->setAmountToPayInBaseCurrency(null); + } + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); + } + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) { + $object->setCustomerId($data['customerId']); + unset($data['customerId']); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) { + $object->setCustomerId(null); } - if (property_exists($data, 'baseCurrencyCode') && $data->{'baseCurrencyCode'} !== null) { - $object->setBaseCurrencyCode($data->{'baseCurrencyCode'}); + if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) { + $object->setStatusId($data['statusId']); + unset($data['statusId']); } - if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { - $object->setShopCountryCode($data->{'shopCountryCode'}); + elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) { + $object->setStatusId(null); } - if (property_exists($data, 'totalAmount') && $data->{'totalAmount'} !== null) { - $object->setTotalAmount($data->{'totalAmount'}); + if (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] !== null) { + $object->setOnOrderStatusChangeSendEmail($data['onOrderStatusChangeSendEmail']); + unset($data['onOrderStatusChangeSendEmail']); } - if (property_exists($data, 'totalVat') && $data->{'totalVat'} !== null) { - $object->setTotalVat($data->{'totalVat'}); + elseif (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] === null) { + $object->setOnOrderStatusChangeSendEmail(null); } - if (property_exists($data, 'amountToPay') && $data->{'amountToPay'} !== null) { - $object->setAmountToPay($data->{'amountToPay'}); + if (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] !== null) { + $object->setOnOrderStatusChangeProcessPayment($data['onOrderStatusChangeProcessPayment']); + unset($data['onOrderStatusChangeProcessPayment']); } - if (property_exists($data, 'totalAmountInBaseCurrency') && $data->{'totalAmountInBaseCurrency'} !== null) { - $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'}); + elseif (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] === null) { + $object->setOnOrderStatusChangeProcessPayment(null); } - if (property_exists($data, 'totalVatInBaseCurrency') && $data->{'totalVatInBaseCurrency'} !== null) { - $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'}); + if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) { + $object->setShippingMethodId($data['shippingMethodId']); + unset($data['shippingMethodId']); } - if (property_exists($data, 'amountToPayInBaseCurrency') && $data->{'amountToPayInBaseCurrency'} !== null) { - $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'}); + elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) { + $object->setShippingMethodId(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) { + $object->setPaymentMethodId($data['paymentMethodId']); + unset($data['paymentMethodId']); } - if (property_exists($data, 'customerId') && $data->{'customerId'} !== null) { - $object->setCustomerId($data->{'customerId'}); + elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) { + $object->setPaymentMethodId(null); } - if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { - $object->setStatusId($data->{'statusId'}); + if (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] !== null) { + $object->setPaymentMethodIdCode($data['paymentMethodIdCode']); + unset($data['paymentMethodIdCode']); } - if (property_exists($data, 'onOrderStatusChangeSendEmail') && $data->{'onOrderStatusChangeSendEmail'} !== null) { - $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'}); + elseif (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] === null) { + $object->setPaymentMethodIdCode(null); } - if (property_exists($data, 'onOrderStatusChangeProcessPayment') && $data->{'onOrderStatusChangeProcessPayment'} !== null) { - $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'}); + if (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] !== null) { + $object->setPaymentMethodName($data['paymentMethodName']); + unset($data['paymentMethodName']); } - if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { - $object->setShippingMethodId($data->{'shippingMethodId'}); + elseif (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] === null) { + $object->setPaymentMethodName(null); } - if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { - $object->setPaymentMethodId($data->{'paymentMethodId'}); + if (\array_key_exists('paymentFee', $data) && $data['paymentFee'] !== null) { + $object->setPaymentFee($data['paymentFee']); + unset($data['paymentFee']); } - if (property_exists($data, 'paymentMethodIdCode') && $data->{'paymentMethodIdCode'} !== null) { - $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'}); + elseif (\array_key_exists('paymentFee', $data) && $data['paymentFee'] === null) { + $object->setPaymentFee(null); } - if (property_exists($data, 'paymentMethodName') && $data->{'paymentMethodName'} !== null) { - $object->setPaymentMethodName($data->{'paymentMethodName'}); + if (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] !== null) { + $object->setPaymentVatRate($data['paymentVatRate']); + unset($data['paymentVatRate']); } - if (property_exists($data, 'paymentFee') && $data->{'paymentFee'} !== null) { - $object->setPaymentFee($data->{'paymentFee'}); + elseif (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] === null) { + $object->setPaymentVatRate(null); } - if (property_exists($data, 'paymentVatRate') && $data->{'paymentVatRate'} !== null) { - $object->setPaymentVatRate($data->{'paymentVatRate'}); + if (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] !== null) { + $object->setShippingMethodName($data['shippingMethodName']); + unset($data['shippingMethodName']); } - if (property_exists($data, 'shippingMethodName') && $data->{'shippingMethodName'} !== null) { - $object->setShippingMethodName($data->{'shippingMethodName'}); + elseif (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] === null) { + $object->setShippingMethodName(null); } - if (property_exists($data, 'shippingCost') && $data->{'shippingCost'} !== null) { - $object->setShippingCost($data->{'shippingCost'}); + if (\array_key_exists('shippingCost', $data) && $data['shippingCost'] !== null) { + $object->setShippingCost($data['shippingCost']); + unset($data['shippingCost']); } - if (property_exists($data, 'shippingVatRate') && $data->{'shippingVatRate'} !== null) { - $object->setShippingVatRate($data->{'shippingVatRate'}); + elseif (\array_key_exists('shippingCost', $data) && $data['shippingCost'] === null) { + $object->setShippingCost(null); } - if (property_exists($data, 'totalWeight') && $data->{'totalWeight'} !== null) { - $object->setTotalWeight($data->{'totalWeight'}); + if (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] !== null) { + $object->setShippingVatRate($data['shippingVatRate']); + unset($data['shippingVatRate']); } - if (property_exists($data, 'customInfo1') && $data->{'customInfo1'} !== null) { - $object->setCustomInfo1($data->{'customInfo1'}); + elseif (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] === null) { + $object->setShippingVatRate(null); } - if (property_exists($data, 'customInfo2') && $data->{'customInfo2'} !== null) { - $object->setCustomInfo2($data->{'customInfo2'}); + if (\array_key_exists('totalWeight', $data) && $data['totalWeight'] !== null) { + $object->setTotalWeight($data['totalWeight']); + unset($data['totalWeight']); } - if (property_exists($data, 'customInfo3') && $data->{'customInfo3'} !== null) { - $object->setCustomInfo3($data->{'customInfo3'}); + elseif (\array_key_exists('totalWeight', $data) && $data['totalWeight'] === null) { + $object->setTotalWeight(null); } - if (property_exists($data, 'customInfo4') && $data->{'customInfo4'} !== null) { - $object->setCustomInfo4($data->{'customInfo4'}); + if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) { + $object->setCustomInfo1($data['customInfo1']); + unset($data['customInfo1']); } - if (property_exists($data, 'discountCode') && $data->{'discountCode'} !== null) { - $object->setDiscountCode($data->{'discountCode'}); + elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) { + $object->setCustomInfo1(null); } - if (property_exists($data, 'amountPaid') && $data->{'amountPaid'} !== null) { - $object->setAmountPaid($data->{'amountPaid'}); + if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) { + $object->setCustomInfo2($data['customInfo2']); + unset($data['customInfo2']); } - if (property_exists($data, 'amountPaidInBaseCurrency') && $data->{'amountPaidInBaseCurrency'} !== null) { - $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'}); + elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) { + $object->setCustomInfo2(null); } - if (property_exists($data, 'isComplete') && $data->{'isComplete'} !== null) { - $object->setIsComplete($data->{'isComplete'}); + if (\array_key_exists('customInfo3', $data) && $data['customInfo3'] !== null) { + $object->setCustomInfo3($data['customInfo3']); + unset($data['customInfo3']); } - if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { - $object->setCurrencyCode($data->{'currencyCode'}); + elseif (\array_key_exists('customInfo3', $data) && $data['customInfo3'] === null) { + $object->setCustomInfo3(null); } - if (property_exists($data, 'currencyExchangeRate') && $data->{'currencyExchangeRate'} !== null) { - $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'}); + if (\array_key_exists('customInfo4', $data) && $data['customInfo4'] !== null) { + $object->setCustomInfo4($data['customInfo4']); + unset($data['customInfo4']); } - if (property_exists($data, 'currencyPrecision') && $data->{'currencyPrecision'} !== null) { - $object->setCurrencyPrecision($data->{'currencyPrecision'}); + elseif (\array_key_exists('customInfo4', $data) && $data['customInfo4'] === null) { + $object->setCustomInfo4(null); } - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (\array_key_exists('discountCode', $data) && $data['discountCode'] !== null) { + $object->setDiscountCode($data['discountCode']); + unset($data['discountCode']); } - if (property_exists($data, 'paymentReference') && $data->{'paymentReference'} !== null) { - $object->setPaymentReference($data->{'paymentReference'}); + elseif (\array_key_exists('discountCode', $data) && $data['discountCode'] === null) { + $object->setDiscountCode(null); } - if (property_exists($data, 'paymentStatus') && $data->{'paymentStatus'} !== null) { - $object->setPaymentStatus($data->{'paymentStatus'}); + if (\array_key_exists('amountPaid', $data) && $data['amountPaid'] !== null) { + $object->setAmountPaid($data['amountPaid']); + unset($data['amountPaid']); } - if (property_exists($data, 'isRead') && $data->{'isRead'} !== null) { - $object->setIsRead($data->{'isRead'}); + elseif (\array_key_exists('amountPaid', $data) && $data['amountPaid'] === null) { + $object->setAmountPaid(null); } - if (property_exists($data, 'hasComment') && $data->{'hasComment'} !== null) { - $object->setHasComment($data->{'hasComment'}); + if (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] !== null) { + $object->setAmountPaidInBaseCurrency($data['amountPaidInBaseCurrency']); + unset($data['amountPaidInBaseCurrency']); } - if (property_exists($data, 'internalComment') && $data->{'internalComment'} !== null) { - $object->setInternalComment($data->{'internalComment'}); + elseif (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] === null) { + $object->setAmountPaidInBaseCurrency(null); } - if (property_exists($data, 'shippingTrackerType') && $data->{'shippingTrackerType'} !== null) { - $object->setShippingTrackerType($data->{'shippingTrackerType'}); + if (\array_key_exists('isComplete', $data) && $data['isComplete'] !== null) { + $object->setIsComplete($data['isComplete']); + unset($data['isComplete']); } - if (property_exists($data, 'shippingTrackingNo') && $data->{'shippingTrackingNo'} !== null) { - $object->setShippingTrackingNo($data->{'shippingTrackingNo'}); + elseif (\array_key_exists('isComplete', $data) && $data['isComplete'] === null) { + $object->setIsComplete(null); } - if (property_exists($data, 'originalCustomerEmail') && $data->{'originalCustomerEmail'} !== null) { - $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'}); + if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) { + $object->setCurrencyCode($data['currencyCode']); + unset($data['currencyCode']); } - if (property_exists($data, 'originalCustomerNationalIdNo') && $data->{'originalCustomerNationalIdNo'} !== null) { - $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'}); + elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) { + $object->setCurrencyCode(null); } - if (property_exists($data, 'originalCustomerVatNo') && $data->{'originalCustomerVatNo'} !== null) { - $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'}); + if (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] !== null) { + $object->setCurrencyExchangeRate($data['currencyExchangeRate']); + unset($data['currencyExchangeRate']); } - if (property_exists($data, 'originalCustomerCustomInfo1') && $data->{'originalCustomerCustomInfo1'} !== null) { - $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'}); + elseif (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] === null) { + $object->setCurrencyExchangeRate(null); } - if (property_exists($data, 'originalCustomerCustomInfo2') && $data->{'originalCustomerCustomInfo2'} !== null) { - $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'}); + if (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] !== null) { + $object->setCurrencyPrecision($data['currencyPrecision']); + unset($data['currencyPrecision']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] === null) { + $object->setCurrencyPrecision(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); } - if (property_exists($data, 'items') && $data->{'items'} !== null) { + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('paymentReference', $data) && $data['paymentReference'] !== null) { + $object->setPaymentReference($data['paymentReference']); + unset($data['paymentReference']); + } + elseif (\array_key_exists('paymentReference', $data) && $data['paymentReference'] === null) { + $object->setPaymentReference(null); + } + if (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] !== null) { + $object->setPaymentStatus($data['paymentStatus']); + unset($data['paymentStatus']); + } + elseif (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] === null) { + $object->setPaymentStatus(null); + } + if (\array_key_exists('isRead', $data) && $data['isRead'] !== null) { + $object->setIsRead($data['isRead']); + unset($data['isRead']); + } + elseif (\array_key_exists('isRead', $data) && $data['isRead'] === null) { + $object->setIsRead(null); + } + if (\array_key_exists('hasComment', $data) && $data['hasComment'] !== null) { + $object->setHasComment($data['hasComment']); + unset($data['hasComment']); + } + elseif (\array_key_exists('hasComment', $data) && $data['hasComment'] === null) { + $object->setHasComment(null); + } + if (\array_key_exists('internalComment', $data) && $data['internalComment'] !== null) { + $object->setInternalComment($data['internalComment']); + unset($data['internalComment']); + } + elseif (\array_key_exists('internalComment', $data) && $data['internalComment'] === null) { + $object->setInternalComment(null); + } + if (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] !== null) { + $object->setShippingTrackerType($data['shippingTrackerType']); + unset($data['shippingTrackerType']); + } + elseif (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] === null) { + $object->setShippingTrackerType(null); + } + if (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] !== null) { + $object->setShippingTrackingNo($data['shippingTrackingNo']); + unset($data['shippingTrackingNo']); + } + elseif (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] === null) { + $object->setShippingTrackingNo(null); + } + if (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] !== null) { + $object->setOriginalCustomerEmail($data['originalCustomerEmail']); + unset($data['originalCustomerEmail']); + } + elseif (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] === null) { + $object->setOriginalCustomerEmail(null); + } + if (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] !== null) { + $object->setOriginalCustomerNationalIdNo($data['originalCustomerNationalIdNo']); + unset($data['originalCustomerNationalIdNo']); + } + elseif (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] === null) { + $object->setOriginalCustomerNationalIdNo(null); + } + if (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] !== null) { + $object->setOriginalCustomerVatNo($data['originalCustomerVatNo']); + unset($data['originalCustomerVatNo']); + } + elseif (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] === null) { + $object->setOriginalCustomerVatNo(null); + } + if (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] !== null) { + $object->setOriginalCustomerCustomInfo1($data['originalCustomerCustomInfo1']); + unset($data['originalCustomerCustomInfo1']); + } + elseif (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] === null) { + $object->setOriginalCustomerCustomInfo1(null); + } + if (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] !== null) { + $object->setOriginalCustomerCustomInfo2($data['originalCustomerCustomInfo2']); + unset($data['originalCustomerCustomInfo2']); + } + elseif (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] === null) { + $object->setOriginalCustomerCustomInfo2(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('items', $data) && $data['items'] !== null) { $values = array(); - foreach ($data->{'items'} as $value) { + foreach ($data['items'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context); } $object->setItems($values); + unset($data['items']); + } + elseif (\array_key_exists('items', $data) && $data['items'] === null) { + $object->setItems(null); + } + if (\array_key_exists('addresses', $data) && $data['addresses'] !== null) { + $object->setAddresses($this->denormalizer->denormalize($data['addresses'], 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); + unset($data['addresses']); } - if (property_exists($data, 'addresses') && $data->{'addresses'} !== null) { - $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context)); + elseif (\array_key_exists('addresses', $data) && $data['addresses'] === null) { + $object->setAddresses(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); } - if (null !== $object->getCustomerId()) { - $data->{'customerId'} = $object->getCustomerId(); + if ($object->isInitialized('customerId') && null !== $object->getCustomerId()) { + $data['customerId'] = $object->getCustomerId(); } - if (null !== $object->getStatusId()) { - $data->{'statusId'} = $object->getStatusId(); + if ($object->isInitialized('statusId') && null !== $object->getStatusId()) { + $data['statusId'] = $object->getStatusId(); } - if (null !== $object->getOnOrderStatusChangeSendEmail()) { - $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail(); + if ($object->isInitialized('onOrderStatusChangeSendEmail') && null !== $object->getOnOrderStatusChangeSendEmail()) { + $data['onOrderStatusChangeSendEmail'] = $object->getOnOrderStatusChangeSendEmail(); } - if (null !== $object->getOnOrderStatusChangeProcessPayment()) { - $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment(); + if ($object->isInitialized('onOrderStatusChangeProcessPayment') && null !== $object->getOnOrderStatusChangeProcessPayment()) { + $data['onOrderStatusChangeProcessPayment'] = $object->getOnOrderStatusChangeProcessPayment(); } - if (null !== $object->getShippingMethodId()) { - $data->{'shippingMethodId'} = $object->getShippingMethodId(); + if ($object->isInitialized('shippingMethodId') && null !== $object->getShippingMethodId()) { + $data['shippingMethodId'] = $object->getShippingMethodId(); } - if (null !== $object->getPaymentMethodId()) { - $data->{'paymentMethodId'} = $object->getPaymentMethodId(); + if ($object->isInitialized('paymentMethodId') && null !== $object->getPaymentMethodId()) { + $data['paymentMethodId'] = $object->getPaymentMethodId(); } - if (null !== $object->getPaymentMethodName()) { - $data->{'paymentMethodName'} = $object->getPaymentMethodName(); + if ($object->isInitialized('paymentMethodName') && null !== $object->getPaymentMethodName()) { + $data['paymentMethodName'] = $object->getPaymentMethodName(); } - if (null !== $object->getPaymentFee()) { - $data->{'paymentFee'} = $object->getPaymentFee(); + if ($object->isInitialized('paymentFee') && null !== $object->getPaymentFee()) { + $data['paymentFee'] = $object->getPaymentFee(); } - if (null !== $object->getPaymentVatRate()) { - $data->{'paymentVatRate'} = $object->getPaymentVatRate(); + if ($object->isInitialized('paymentVatRate') && null !== $object->getPaymentVatRate()) { + $data['paymentVatRate'] = $object->getPaymentVatRate(); } - if (null !== $object->getShippingMethodName()) { - $data->{'shippingMethodName'} = $object->getShippingMethodName(); + if ($object->isInitialized('shippingMethodName') && null !== $object->getShippingMethodName()) { + $data['shippingMethodName'] = $object->getShippingMethodName(); } - if (null !== $object->getShippingCost()) { - $data->{'shippingCost'} = $object->getShippingCost(); + if ($object->isInitialized('shippingCost') && null !== $object->getShippingCost()) { + $data['shippingCost'] = $object->getShippingCost(); } - if (null !== $object->getShippingVatRate()) { - $data->{'shippingVatRate'} = $object->getShippingVatRate(); + if ($object->isInitialized('shippingVatRate') && null !== $object->getShippingVatRate()) { + $data['shippingVatRate'] = $object->getShippingVatRate(); } - if (null !== $object->getCustomInfo1()) { - $data->{'customInfo1'} = $object->getCustomInfo1(); + if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) { + $data['customInfo1'] = $object->getCustomInfo1(); } - if (null !== $object->getCustomInfo2()) { - $data->{'customInfo2'} = $object->getCustomInfo2(); + if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) { + $data['customInfo2'] = $object->getCustomInfo2(); } - if (null !== $object->getCustomInfo3()) { - $data->{'customInfo3'} = $object->getCustomInfo3(); + if ($object->isInitialized('customInfo3') && null !== $object->getCustomInfo3()) { + $data['customInfo3'] = $object->getCustomInfo3(); } - if (null !== $object->getCustomInfo4()) { - $data->{'customInfo4'} = $object->getCustomInfo4(); + if ($object->isInitialized('customInfo4') && null !== $object->getCustomInfo4()) { + $data['customInfo4'] = $object->getCustomInfo4(); } - if (null !== $object->getDiscountCode()) { - $data->{'discountCode'} = $object->getDiscountCode(); + if ($object->isInitialized('discountCode') && null !== $object->getDiscountCode()) { + $data['discountCode'] = $object->getDiscountCode(); } - if (null !== $object->getAmountPaid()) { - $data->{'amountPaid'} = $object->getAmountPaid(); + if ($object->isInitialized('amountPaid') && null !== $object->getAmountPaid()) { + $data['amountPaid'] = $object->getAmountPaid(); } - if (null !== $object->getIsComplete()) { - $data->{'isComplete'} = $object->getIsComplete(); + if ($object->isInitialized('isComplete') && null !== $object->getIsComplete()) { + $data['isComplete'] = $object->getIsComplete(); } - if (null !== $object->getCurrencyCode()) { - $data->{'currencyCode'} = $object->getCurrencyCode(); + if ($object->isInitialized('currencyCode') && null !== $object->getCurrencyCode()) { + $data['currencyCode'] = $object->getCurrencyCode(); } - if (null !== $object->getCurrencyExchangeRate()) { - $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate(); + if ($object->isInitialized('currencyExchangeRate') && null !== $object->getCurrencyExchangeRate()) { + $data['currencyExchangeRate'] = $object->getCurrencyExchangeRate(); } - if (null !== $object->getCurrencyPrecision()) { - $data->{'currencyPrecision'} = $object->getCurrencyPrecision(); + if ($object->isInitialized('currencyPrecision') && null !== $object->getCurrencyPrecision()) { + $data['currencyPrecision'] = $object->getCurrencyPrecision(); } - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); } - if (null !== $object->getPaymentReference()) { - $data->{'paymentReference'} = $object->getPaymentReference(); + if ($object->isInitialized('paymentReference') && null !== $object->getPaymentReference()) { + $data['paymentReference'] = $object->getPaymentReference(); } - if (null !== $object->getPaymentStatus()) { - $data->{'paymentStatus'} = $object->getPaymentStatus(); + if ($object->isInitialized('paymentStatus') && null !== $object->getPaymentStatus()) { + $data['paymentStatus'] = $object->getPaymentStatus(); } - if (null !== $object->getIsRead()) { - $data->{'isRead'} = $object->getIsRead(); + if ($object->isInitialized('isRead') && null !== $object->getIsRead()) { + $data['isRead'] = $object->getIsRead(); } - if (null !== $object->getInternalComment()) { - $data->{'internalComment'} = $object->getInternalComment(); + if ($object->isInitialized('internalComment') && null !== $object->getInternalComment()) { + $data['internalComment'] = $object->getInternalComment(); } - if (null !== $object->getShippingTrackerType()) { - $data->{'shippingTrackerType'} = $object->getShippingTrackerType(); + if ($object->isInitialized('shippingTrackerType') && null !== $object->getShippingTrackerType()) { + $data['shippingTrackerType'] = $object->getShippingTrackerType(); } - if (null !== $object->getShippingTrackingNo()) { - $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo(); + if ($object->isInitialized('shippingTrackingNo') && null !== $object->getShippingTrackingNo()) { + $data['shippingTrackingNo'] = $object->getShippingTrackingNo(); } - if (null !== $object->getOriginalCustomerEmail()) { - $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail(); + if ($object->isInitialized('originalCustomerEmail') && null !== $object->getOriginalCustomerEmail()) { + $data['originalCustomerEmail'] = $object->getOriginalCustomerEmail(); } - if (null !== $object->getOriginalCustomerNationalIdNo()) { - $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo(); + if ($object->isInitialized('originalCustomerNationalIdNo') && null !== $object->getOriginalCustomerNationalIdNo()) { + $data['originalCustomerNationalIdNo'] = $object->getOriginalCustomerNationalIdNo(); } - if (null !== $object->getOriginalCustomerVatNo()) { - $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo(); + if ($object->isInitialized('originalCustomerVatNo') && null !== $object->getOriginalCustomerVatNo()) { + $data['originalCustomerVatNo'] = $object->getOriginalCustomerVatNo(); } - if (null !== $object->getOriginalCustomerCustomInfo1()) { - $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1(); + if ($object->isInitialized('originalCustomerCustomInfo1') && null !== $object->getOriginalCustomerCustomInfo1()) { + $data['originalCustomerCustomInfo1'] = $object->getOriginalCustomerCustomInfo1(); } - if (null !== $object->getOriginalCustomerCustomInfo2()) { - $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2(); + if ($object->isInitialized('originalCustomerCustomInfo2') && null !== $object->getOriginalCustomerCustomInfo2()) { + $data['originalCustomerCustomInfo2'] = $object->getOriginalCustomerCustomInfo2(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getItems()) { + if ($object->isInitialized('items') && null !== $object->getItems()) { $values = array(); foreach ($object->getItems() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'items'} = $values; + $data['items'] = $values; } - if (null !== $object->getAddresses()) { - $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + if ($object->isInitialized('addresses') && null !== $object->getAddresses()) { + $data['addresses'] = $this->normalizer->normalize($object->getAddresses(), 'json', $context); + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\OrderUpdateModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php index b66c4f6c..4a034ee4 100644 --- a/src/Api/Generated/Normalizer/PaginationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaginationModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,40 +16,88 @@ class PaginationModelNormalizer implements DenormalizerInterface, NormalizerInte { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PaginationModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaginationModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PaginationModel(); - if (property_exists($data, 'current_page') && $data->{'current_page'} !== null) { - $object->setCurrentPage($data->{'current_page'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('current_page', $data) && $data['current_page'] !== null) { + $object->setCurrentPage($data['current_page']); + unset($data['current_page']); + } + elseif (\array_key_exists('current_page', $data) && $data['current_page'] === null) { + $object->setCurrentPage(null); + } + if (\array_key_exists('per_page', $data) && $data['per_page'] !== null) { + $object->setPerPage($data['per_page']); + unset($data['per_page']); + } + elseif (\array_key_exists('per_page', $data) && $data['per_page'] === null) { + $object->setPerPage(null); + } + if (\array_key_exists('total', $data) && $data['total'] !== null) { + $object->setTotal($data['total']); + unset($data['total']); } - if (property_exists($data, 'per_page') && $data->{'per_page'} !== null) { - $object->setPerPage($data->{'per_page'}); + elseif (\array_key_exists('total', $data) && $data['total'] === null) { + $object->setTotal(null); } - if (property_exists($data, 'total') && $data->{'total'} !== null) { - $object->setTotal($data->{'total'}); + if (\array_key_exists('count', $data) && $data['count'] !== null) { + $object->setCount($data['count']); + unset($data['count']); } - if (property_exists($data, 'count') && $data->{'count'} !== null) { - $object->setCount($data->{'count'}); + elseif (\array_key_exists('count', $data) && $data['count'] === null) { + $object->setCount(null); } - if (property_exists($data, 'total_pages') && $data->{'total_pages'} !== null) { - $object->setTotalPages($data->{'total_pages'}); + if (\array_key_exists('total_pages', $data) && $data['total_pages'] !== null) { + $object->setTotalPages($data['total_pages']); + unset($data['total_pages']); + } + elseif (\array_key_exists('total_pages', $data) && $data['total_pages'] === null) { + $object->setTotalPages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PaginationModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php index 42bccaf8..4a32a3b8 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class PaymentMethodLanguageModelCollectionNormalizer implements DenormalizerInte { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PaymentMethodLanguageModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php index 33bd7d06..3aece623 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,81 @@ class PaymentMethodLanguageModelNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PaymentMethodLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('title', $data) && $data['title'] !== null) { + $object->setTitle($data['title']); + unset($data['title']); } - if (property_exists($data, 'title') && $data->{'title'} !== null) { - $object->setTitle($data->{'title'}); + elseif (\array_key_exists('title', $data) && $data['title'] === null) { + $object->setTitle(null); } - if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { - $object->setShortDescription($data->{'shortDescription'}); + if (\array_key_exists('shortDescription', $data) && $data['shortDescription'] !== null) { + $object->setShortDescription($data['shortDescription']); + unset($data['shortDescription']); + } + elseif (\array_key_exists('shortDescription', $data) && $data['shortDescription'] === null) { + $object->setShortDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php index e1d34c8a..9fbb7078 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class PaymentMethodModelCollectionNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PaymentMethodModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php index ecaf62b1..bc965184 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class PaymentMethodModelItemNormalizer implements DenormalizerInterface, Normali { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PaymentMethodModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php index 75990612..2a344dc7 100644 --- a/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PaymentMethodModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,77 +16,180 @@ class PaymentMethodModelNormalizer implements DenormalizerInterface, NormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PaymentMethodModel(); - if (property_exists($data, 'paymentMethodId') && $data->{'paymentMethodId'} !== null) { - $object->setPaymentMethodId($data->{'paymentMethodId'}); + if (\array_key_exists('fee', $data) && \is_int($data['fee'])) { + $data['fee'] = (double) $data['fee']; + } + if (\array_key_exists('validForMinItemsSubtotal', $data) && \is_int($data['validForMinItemsSubtotal'])) { + $data['validForMinItemsSubtotal'] = (double) $data['validForMinItemsSubtotal']; + } + if (\array_key_exists('validForMaxItemsSubtotal', $data) && \is_int($data['validForMaxItemsSubtotal'])) { + $data['validForMaxItemsSubtotal'] = (double) $data['validForMaxItemsSubtotal']; + } + if (\array_key_exists('validForMinWeight', $data) && \is_int($data['validForMinWeight'])) { + $data['validForMinWeight'] = (double) $data['validForMinWeight']; + } + if (\array_key_exists('validForMaxWeight', $data) && \is_int($data['validForMaxWeight'])) { + $data['validForMaxWeight'] = (double) $data['validForMaxWeight']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) { + $object->setPaymentMethodId($data['paymentMethodId']); + unset($data['paymentMethodId']); } - if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { - $object->setIdCode($data->{'idCode'}); + elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) { + $object->setPaymentMethodId(null); } - if (property_exists($data, 'active') && $data->{'active'} !== null) { - $object->setActive($data->{'active'}); + if (\array_key_exists('idCode', $data) && $data['idCode'] !== null) { + $object->setIdCode($data['idCode']); + unset($data['idCode']); } - if (property_exists($data, 'fee') && $data->{'fee'} !== null) { - $object->setFee($data->{'fee'}); + elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) { + $object->setIdCode(null); } - if (property_exists($data, 'validForCountries') && $data->{'validForCountries'} !== null) { - $object->setValidForCountries($data->{'validForCountries'}); + if (\array_key_exists('active', $data) && $data['active'] !== null) { + $object->setActive($data['active']); + unset($data['active']); } - if (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} !== null) { + elseif (\array_key_exists('active', $data) && $data['active'] === null) { + $object->setActive(null); + } + if (\array_key_exists('fee', $data) && $data['fee'] !== null) { + $object->setFee($data['fee']); + unset($data['fee']); + } + elseif (\array_key_exists('fee', $data) && $data['fee'] === null) { + $object->setFee(null); + } + if (\array_key_exists('validForCountries', $data) && $data['validForCountries'] !== null) { + $object->setValidForCountries($data['validForCountries']); + unset($data['validForCountries']); + } + elseif (\array_key_exists('validForCountries', $data) && $data['validForCountries'] === null) { + $object->setValidForCountries(null); + } + if (\array_key_exists('validCountriesSelected', $data) && $data['validCountriesSelected'] !== null) { $values = array(); - foreach ($data->{'validCountriesSelected'} as $value) { + foreach ($data['validCountriesSelected'] as $value) { $values[] = $value; } $object->setValidCountriesSelected($values); + unset($data['validCountriesSelected']); + } + elseif (\array_key_exists('validCountriesSelected', $data) && $data['validCountriesSelected'] === null) { + $object->setValidCountriesSelected(null); + } + if (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] !== null) { + $object->setValidForMinItemsSubtotal($data['validForMinItemsSubtotal']); + unset($data['validForMinItemsSubtotal']); } - if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { - $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); + elseif (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] === null) { + $object->setValidForMinItemsSubtotal(null); } - if (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} !== null) { - $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'}); + if (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] !== null) { + $object->setValidForMaxItemsSubtotal($data['validForMaxItemsSubtotal']); + unset($data['validForMaxItemsSubtotal']); } - if (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} !== null) { - $object->setValidForMinWeight($data->{'validForMinWeight'}); + elseif (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] === null) { + $object->setValidForMaxItemsSubtotal(null); } - if (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} !== null) { - $object->setValidForMaxWeight($data->{'validForMaxWeight'}); + if (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] !== null) { + $object->setValidForMinWeight($data['validForMinWeight']); + unset($data['validForMinWeight']); } - if (property_exists($data, 'validForShippingMethods') && $data->{'validForShippingMethods'} !== null) { - $object->setValidForShippingMethods($data->{'validForShippingMethods'}); + elseif (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] === null) { + $object->setValidForMinWeight(null); } - if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { - $object->setValidForCustomerType($data->{'validForCustomerType'}); + if (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] !== null) { + $object->setValidForMaxWeight($data['validForMaxWeight']); + unset($data['validForMaxWeight']); } - if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { - $object->setIsClickAndCollect($data->{'isClickAndCollect'}); + elseif (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] === null) { + $object->setValidForMaxWeight(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('validForShippingMethods', $data) && $data['validForShippingMethods'] !== null) { + $object->setValidForShippingMethods($data['validForShippingMethods']); + unset($data['validForShippingMethods']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection', 'json', $context)); + elseif (\array_key_exists('validForShippingMethods', $data) && $data['validForShippingMethods'] === null) { + $object->setValidForShippingMethods(null); + } + if (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] !== null) { + $object->setValidForCustomerType($data['validForCustomerType']); + unset($data['validForCustomerType']); + } + elseif (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] === null) { + $object->setValidForCustomerType(null); + } + if (\array_key_exists('isClickAndCollect', $data) && $data['isClickAndCollect'] !== null) { + $object->setIsClickAndCollect($data['isClickAndCollect']); + unset($data['isClickAndCollect']); + } + elseif (\array_key_exists('isClickAndCollect', $data) && $data['isClickAndCollect'] === null) { + $object->setIsClickAndCollect(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + $data = array(); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PaymentMethodModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php index e2a9641b..b3d7e3b0 100644 --- a/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class PricelistModelCollectionNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PricelistModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\PricelistModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PricelistModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php index 97611b03..37f56f3b 100644 --- a/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class PricelistModelItemNormalizer implements DenormalizerInterface, NormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PricelistModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PricelistModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\PricelistModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\PricelistModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PricelistModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php index 546d8c2c..e249b6f1 100644 --- a/src/Api/Generated/Normalizer/PricelistModelNormalizer.php +++ b/src/Api/Generated/Normalizer/PricelistModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,74 +16,156 @@ class PricelistModelNormalizer implements DenormalizerInterface, NormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\PricelistModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\PricelistModel(); - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); + } + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'isMaster') && $data->{'isMaster'} !== null) { - $object->setIsMaster($data->{'isMaster'}); + if (\array_key_exists('isMaster', $data) && $data['isMaster'] !== null) { + $object->setIsMaster($data['isMaster']); + unset($data['isMaster']); } - if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { - $object->setIsActive($data->{'isActive'}); + elseif (\array_key_exists('isMaster', $data) && $data['isMaster'] === null) { + $object->setIsMaster(null); } - if (property_exists($data, 'region') && $data->{'region'} !== null) { - $object->setRegion($data->{'region'}); + if (\array_key_exists('isActive', $data) && $data['isActive'] !== null) { + $object->setIsActive($data['isActive']); + unset($data['isActive']); } - if (property_exists($data, 'countryCodes') && $data->{'countryCodes'} !== null) { + elseif (\array_key_exists('isActive', $data) && $data['isActive'] === null) { + $object->setIsActive(null); + } + if (\array_key_exists('region', $data) && $data['region'] !== null) { + $object->setRegion($data['region']); + unset($data['region']); + } + elseif (\array_key_exists('region', $data) && $data['region'] === null) { + $object->setRegion(null); + } + if (\array_key_exists('countryCodes', $data) && $data['countryCodes'] !== null) { $values = array(); - foreach ($data->{'countryCodes'} as $value) { + foreach ($data['countryCodes'] as $value) { $values[] = $value; } $object->setCountryCodes($values); + unset($data['countryCodes']); + } + elseif (\array_key_exists('countryCodes', $data) && $data['countryCodes'] === null) { + $object->setCountryCodes(null); + } + if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) { + $object->setCurrencyCode($data['currencyCode']); + unset($data['currencyCode']); + } + elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) { + $object->setCurrencyCode(null); } - if (property_exists($data, 'currencyCode') && $data->{'currencyCode'} !== null) { - $object->setCurrencyCode($data->{'currencyCode'}); + if (\array_key_exists('parentPricelistId', $data) && $data['parentPricelistId'] !== null) { + $object->setParentPricelistId($data['parentPricelistId']); + unset($data['parentPricelistId']); } - if (property_exists($data, 'parentPricelistId') && $data->{'parentPricelistId'} !== null) { - $object->setParentPricelistId($data->{'parentPricelistId'}); + elseif (\array_key_exists('parentPricelistId', $data) && $data['parentPricelistId'] === null) { + $object->setParentPricelistId(null); } - if (property_exists($data, 'isCustomerPricelist') && $data->{'isCustomerPricelist'} !== null) { - $object->setIsCustomerPricelist($data->{'isCustomerPricelist'}); + if (\array_key_exists('isCustomerPricelist', $data) && $data['isCustomerPricelist'] !== null) { + $object->setIsCustomerPricelist($data['isCustomerPricelist']); + unset($data['isCustomerPricelist']); } - if (property_exists($data, 'isCountryPricelist') && $data->{'isCountryPricelist'} !== null) { - $object->setIsCountryPricelist($data->{'isCountryPricelist'}); + elseif (\array_key_exists('isCustomerPricelist', $data) && $data['isCustomerPricelist'] === null) { + $object->setIsCustomerPricelist(null); + } + if (\array_key_exists('isCountryPricelist', $data) && $data['isCountryPricelist'] !== null) { + $object->setIsCountryPricelist($data['isCountryPricelist']); + unset($data['isCountryPricelist']); + } + elseif (\array_key_exists('isCountryPricelist', $data) && $data['isCountryPricelist'] === null) { + $object->setIsCountryPricelist(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'parentPricelistId'} = $object->getParentPricelistId(); - if (null !== $object->getIsCustomerPricelist()) { - $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('parentPricelistId') && null !== $object->getParentPricelistId()) { + $data['parentPricelistId'] = $object->getParentPricelistId(); } - if (null !== $object->getIsCountryPricelist()) { - $data->{'isCountryPricelist'} = $object->getIsCountryPricelist(); + if ($object->isInitialized('isCustomerPricelist') && null !== $object->getIsCustomerPricelist()) { + $data['isCustomerPricelist'] = $object->getIsCustomerPricelist(); + } + if ($object->isInitialized('isCountryPricelist') && null !== $object->getIsCountryPricelist()) { + $data['isCountryPricelist'] = $object->getIsCountryPricelist(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\PricelistModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php index 9dc003e8..74ef3609 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductBundleProductPriceModelCollectionNormalizer implements Denormalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php index 705cb8de..e1711466 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductBundleProductPriceModelItemNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php index b73011cb..3d5fe533 100644 --- a/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductBundleProductPriceModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,35 +16,74 @@ class ProductBundleProductPriceModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductBundleProductPriceModel(); - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + if (\array_key_exists('specialPriceExVat', $data) && \is_int($data['specialPriceExVat'])) { + $data['specialPriceExVat'] = (double) $data['specialPriceExVat']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); + } + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); + } + if (\array_key_exists('specialPriceExVat', $data) && $data['specialPriceExVat'] !== null) { + $object->setSpecialPriceExVat($data['specialPriceExVat']); + unset($data['specialPriceExVat']); } - if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { - $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); + elseif (\array_key_exists('specialPriceExVat', $data) && $data['specialPriceExVat'] === null) { + $object->setSpecialPriceExVat(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPricelistId()) { - $data->{'pricelistId'} = $object->getPricelistId(); + $data = array(); + $data['pricelistId'] = $object->getPricelistId(); + if ($object->isInitialized('specialPriceExVat') && null !== $object->getSpecialPriceExVat()) { + $data['specialPriceExVat'] = $object->getSpecialPriceExVat(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } - $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php index cbdf087e..0949378a 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductCategoryLanguagesModelCollectionNormalizer implements DenormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLanguagesModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php index 4b55fb38..f8a841a9 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLanguagesModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,57 +16,123 @@ class ProductCategoryLanguagesModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLanguagesModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('pageTitle', $data) && $data['pageTitle'] !== null) { + $object->setPageTitle($data['pageTitle']); + unset($data['pageTitle']); + } + elseif (\array_key_exists('pageTitle', $data) && $data['pageTitle'] === null) { + $object->setPageTitle(null); + } + if (\array_key_exists('description', $data) && $data['description'] !== null) { + $object->setDescription($data['description']); + unset($data['description']); + } + elseif (\array_key_exists('description', $data) && $data['description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('bottomDescription', $data) && $data['bottomDescription'] !== null) { + $object->setBottomDescription($data['bottomDescription']); + unset($data['bottomDescription']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('bottomDescription', $data) && $data['bottomDescription'] === null) { + $object->setBottomDescription(null); } - if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { - $object->setPageTitle($data->{'pageTitle'}); + if (\array_key_exists('pageMetaDescription', $data) && $data['pageMetaDescription'] !== null) { + $object->setPageMetaDescription($data['pageMetaDescription']); + unset($data['pageMetaDescription']); } - if (property_exists($data, 'description') && $data->{'description'} !== null) { - $object->setDescription($data->{'description'}); + elseif (\array_key_exists('pageMetaDescription', $data) && $data['pageMetaDescription'] === null) { + $object->setPageMetaDescription(null); } - if (property_exists($data, 'bottomDescription') && $data->{'bottomDescription'} !== null) { - $object->setBottomDescription($data->{'bottomDescription'}); + if (\array_key_exists('permalink', $data) && $data['permalink'] !== null) { + $object->setPermalink($data['permalink']); + unset($data['permalink']); } - if (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} !== null) { - $object->setPageMetaDescription($data->{'pageMetaDescription'}); + elseif (\array_key_exists('permalink', $data) && $data['permalink'] === null) { + $object->setPermalink(null); } - if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { - $object->setPermalink($data->{'permalink'}); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - $data->{'pageTitle'} = $object->getPageTitle(); - $data->{'description'} = $object->getDescription(); - $data->{'bottomDescription'} = $object->getBottomDescription(); - $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); - $data->{'permalink'} = $object->getPermalink(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('pageTitle') && null !== $object->getPageTitle()) { + $data['pageTitle'] = $object->getPageTitle(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['description'] = $object->getDescription(); + } + if ($object->isInitialized('bottomDescription') && null !== $object->getBottomDescription()) { + $data['bottomDescription'] = $object->getBottomDescription(); + } + if ($object->isInitialized('pageMetaDescription') && null !== $object->getPageMetaDescription()) { + $data['pageMetaDescription'] = $object->getPageMetaDescription(); + } + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php index f3a269fb..c7799010 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductCategoryLinkModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php index 7570eceb..7e2d3ec1 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductCategoryLinkModelItemNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php index 2af5e4cc..c1f7b6f1 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryLinkModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductCategoryLinkModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryLinkModel(); - if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { - $object->setCategoryId($data->{'categoryId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('categoryId', $data) && $data['categoryId'] !== null) { + $object->setCategoryId($data['categoryId']); + unset($data['categoryId']); + } + elseif (\array_key_exists('categoryId', $data) && $data['categoryId'] === null) { + $object->setCategoryId(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCategoryId()) { - $data->{'categoryId'} = $object->getCategoryId(); + $data = array(); + if ($object->isInitialized('categoryId') && null !== $object->getCategoryId()) { + $data['categoryId'] = $object->getCategoryId(); + } + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php index 293c4e62..138b85fe 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionMetaNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductCategoryModelCollectionMetaNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelCollectionMeta(); - if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { - $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pagination', $data) && $data['pagination'] !== null) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + unset($data['pagination']); + } + elseif (\array_key_exists('pagination', $data) && $data['pagination'] === null) { + $object->setPagination(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + $data = array(); + if ($object->isInitialized('pagination') && null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php index 39d6b82a..2f5f7fd2 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,81 @@ class ProductCategoryModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + if (\array_key_exists('meta', $data) && $data['meta'] !== null) { + $object->setMeta($this->denormalizer->denormalize($data['meta'], 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta', 'json', $context)); + unset($data['meta']); + } + elseif (\array_key_exists('meta', $data) && $data['meta'] === null) { + $object->setMeta(null); } - if (property_exists($data, 'meta') && $data->{'meta'} !== null) { - $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta', 'json', $context)); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + if ($object->isInitialized('meta') && null !== $object->getMeta()) { + $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - if (null !== $object->getMeta()) { - $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php index 0144e72b..9e7fb1b8 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductCategoryModelItemNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php index 29d18934..6edfe2e7 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,75 +16,157 @@ class ProductCategoryModelNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModel(); - if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { - $object->setCategoryId($data->{'categoryId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('categoryId', $data) && $data['categoryId'] !== null) { + $object->setCategoryId($data['categoryId']); + unset($data['categoryId']); + } + elseif (\array_key_exists('categoryId', $data) && $data['categoryId'] === null) { + $object->setCategoryId(null); + } + if (\array_key_exists('parentId', $data) && $data['parentId'] !== null) { + $object->setParentId($data['parentId']); + unset($data['parentId']); + } + elseif (\array_key_exists('parentId', $data) && $data['parentId'] === null) { + $object->setParentId(null); + } + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('openPage', $data) && $data['openPage'] !== null) { + $object->setOpenPage($data['openPage']); + unset($data['openPage']); + } + elseif (\array_key_exists('openPage', $data) && $data['openPage'] === null) { + $object->setOpenPage(null); } - if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { - $object->setParentId($data->{'parentId'}); + if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) { + $object->setImageFileId($data['imageFileId']); + unset($data['imageFileId']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) { + $object->setImageFileId(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); } - if (property_exists($data, 'openPage') && $data->{'openPage'} !== null) { - $object->setOpenPage($data->{'openPage'}); + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { - $object->setImageFileId($data->{'imageFileId'}); + if (\array_key_exists('externalType', $data) && $data['externalType'] !== null) { + $object->setExternalType($data['externalType']); + unset($data['externalType']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalType', $data) && $data['externalType'] === null) { + $object->setExternalType(null); } - if (property_exists($data, 'externalType') && $data->{'externalType'} !== null) { - $object->setExternalType($data->{'externalType'}); + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'hasChildren') && $data->{'hasChildren'} !== null) { - $object->setHasChildren($data->{'hasChildren'}); + if (\array_key_exists('hasChildren', $data) && $data['hasChildren'] !== null) { + $object->setHasChildren($data['hasChildren']); + unset($data['hasChildren']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection', 'json', $context)); + elseif (\array_key_exists('hasChildren', $data) && $data['hasChildren'] === null) { + $object->setHasChildren(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'parentId'} = $object->getParentId(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + $data = array(); + if ($object->isInitialized('parentId') && null !== $object->getParentId()) { + $data['parentId'] = $object->getParentId(); + } + if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { + $data['visibility'] = $object->getVisibility(); + } + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('openPage') && null !== $object->getOpenPage()) { + $data['openPage'] = $object->getOpenPage(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) { + $data['imageFileId'] = $object->getImageFileId(); } - if (null !== $object->getOpenPage()) { - $data->{'openPage'} = $object->getOpenPage(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - $data->{'imageFileId'} = $object->getImageFileId(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalType'} = $object->getExternalType(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + if ($object->isInitialized('externalType') && null !== $object->getExternalType()) { + $data['externalType'] = $object->getExternalType(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php index 4f1cd011..af8779bb 100644 --- a/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductCategoryModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,83 +16,165 @@ class ProductCategoryModelUpdatableNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductCategoryModelUpdatable(); - if (property_exists($data, 'categoryId') && $data->{'categoryId'} !== null) { - $object->setCategoryId($data->{'categoryId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('categoryId', $data) && $data['categoryId'] !== null) { + $object->setCategoryId($data['categoryId']); + unset($data['categoryId']); + } + elseif (\array_key_exists('categoryId', $data) && $data['categoryId'] === null) { + $object->setCategoryId(null); + } + if (\array_key_exists('parentId', $data) && $data['parentId'] !== null) { + $object->setParentId($data['parentId']); + unset($data['parentId']); + } + elseif (\array_key_exists('parentId', $data) && $data['parentId'] === null) { + $object->setParentId(null); + } + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); } - if (property_exists($data, 'parentId') && $data->{'parentId'} !== null) { - $object->setParentId($data->{'parentId'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('openPage', $data) && $data['openPage'] !== null) { + $object->setOpenPage($data['openPage']); + unset($data['openPage']); } - if (property_exists($data, 'openPage') && $data->{'openPage'} !== null) { - $object->setOpenPage($data->{'openPage'}); + elseif (\array_key_exists('openPage', $data) && $data['openPage'] === null) { + $object->setOpenPage(null); } - if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { - $object->setImageFileId($data->{'imageFileId'}); + if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) { + $object->setImageFileId($data['imageFileId']); + unset($data['imageFileId']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) { + $object->setImageFileId(null); } - if (property_exists($data, 'externalType') && $data->{'externalType'} !== null) { - $object->setExternalType($data->{'externalType'}); + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'hasChildren') && $data->{'hasChildren'} !== null) { - $object->setHasChildren($data->{'hasChildren'}); + if (\array_key_exists('externalType', $data) && $data['externalType'] !== null) { + $object->setExternalType($data['externalType']); + unset($data['externalType']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('externalType', $data) && $data['externalType'] === null) { + $object->setExternalType(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('hasChildren', $data) && $data['hasChildren'] !== null) { + $object->setHasChildren($data['hasChildren']); + unset($data['hasChildren']); + } + elseif (\array_key_exists('hasChildren', $data) && $data['hasChildren'] === null) { + $object->setHasChildren(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'parentId'} = $object->getParentId(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); - } - if (null !== $object->getOpenPage()) { - $data->{'openPage'} = $object->getOpenPage(); - } - $data->{'imageFileId'} = $object->getImageFileId(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalType'} = $object->getExternalType(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getLanguages()) { + $data = array(); + if ($object->isInitialized('parentId') && null !== $object->getParentId()) { + $data['parentId'] = $object->getParentId(); + } + if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { + $data['visibility'] = $object->getVisibility(); + } + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('openPage') && null !== $object->getOpenPage()) { + $data['openPage'] = $object->getOpenPage(); + } + if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) { + $data['imageFileId'] = $object->getImageFileId(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalType') && null !== $object->getExternalType()) { + $data['externalType'] = $object->getExternalType(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php index 71ff2c3a..8348f8d8 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductLanguageModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductLanguageModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php index 879883dc..c926c100 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductLanguageModelItemNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductLanguageModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php index e8ad0617..ed7c1e3d 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,67 +16,119 @@ class ProductLanguageModelNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('shortDescription', $data) && $data['shortDescription'] !== null) { + $object->setShortDescription($data['shortDescription']); + unset($data['shortDescription']); + } + elseif (\array_key_exists('shortDescription', $data) && $data['shortDescription'] === null) { + $object->setShortDescription(null); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('longDescription', $data) && $data['longDescription'] !== null) { + $object->setLongDescription($data['longDescription']); + unset($data['longDescription']); } - if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { - $object->setShortDescription($data->{'shortDescription'}); + elseif (\array_key_exists('longDescription', $data) && $data['longDescription'] === null) { + $object->setLongDescription(null); } - if (property_exists($data, 'longDescription') && $data->{'longDescription'} !== null) { - $object->setLongDescription($data->{'longDescription'}); + if (\array_key_exists('permalink', $data) && $data['permalink'] !== null) { + $object->setPermalink($data['permalink']); + unset($data['permalink']); } - if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { - $object->setPermalink($data->{'permalink'}); + elseif (\array_key_exists('permalink', $data) && $data['permalink'] === null) { + $object->setPermalink(null); } - if (property_exists($data, 'pageTitle') && $data->{'pageTitle'} !== null) { - $object->setPageTitle($data->{'pageTitle'}); + if (\array_key_exists('pageTitle', $data) && $data['pageTitle'] !== null) { + $object->setPageTitle($data['pageTitle']); + unset($data['pageTitle']); } - if (property_exists($data, 'pageMetaDescription') && $data->{'pageMetaDescription'} !== null) { - $object->setPageMetaDescription($data->{'pageMetaDescription'}); + elseif (\array_key_exists('pageTitle', $data) && $data['pageTitle'] === null) { + $object->setPageTitle(null); + } + if (\array_key_exists('pageMetaDescription', $data) && $data['pageMetaDescription'] !== null) { + $object->setPageMetaDescription($data['pageMetaDescription']); + unset($data['pageMetaDescription']); + } + elseif (\array_key_exists('pageMetaDescription', $data) && $data['pageMetaDescription'] === null) { + $object->setPageMetaDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + $data['langCode'] = $object->getLangCode(); + $data['name'] = $object->getName(); + if ($object->isInitialized('shortDescription') && null !== $object->getShortDescription()) { + $data['shortDescription'] = $object->getShortDescription(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + if ($object->isInitialized('longDescription') && null !== $object->getLongDescription()) { + $data['longDescription'] = $object->getLongDescription(); } - if (null !== $object->getShortDescription()) { - $data->{'shortDescription'} = $object->getShortDescription(); + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); } - if (null !== $object->getLongDescription()) { - $data->{'longDescription'} = $object->getLongDescription(); + if ($object->isInitialized('pageTitle') && null !== $object->getPageTitle()) { + $data['pageTitle'] = $object->getPageTitle(); } - if (null !== $object->getPermalink()) { - $data->{'permalink'} = $object->getPermalink(); + if ($object->isInitialized('pageMetaDescription') && null !== $object->getPageMetaDescription()) { + $data['pageMetaDescription'] = $object->getPageMetaDescription(); } - if (null !== $object->getPageTitle()) { - $data->{'pageTitle'} = $object->getPageTitle(); - } - if (null !== $object->getPageMetaDescription()) { - $data->{'pageMetaDescription'} = $object->getPageMetaDescription(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php index ed34651a..df7f0253 100644 --- a/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductLanguageSlimModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,49 +16,89 @@ class ProductLanguageSlimModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductLanguageSlimModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('shortDescription', $data) && $data['shortDescription'] !== null) { + $object->setShortDescription($data['shortDescription']); + unset($data['shortDescription']); } - if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { - $object->setShortDescription($data->{'shortDescription'}); + elseif (\array_key_exists('shortDescription', $data) && $data['shortDescription'] === null) { + $object->setShortDescription(null); } - if (property_exists($data, 'permalink') && $data->{'permalink'} !== null) { - $object->setPermalink($data->{'permalink'}); + if (\array_key_exists('permalink', $data) && $data['permalink'] !== null) { + $object->setPermalink($data['permalink']); + unset($data['permalink']); + } + elseif (\array_key_exists('permalink', $data) && $data['permalink'] === null) { + $object->setPermalink(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + $data = array(); + $data['langCode'] = $object->getLangCode(); + $data['name'] = $object->getName(); + if ($object->isInitialized('shortDescription') && null !== $object->getShortDescription()) { + $data['shortDescription'] = $object->getShortDescription(); } - if (null !== $object->getShortDescription()) { - $data->{'shortDescription'} = $object->getShortDescription(); + if ($object->isInitialized('permalink') && null !== $object->getPermalink()) { + $data['permalink'] = $object->getPermalink(); } - if (null !== $object->getPermalink()) { - $data->{'permalink'} = $object->getPermalink(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php index 5f390528..0410c093 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductManufacturerModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php index a464854f..f4f17970 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductManufacturerModelItemNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php index 837fba58..773cf4be 100644 --- a/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductManufacturerModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,46 +16,98 @@ class ProductManufacturerModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductManufacturerModel(); - if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { - $object->setManufacturerId($data->{'manufacturerId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] !== null) { + $object->setManufacturerId($data['manufacturerId']); + unset($data['manufacturerId']); + } + elseif (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] === null) { + $object->setManufacturerId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('url', $data) && $data['url'] !== null) { + $object->setUrl($data['url']); + unset($data['url']); } - if (property_exists($data, 'url') && $data->{'url'} !== null) { - $object->setUrl($data->{'url'}); + elseif (\array_key_exists('url', $data) && $data['url'] === null) { + $object->setUrl(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + $data['name'] = $object->getName(); + if ($object->isInitialized('url') && null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } - $data->{'url'} = $object->getUrl(); return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductManufacturerModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php index e1da9ec1..b9ee4404 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductMediaFileLinkModelCollectionNormalizer implements DenormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php index 9b0184c3..4c87bbbb 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductMediaFileLinkModelItemNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php index 59db59cf..d42c230e 100644 --- a/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMediaFileLinkModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,43 +16,85 @@ class ProductMediaFileLinkModelNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMediaFileLinkModel(); - if (property_exists($data, 'productMediaFileId') && $data->{'productMediaFileId'} !== null) { - $object->setProductMediaFileId($data->{'productMediaFileId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('productMediaFileId', $data) && $data['productMediaFileId'] !== null) { + $object->setProductMediaFileId($data['productMediaFileId']); + unset($data['productMediaFileId']); + } + elseif (\array_key_exists('productMediaFileId', $data) && $data['productMediaFileId'] === null) { + $object->setProductMediaFileId(null); + } + if (\array_key_exists('mediaFileId', $data) && $data['mediaFileId'] !== null) { + $object->setMediaFileId($data['mediaFileId']); + unset($data['mediaFileId']); + } + elseif (\array_key_exists('mediaFileId', $data) && $data['mediaFileId'] === null) { + $object->setMediaFileId(null); } - if (property_exists($data, 'mediaFileId') && $data->{'mediaFileId'} !== null) { - $object->setMediaFileId($data->{'mediaFileId'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getMediaFileId()) { - $data->{'mediaFileId'} = $object->getMediaFileId(); + $data = array(); + $data['mediaFileId'] = $object->getMediaFileId(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php index c765ac64..7cbf4923 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductMetaDataModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php index 5ddc2423..602fd237 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductMetaDataModelItemNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php index 2ec6aae7..e816ac56 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,49 +16,93 @@ class ProductMetaDataModelNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModel(); - if (property_exists($data, 'metaDataId') && $data->{'metaDataId'} !== null) { - $object->setMetaDataId($data->{'metaDataId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('metaDataId', $data) && $data['metaDataId'] !== null) { + $object->setMetaDataId($data['metaDataId']); + unset($data['metaDataId']); + } + elseif (\array_key_exists('metaDataId', $data) && $data['metaDataId'] === null) { + $object->setMetaDataId(null); + } + if (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] !== null) { + $object->setMetaDataTypeId($data['metaDataTypeId']); + unset($data['metaDataTypeId']); + } + elseif (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] === null) { + $object->setMetaDataTypeId(null); } - if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { - $object->setMetaDataTypeId($data->{'metaDataTypeId'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection', 'json', $context)); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getMetaDataId()) { - $data->{'metaDataId'} = $object->getMetaDataId(); + $data = array(); + if ($object->isInitialized('metaDataId') && null !== $object->getMetaDataId()) { + $data['metaDataId'] = $object->getMetaDataId(); + } + if ($object->isInitialized('metaDataTypeId') && null !== $object->getMetaDataTypeId()) { + $data['metaDataTypeId'] = $object->getMetaDataTypeId(); } - if (null !== $object->getMetaDataTypeId()) { - $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php index ec38429a..4e65ae87 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,54 +16,96 @@ class ProductMetaDataModelUpdatableNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataModelUpdatable(); - if (property_exists($data, 'metaDataId') && $data->{'metaDataId'} !== null) { - $object->setMetaDataId($data->{'metaDataId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('metaDataId', $data) && $data['metaDataId'] !== null) { + $object->setMetaDataId($data['metaDataId']); + unset($data['metaDataId']); + } + elseif (\array_key_exists('metaDataId', $data) && $data['metaDataId'] === null) { + $object->setMetaDataId(null); + } + if (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] !== null) { + $object->setMetaDataTypeId($data['metaDataTypeId']); + unset($data['metaDataTypeId']); } - if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { - $object->setMetaDataTypeId($data->{'metaDataTypeId'}); + elseif (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] === null) { + $object->setMetaDataTypeId(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getMetaDataTypeId()) { - $data->{'metaDataTypeId'} = $object->getMetaDataTypeId(); - } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + $data['metaDataTypeId'] = $object->getMetaDataTypeId(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php index 25365834..cbf1d021 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductMetaDataTypeLanguageModelCollectionNormalizer implements Denormaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeLanguageModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php index a3920f32..41308b93 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductMetaDataTypeLanguageModelNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php index 9888a7da..d2790416 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductMetaDataTypeModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php index c43c9b98..993bff8d 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductMetaDataTypeModelItemNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php index d0b11121..2d9b2d50 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,34 +16,70 @@ class ProductMetaDataTypeModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModel(); - if (property_exists($data, 'metaDataTypeId') && $data->{'metaDataTypeId'} !== null) { - $object->setMetaDataTypeId($data->{'metaDataTypeId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] !== null) { + $object->setMetaDataTypeId($data['metaDataTypeId']); + unset($data['metaDataTypeId']); + } + elseif (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] === null) { + $object->setMetaDataTypeId(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); + unset($data['languages']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + $data = array(); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php index e542486a..75e4c914 100644 --- a/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaDataTypeModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductMetaDataTypeModelUpdatableNormalizer implements DenormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaDataTypeModelUpdatable(); - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + $data = array(); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php index 7ca038ae..474e8d82 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductMetaLanguageDataModelCollectionNormalizer implements DenormalizerIn { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php index 83187270..96d95344 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductMetaLanguageDataModelItemNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php index 82d4c723..be557a32 100644 --- a/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductMetaLanguageDataModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductMetaLanguageDataModelNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductMetaLanguageDataModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('value', $data) && $data['value'] !== null) { + $object->setValue($data['value']); + unset($data['value']); } - if (property_exists($data, 'value') && $data->{'value'} !== null) { - $object->setValue($data->{'value'}); + elseif (\array_key_exists('value', $data) && $data['value'] === null) { + $object->setValue(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['value'] = $object->getValue(); } - if (null !== $object->getValue()) { - $data->{'value'} = $object->getValue(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php index 746e4b3f..a116efd1 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionMetaNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductModelCollectionMetaNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModelCollectionMeta(); - if (property_exists($data, 'pagination') && $data->{'pagination'} !== null) { - $object->setPagination($this->denormalizer->denormalize($data->{'pagination'}, 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pagination', $data) && $data['pagination'] !== null) { + $object->setPagination($this->denormalizer->denormalize($data['pagination'], 'Starweb\\Api\\Generated\\Model\\PaginationModel', 'json', $context)); + unset($data['pagination']); + } + elseif (\array_key_exists('pagination', $data) && $data['pagination'] === null) { + $object->setPagination(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPagination()) { - $data->{'pagination'} = $this->normalizer->normalize($object->getPagination(), 'json', $context); + $data = array(); + if ($object->isInitialized('pagination') && null !== $object->getPagination()) { + $data['pagination'] = $this->normalizer->normalize($object->getPagination(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php index 8de7c7b0..04a8f7ee 100644 --- a/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,81 @@ class ProductModelCollectionNormalizer implements DenormalizerInterface, Normali { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + if (\array_key_exists('meta', $data) && $data['meta'] !== null) { + $object->setMeta($this->denormalizer->denormalize($data['meta'], 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta', 'json', $context)); + unset($data['meta']); + } + elseif (\array_key_exists('meta', $data) && $data['meta'] === null) { + $object->setMeta(null); } - if (property_exists($data, 'meta') && $data->{'meta'} !== null) { - $object->setMeta($this->denormalizer->denormalize($data->{'meta'}, 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta', 'json', $context)); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + if ($object->isInitialized('meta') && null !== $object->getMeta()) { + $data['meta'] = $this->normalizer->normalize($object->getMeta(), 'json', $context); } - if (null !== $object->getMeta()) { - $data->{'meta'} = $this->normalizer->normalize($object->getMeta(), 'json', $context); + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php index 4ea895e1..6137372c 100644 --- a/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductModelItemNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php index e985b36c..3e0d6c0e 100644 --- a/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelLanguagesNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductModelLanguagesNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModelLanguages(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModelLanguages' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelNormalizer.php b/src/Api/Generated/Normalizer/ProductModelNormalizer.php index ef4d7cdd..ff8ecc53 100644 --- a/src/Api/Generated/Normalizer/ProductModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,160 +16,302 @@ class ProductModelNormalizer implements DenormalizerInterface, NormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModel(); - if (property_exists($data, 'productId') && $data->{'productId'} !== null) { - $object->setProductId($data->{'productId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('productId', $data) && $data['productId'] !== null) { + $object->setProductId($data['productId']); + unset($data['productId']); + } + elseif (\array_key_exists('productId', $data) && $data['productId'] === null) { + $object->setProductId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); } - if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { - $object->setDefaultVatRate($data->{'defaultVatRate'}); + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + if (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] !== null) { + $object->setDefaultVatRate($data['defaultVatRate']); + unset($data['defaultVatRate']); } - if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { + elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) { + $object->setDefaultVatRate(null); + } + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); + } + if (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] !== null) { $values = array(); - foreach ($data->{'visibilityPricelistIds'} as $value) { + foreach ($data['visibilityPricelistIds'] as $value) { $values[] = $value; } $object->setVisibilityPricelistIds($values); + unset($data['visibilityPricelistIds']); + } + elseif (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] === null) { + $object->setVisibilityPricelistIds(null); + } + if (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] !== null) { + $object->setMoreInfoUrl($data['moreInfoUrl']); + unset($data['moreInfoUrl']); + } + elseif (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] === null) { + $object->setMoreInfoUrl(null); + } + if (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] !== null) { + $object->setManufacturerId($data['manufacturerId']); + unset($data['manufacturerId']); + } + elseif (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] === null) { + $object->setManufacturerId(null); + } + if (\array_key_exists('unitId', $data) && $data['unitId'] !== null) { + $object->setUnitId($data['unitId']); + unset($data['unitId']); + } + elseif (\array_key_exists('unitId', $data) && $data['unitId'] === null) { + $object->setUnitId(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] !== null) { + $object->setIsBackInStockWatchable($data['isBackInStockWatchable']); + unset($data['isBackInStockWatchable']); } - if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { - $object->setMoreInfoUrl($data->{'moreInfoUrl'}); + elseif (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] === null) { + $object->setIsBackInStockWatchable(null); } - if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { - $object->setManufacturerId($data->{'manufacturerId'}); + if (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] !== null) { + $object->setBundleUseManualPrice($data['bundleUseManualPrice']); + unset($data['bundleUseManualPrice']); } - if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { - $object->setUnitId($data->{'unitId'}); + elseif (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] === null) { + $object->setBundleUseManualPrice(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('accounting', $data) && $data['accounting'] !== null) { + $object->setAccounting($data['accounting']); + unset($data['accounting']); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + elseif (\array_key_exists('accounting', $data) && $data['accounting'] === null) { + $object->setAccounting(null); } - if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { - $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); + if (\array_key_exists('hasSeveralVariants', $data) && $data['hasSeveralVariants'] !== null) { + $object->setHasSeveralVariants($data['hasSeveralVariants']); + unset($data['hasSeveralVariants']); } - if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { - $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); + elseif (\array_key_exists('hasSeveralVariants', $data) && $data['hasSeveralVariants'] === null) { + $object->setHasSeveralVariants(null); } - if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { - $object->setAccounting($data->{'accounting'}); + if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) { + $object->setModifiedAt($data['modifiedAt']); + unset($data['modifiedAt']); } - if (property_exists($data, 'hasSeveralVariants') && $data->{'hasSeveralVariants'} !== null) { - $object->setHasSeveralVariants($data->{'hasSeveralVariants'}); + elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) { + $object->setModifiedAt(null); } - if (property_exists($data, 'modifiedAt') && $data->{'modifiedAt'} !== null) { - $object->setModifiedAt($data->{'modifiedAt'}); + if (\array_key_exists('variants', $data) && $data['variants'] !== null) { + $object->setVariants($this->denormalizer->denormalize($data['variants'], 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection', 'json', $context)); + unset($data['variants']); } - if (property_exists($data, 'variants') && $data->{'variants'} !== null) { - $object->setVariants($this->denormalizer->denormalize($data->{'variants'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection', 'json', $context)); + elseif (\array_key_exists('variants', $data) && $data['variants'] === null) { + $object->setVariants(null); } - if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { - $object->setBundledProducts($this->denormalizer->denormalize($data->{'bundledProducts'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection', 'json', $context)); + if (\array_key_exists('bundledProducts', $data) && $data['bundledProducts'] !== null) { + $object->setBundledProducts($this->denormalizer->denormalize($data['bundledProducts'], 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection', 'json', $context)); + unset($data['bundledProducts']); } - if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { - $object->setMediaFiles($this->denormalizer->denormalize($data->{'mediaFiles'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection', 'json', $context)); + elseif (\array_key_exists('bundledProducts', $data) && $data['bundledProducts'] === null) { + $object->setBundledProducts(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages', 'json', $context)); + if (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] !== null) { + $object->setMediaFiles($this->denormalizer->denormalize($data['mediaFiles'], 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection', 'json', $context)); + unset($data['mediaFiles']); } - if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { - $object->setVatRates($this->denormalizer->denormalize($data->{'vatRates'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection', 'json', $context)); + elseif (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] === null) { + $object->setMediaFiles(null); } - if (property_exists($data, 'categories') && $data->{'categories'} !== null) { - $object->setCategories($this->denormalizer->denormalize($data->{'categories'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection', 'json', $context)); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages', 'json', $context)); + unset($data['languages']); } - if (property_exists($data, 'unit') && $data->{'unit'} !== null) { - $object->setUnit($this->denormalizer->denormalize($data->{'unit'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json', $context)); + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); } - if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { - $object->setMetaData($this->denormalizer->denormalize($data->{'metaData'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection', 'json', $context)); + if (\array_key_exists('vatRates', $data) && $data['vatRates'] !== null) { + $object->setVatRates($this->denormalizer->denormalize($data['vatRates'], 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection', 'json', $context)); + unset($data['vatRates']); + } + elseif (\array_key_exists('vatRates', $data) && $data['vatRates'] === null) { + $object->setVatRates(null); + } + if (\array_key_exists('categories', $data) && $data['categories'] !== null) { + $object->setCategories($this->denormalizer->denormalize($data['categories'], 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection', 'json', $context)); + unset($data['categories']); + } + elseif (\array_key_exists('categories', $data) && $data['categories'] === null) { + $object->setCategories(null); + } + if (\array_key_exists('unit', $data) && $data['unit'] !== null) { + $object->setUnit($this->denormalizer->denormalize($data['unit'], 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json', $context)); + unset($data['unit']); + } + elseif (\array_key_exists('unit', $data) && $data['unit'] === null) { + $object->setUnit(null); + } + if (\array_key_exists('metaData', $data) && $data['metaData'] !== null) { + $object->setMetaData($this->denormalizer->denormalize($data['metaData'], 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection', 'json', $context)); + unset($data['metaData']); + } + elseif (\array_key_exists('metaData', $data) && $data['metaData'] === null) { + $object->setMetaData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); } - if (null !== $object->getVisibilityPricelistIds()) { + if ($object->isInitialized('defaultVatRate') && null !== $object->getDefaultVatRate()) { + $data['defaultVatRate'] = $object->getDefaultVatRate(); + } + if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { + $data['visibility'] = $object->getVisibility(); + } + if ($object->isInitialized('visibilityPricelistIds') && null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { $values[] = $value; } - $data->{'visibilityPricelistIds'} = $values; + $data['visibilityPricelistIds'] = $values; + } + if ($object->isInitialized('moreInfoUrl') && null !== $object->getMoreInfoUrl()) { + $data['moreInfoUrl'] = $object->getMoreInfoUrl(); + } + if ($object->isInitialized('manufacturerId') && null !== $object->getManufacturerId()) { + $data['manufacturerId'] = $object->getManufacturerId(); + } + if ($object->isInitialized('unitId') && null !== $object->getUnitId()) { + $data['unitId'] = $object->getUnitId(); } - if (null !== $object->getMoreInfoUrl()) { - $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - $data->{'manufacturerId'} = $object->getManufacturerId(); - $data->{'unitId'} = $object->getUnitId(); - $data->{'sortIndex'} = $object->getSortIndex(); - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); } - if (null !== $object->getIsBackInStockWatchable()) { - $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); + if ($object->isInitialized('isBackInStockWatchable') && null !== $object->getIsBackInStockWatchable()) { + $data['isBackInStockWatchable'] = $object->getIsBackInStockWatchable(); } - if (null !== $object->getBundleUseManualPrice()) { - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); + if ($object->isInitialized('bundleUseManualPrice') && null !== $object->getBundleUseManualPrice()) { + $data['bundleUseManualPrice'] = $object->getBundleUseManualPrice(); } - $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getVariants()) { - $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context); + if ($object->isInitialized('accounting') && null !== $object->getAccounting()) { + $data['accounting'] = $object->getAccounting(); } - if (null !== $object->getBundledProducts()) { - $data->{'bundledProducts'} = $this->normalizer->normalize($object->getBundledProducts(), 'json', $context); + if ($object->isInitialized('variants') && null !== $object->getVariants()) { + $data['variants'] = $this->normalizer->normalize($object->getVariants(), 'json', $context); } - if (null !== $object->getMediaFiles()) { - $data->{'mediaFiles'} = $this->normalizer->normalize($object->getMediaFiles(), 'json', $context); + if ($object->isInitialized('bundledProducts') && null !== $object->getBundledProducts()) { + $data['bundledProducts'] = $this->normalizer->normalize($object->getBundledProducts(), 'json', $context); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + if ($object->isInitialized('mediaFiles') && null !== $object->getMediaFiles()) { + $data['mediaFiles'] = $this->normalizer->normalize($object->getMediaFiles(), 'json', $context); } - if (null !== $object->getVatRates()) { - $data->{'vatRates'} = $this->normalizer->normalize($object->getVatRates(), 'json', $context); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); } - if (null !== $object->getCategories()) { - $data->{'categories'} = $this->normalizer->normalize($object->getCategories(), 'json', $context); + if ($object->isInitialized('vatRates') && null !== $object->getVatRates()) { + $data['vatRates'] = $this->normalizer->normalize($object->getVatRates(), 'json', $context); } - if (null !== $object->getUnit()) { - $data->{'unit'} = $this->normalizer->normalize($object->getUnit(), 'json', $context); + if ($object->isInitialized('categories') && null !== $object->getCategories()) { + $data['categories'] = $this->normalizer->normalize($object->getCategories(), 'json', $context); } - if (null !== $object->getMetaData()) { - $data->{'metaData'} = $this->normalizer->normalize($object->getMetaData(), 'json', $context); + if ($object->isInitialized('unit') && null !== $object->getUnit()) { + $data['unit'] = $this->normalizer->normalize($object->getUnit(), 'json', $context); + } + if ($object->isInitialized('metaData') && null !== $object->getMetaData()) { + $data['metaData'] = $this->normalizer->normalize($object->getMetaData(), 'json', $context); + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php index cb470bdd..3c9cfa33 100644 --- a/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelPatchableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,172 +16,291 @@ class ProductModelPatchableNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModelPatchable(); - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); } - if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { - $object->setDefaultVatRate($data->{'defaultVatRate'}); + if (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] !== null) { + $object->setDefaultVatRate($data['defaultVatRate']); + unset($data['defaultVatRate']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) { + $object->setDefaultVatRate(null); } - if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); + } + if (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] !== null) { $values = array(); - foreach ($data->{'visibilityPricelistIds'} as $value) { + foreach ($data['visibilityPricelistIds'] as $value) { $values[] = $value; } $object->setVisibilityPricelistIds($values); + unset($data['visibilityPricelistIds']); + } + elseif (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] === null) { + $object->setVisibilityPricelistIds(null); + } + if (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] !== null) { + $object->setMoreInfoUrl($data['moreInfoUrl']); + unset($data['moreInfoUrl']); } - if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { - $object->setMoreInfoUrl($data->{'moreInfoUrl'}); + elseif (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] === null) { + $object->setMoreInfoUrl(null); } - if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { - $object->setManufacturerId($data->{'manufacturerId'}); + if (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] !== null) { + $object->setManufacturerId($data['manufacturerId']); + unset($data['manufacturerId']); } - if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { - $object->setUnitId($data->{'unitId'}); + elseif (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] === null) { + $object->setManufacturerId(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('unitId', $data) && $data['unitId'] !== null) { + $object->setUnitId($data['unitId']); + unset($data['unitId']); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + elseif (\array_key_exists('unitId', $data) && $data['unitId'] === null) { + $object->setUnitId(null); } - if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { - $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { - $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { - $object->setAccounting($data->{'accounting'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); } - if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] !== null) { + $object->setIsBackInStockWatchable($data['isBackInStockWatchable']); + unset($data['isBackInStockWatchable']); + } + elseif (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] === null) { + $object->setIsBackInStockWatchable(null); + } + if (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] !== null) { + $object->setBundleUseManualPrice($data['bundleUseManualPrice']); + unset($data['bundleUseManualPrice']); + } + elseif (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] === null) { + $object->setBundleUseManualPrice(null); + } + if (\array_key_exists('accounting', $data) && $data['accounting'] !== null) { + $object->setAccounting($data['accounting']); + unset($data['accounting']); + } + elseif (\array_key_exists('accounting', $data) && $data['accounting'] === null) { + $object->setAccounting(null); + } + if (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] !== null) { $values_1 = array(); - foreach ($data->{'mediaFiles'} as $value_1) { + foreach ($data['mediaFiles'] as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context); } $object->setMediaFiles($values_1); + unset($data['mediaFiles']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] === null) { + $object->setMediaFiles(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values_2 = array(); - foreach ($data->{'languages'} as $value_2) { + foreach ($data['languages'] as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context); } $object->setLanguages($values_2); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); } - if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { + if (\array_key_exists('vatRates', $data) && $data['vatRates'] !== null) { $values_3 = array(); - foreach ($data->{'vatRates'} as $value_3) { + foreach ($data['vatRates'] as $value_3) { $values_3[] = $this->denormalizer->denormalize($value_3, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context); } $object->setVatRates($values_3); + unset($data['vatRates']); } - if (property_exists($data, 'categories') && $data->{'categories'} !== null) { + elseif (\array_key_exists('vatRates', $data) && $data['vatRates'] === null) { + $object->setVatRates(null); + } + if (\array_key_exists('categories', $data) && $data['categories'] !== null) { $values_4 = array(); - foreach ($data->{'categories'} as $value_4) { + foreach ($data['categories'] as $value_4) { $values_4[] = $this->denormalizer->denormalize($value_4, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context); } $object->setCategories($values_4); + unset($data['categories']); + } + elseif (\array_key_exists('categories', $data) && $data['categories'] === null) { + $object->setCategories(null); } - if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { + if (\array_key_exists('metaData', $data) && $data['metaData'] !== null) { $values_5 = array(); - foreach ($data->{'metaData'} as $value_5) { + foreach ($data['metaData'] as $value_5) { $values_5[] = $this->denormalizer->denormalize($value_5, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable', 'json', $context); } $object->setMetaData($values_5); + unset($data['metaData']); + } + elseif (\array_key_exists('metaData', $data) && $data['metaData'] === null) { + $object->setMetaData(null); + } + foreach ($data as $key => $value_6) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_6; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getVisibilityPricelistIds()) { + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('defaultVatRate') && null !== $object->getDefaultVatRate()) { + $data['defaultVatRate'] = $object->getDefaultVatRate(); + } + if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { + $data['visibility'] = $object->getVisibility(); + } + if ($object->isInitialized('visibilityPricelistIds') && null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { $values[] = $value; } - $data->{'visibilityPricelistIds'} = $values; + $data['visibilityPricelistIds'] = $values; + } + if ($object->isInitialized('moreInfoUrl') && null !== $object->getMoreInfoUrl()) { + $data['moreInfoUrl'] = $object->getMoreInfoUrl(); } - else { - $data->{'visibilityPricelistIds'} = null; + if ($object->isInitialized('manufacturerId') && null !== $object->getManufacturerId()) { + $data['manufacturerId'] = $object->getManufacturerId(); } - $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); - $data->{'manufacturerId'} = $object->getManufacturerId(); - $data->{'unitId'} = $object->getUnitId(); - $data->{'sortIndex'} = $object->getSortIndex(); - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + if ($object->isInitialized('unitId') && null !== $object->getUnitId()) { + $data['unitId'] = $object->getUnitId(); } - if (null !== $object->getIsBackInStockWatchable()) { - $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getMediaFiles()) { + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if ($object->isInitialized('isBackInStockWatchable') && null !== $object->getIsBackInStockWatchable()) { + $data['isBackInStockWatchable'] = $object->getIsBackInStockWatchable(); + } + if ($object->isInitialized('bundleUseManualPrice') && null !== $object->getBundleUseManualPrice()) { + $data['bundleUseManualPrice'] = $object->getBundleUseManualPrice(); + } + if ($object->isInitialized('accounting') && null !== $object->getAccounting()) { + $data['accounting'] = $object->getAccounting(); + } + if ($object->isInitialized('mediaFiles') && null !== $object->getMediaFiles()) { $values_1 = array(); foreach ($object->getMediaFiles() as $value_1) { $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $data->{'mediaFiles'} = $values_1; + $data['mediaFiles'] = $values_1; } - if (null !== $object->getLanguages()) { + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values_2 = array(); foreach ($object->getLanguages() as $value_2) { $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - $data->{'languages'} = $values_2; + $data['languages'] = $values_2; } - if (null !== $object->getVatRates()) { + if ($object->isInitialized('vatRates') && null !== $object->getVatRates()) { $values_3 = array(); foreach ($object->getVatRates() as $value_3) { $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - $data->{'vatRates'} = $values_3; + $data['vatRates'] = $values_3; } - if (null !== $object->getCategories()) { + if ($object->isInitialized('categories') && null !== $object->getCategories()) { $values_4 = array(); foreach ($object->getCategories() as $value_4) { $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - $data->{'categories'} = $values_4; + $data['categories'] = $values_4; } - if (null !== $object->getMetaData()) { + if ($object->isInitialized('metaData') && null !== $object->getMetaData()) { $values_5 = array(); foreach ($object->getMetaData() as $value_5) { $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); } - $data->{'metaData'} = $values_5; + $data['metaData'] = $values_5; + } + foreach ($object as $key => $value_6) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_6; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModelPatchable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php index e127f78e..4728a3d8 100644 --- a/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,205 +16,327 @@ class ProductModelUpdatableNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductModelUpdatable(); - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) { + $object->setCreatedAt($data['createdAt']); + unset($data['createdAt']); } - if (property_exists($data, 'createdAt') && $data->{'createdAt'} !== null) { - $object->setCreatedAt($data->{'createdAt'}); + elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) { + $object->setCreatedAt(null); } - if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { - $object->setDefaultVatRate($data->{'defaultVatRate'}); + if (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] !== null) { + $object->setDefaultVatRate($data['defaultVatRate']); + unset($data['defaultVatRate']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) { + $object->setDefaultVatRate(null); } - if (property_exists($data, 'visibilityPricelistIds') && $data->{'visibilityPricelistIds'} !== null) { + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); + } + if (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] !== null) { $values = array(); - foreach ($data->{'visibilityPricelistIds'} as $value) { + foreach ($data['visibilityPricelistIds'] as $value) { $values[] = $value; } $object->setVisibilityPricelistIds($values); + unset($data['visibilityPricelistIds']); + } + elseif (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] === null) { + $object->setVisibilityPricelistIds(null); + } + if (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] !== null) { + $object->setMoreInfoUrl($data['moreInfoUrl']); + unset($data['moreInfoUrl']); + } + elseif (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] === null) { + $object->setMoreInfoUrl(null); } - if (property_exists($data, 'moreInfoUrl') && $data->{'moreInfoUrl'} !== null) { - $object->setMoreInfoUrl($data->{'moreInfoUrl'}); + if (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] !== null) { + $object->setManufacturerId($data['manufacturerId']); + unset($data['manufacturerId']); } - if (property_exists($data, 'manufacturerId') && $data->{'manufacturerId'} !== null) { - $object->setManufacturerId($data->{'manufacturerId'}); + elseif (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] === null) { + $object->setManufacturerId(null); } - if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { - $object->setUnitId($data->{'unitId'}); + if (\array_key_exists('unitId', $data) && $data['unitId'] !== null) { + $object->setUnitId($data['unitId']); + unset($data['unitId']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('unitId', $data) && $data['unitId'] === null) { + $object->setUnitId(null); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'isBackInStockWatchable') && $data->{'isBackInStockWatchable'} !== null) { - $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'bundleUseManualPrice') && $data->{'bundleUseManualPrice'} !== null) { - $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); } - if (property_exists($data, 'accounting') && $data->{'accounting'} !== null) { - $object->setAccounting($data->{'accounting'}); + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); } - if (property_exists($data, 'variants') && $data->{'variants'} !== null) { + if (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] !== null) { + $object->setIsBackInStockWatchable($data['isBackInStockWatchable']); + unset($data['isBackInStockWatchable']); + } + elseif (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] === null) { + $object->setIsBackInStockWatchable(null); + } + if (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] !== null) { + $object->setBundleUseManualPrice($data['bundleUseManualPrice']); + unset($data['bundleUseManualPrice']); + } + elseif (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] === null) { + $object->setBundleUseManualPrice(null); + } + if (\array_key_exists('accounting', $data) && $data['accounting'] !== null) { + $object->setAccounting($data['accounting']); + unset($data['accounting']); + } + elseif (\array_key_exists('accounting', $data) && $data['accounting'] === null) { + $object->setAccounting(null); + } + if (\array_key_exists('variants', $data) && $data['variants'] !== null) { $values_1 = array(); - foreach ($data->{'variants'} as $value_1) { + foreach ($data['variants'] as $value_1) { $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel', 'json', $context); } $object->setVariants($values_1); + unset($data['variants']); + } + elseif (\array_key_exists('variants', $data) && $data['variants'] === null) { + $object->setVariants(null); } - if (property_exists($data, 'bundledProducts') && $data->{'bundledProducts'} !== null) { + if (\array_key_exists('bundledProducts', $data) && $data['bundledProducts'] !== null) { $values_2 = array(); - foreach ($data->{'bundledProducts'} as $value_2) { + foreach ($data['bundledProducts'] as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, 'Starweb\\Api\\Generated\\Model\\BundledProductsModel', 'json', $context); } $object->setBundledProducts($values_2); + unset($data['bundledProducts']); } - if (property_exists($data, 'mediaFiles') && $data->{'mediaFiles'} !== null) { + elseif (\array_key_exists('bundledProducts', $data) && $data['bundledProducts'] === null) { + $object->setBundledProducts(null); + } + if (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] !== null) { $values_3 = array(); - foreach ($data->{'mediaFiles'} as $value_3) { + foreach ($data['mediaFiles'] as $value_3) { $values_3[] = $this->denormalizer->denormalize($value_3, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel', 'json', $context); } $object->setMediaFiles($values_3); + unset($data['mediaFiles']); + } + elseif (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] === null) { + $object->setMediaFiles(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values_4 = array(); - foreach ($data->{'languages'} as $value_4) { + foreach ($data['languages'] as $value_4) { $values_4[] = $this->denormalizer->denormalize($value_4, 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel', 'json', $context); } $object->setLanguages($values_4); + unset($data['languages']); } - if (property_exists($data, 'vatRates') && $data->{'vatRates'} !== null) { + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + if (\array_key_exists('vatRates', $data) && $data['vatRates'] !== null) { $values_5 = array(); - foreach ($data->{'vatRates'} as $value_5) { + foreach ($data['vatRates'] as $value_5) { $values_5[] = $this->denormalizer->denormalize($value_5, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context); } $object->setVatRates($values_5); + unset($data['vatRates']); + } + elseif (\array_key_exists('vatRates', $data) && $data['vatRates'] === null) { + $object->setVatRates(null); } - if (property_exists($data, 'categories') && $data->{'categories'} !== null) { + if (\array_key_exists('categories', $data) && $data['categories'] !== null) { $values_6 = array(); - foreach ($data->{'categories'} as $value_6) { + foreach ($data['categories'] as $value_6) { $values_6[] = $this->denormalizer->denormalize($value_6, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel', 'json', $context); } $object->setCategories($values_6); + unset($data['categories']); + } + elseif (\array_key_exists('categories', $data) && $data['categories'] === null) { + $object->setCategories(null); } - if (property_exists($data, 'metaData') && $data->{'metaData'} !== null) { + if (\array_key_exists('metaData', $data) && $data['metaData'] !== null) { $values_7 = array(); - foreach ($data->{'metaData'} as $value_7) { + foreach ($data['metaData'] as $value_7) { $values_7[] = $this->denormalizer->denormalize($value_7, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable', 'json', $context); } $object->setMetaData($values_7); + unset($data['metaData']); + } + elseif (\array_key_exists('metaData', $data) && $data['metaData'] === null) { + $object->setMetaData(null); + } + foreach ($data as $key => $value_8) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_8; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getCreatedAt()) { - $data->{'createdAt'} = $object->getCreatedAt(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['createdAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('defaultVatRate') && null !== $object->getDefaultVatRate()) { + $data['defaultVatRate'] = $object->getDefaultVatRate(); } - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { + $data['visibility'] = $object->getVisibility(); } - if (null !== $object->getVisibilityPricelistIds()) { + if ($object->isInitialized('visibilityPricelistIds') && null !== $object->getVisibilityPricelistIds()) { $values = array(); foreach ($object->getVisibilityPricelistIds() as $value) { $values[] = $value; } - $data->{'visibilityPricelistIds'} = $values; + $data['visibilityPricelistIds'] = $values; } - else { - $data->{'visibilityPricelistIds'} = null; + if ($object->isInitialized('moreInfoUrl') && null !== $object->getMoreInfoUrl()) { + $data['moreInfoUrl'] = $object->getMoreInfoUrl(); } - if (null !== $object->getMoreInfoUrl()) { - $data->{'moreInfoUrl'} = $object->getMoreInfoUrl(); + if ($object->isInitialized('manufacturerId') && null !== $object->getManufacturerId()) { + $data['manufacturerId'] = $object->getManufacturerId(); } - $data->{'manufacturerId'} = $object->getManufacturerId(); - $data->{'unitId'} = $object->getUnitId(); - $data->{'sortIndex'} = $object->getSortIndex(); - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + if ($object->isInitialized('unitId') && null !== $object->getUnitId()) { + $data['unitId'] = $object->getUnitId(); } - if (null !== $object->getIsBackInStockWatchable()) { - $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice(); - $data->{'accounting'} = $object->getAccounting(); - if (null !== $object->getVariants()) { + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if ($object->isInitialized('isBackInStockWatchable') && null !== $object->getIsBackInStockWatchable()) { + $data['isBackInStockWatchable'] = $object->getIsBackInStockWatchable(); + } + if ($object->isInitialized('bundleUseManualPrice') && null !== $object->getBundleUseManualPrice()) { + $data['bundleUseManualPrice'] = $object->getBundleUseManualPrice(); + } + if ($object->isInitialized('accounting') && null !== $object->getAccounting()) { + $data['accounting'] = $object->getAccounting(); + } + if ($object->isInitialized('variants') && null !== $object->getVariants()) { $values_1 = array(); foreach ($object->getVariants() as $value_1) { $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $data->{'variants'} = $values_1; + $data['variants'] = $values_1; } - if (null !== $object->getBundledProducts()) { + if ($object->isInitialized('bundledProducts') && null !== $object->getBundledProducts()) { $values_2 = array(); foreach ($object->getBundledProducts() as $value_2) { $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - $data->{'bundledProducts'} = $values_2; - } - else { - $data->{'bundledProducts'} = null; + $data['bundledProducts'] = $values_2; } - if (null !== $object->getMediaFiles()) { + if ($object->isInitialized('mediaFiles') && null !== $object->getMediaFiles()) { $values_3 = array(); foreach ($object->getMediaFiles() as $value_3) { $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - $data->{'mediaFiles'} = $values_3; + $data['mediaFiles'] = $values_3; } - if (null !== $object->getLanguages()) { + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values_4 = array(); foreach ($object->getLanguages() as $value_4) { $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - $data->{'languages'} = $values_4; + $data['languages'] = $values_4; } - if (null !== $object->getVatRates()) { + if ($object->isInitialized('vatRates') && null !== $object->getVatRates()) { $values_5 = array(); foreach ($object->getVatRates() as $value_5) { $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); } - $data->{'vatRates'} = $values_5; + $data['vatRates'] = $values_5; } - if (null !== $object->getCategories()) { + if ($object->isInitialized('categories') && null !== $object->getCategories()) { $values_6 = array(); foreach ($object->getCategories() as $value_6) { $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); } - $data->{'categories'} = $values_6; + $data['categories'] = $values_6; } - if (null !== $object->getMetaData()) { + if ($object->isInitialized('metaData') && null !== $object->getMetaData()) { $values_7 = array(); foreach ($object->getMetaData() as $value_7) { $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); } - $data->{'metaData'} = $values_7; + $data['metaData'] = $values_7; + } + foreach ($object as $key => $value_8) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_8; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php index 5e23ff51..08a553d7 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductStockStatusLanguageModelNormalizer implements DenormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php index 4ab14399..38172be3 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductStockStatusModelCollectionNormalizer implements DenormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php index 7e1b1045..9d7a6c28 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductStockStatusModelItemNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php index 686d87a3..0ffb0f07 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,67 +16,125 @@ class ProductStockStatusRequestModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusRequestModel(); - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); + } + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); + } + if (\array_key_exists('idCode', $data) && $data['idCode'] !== null) { + $object->setIdCode($data['idCode']); + unset($data['idCode']); + } + elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) { + $object->setIdCode(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('stockoutNewStatusId', $data) && $data['stockoutNewStatusId'] !== null) { + $object->setStockoutNewStatusId($data['stockoutNewStatusId']); + unset($data['stockoutNewStatusId']); } - if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { - $object->setIdCode($data->{'idCode'}); + elseif (\array_key_exists('stockoutNewStatusId', $data) && $data['stockoutNewStatusId'] === null) { + $object->setStockoutNewStatusId(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('productBuyable', $data) && $data['productBuyable'] !== null) { + $object->setProductBuyable($data['productBuyable']); + unset($data['productBuyable']); } - if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { - $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); + elseif (\array_key_exists('productBuyable', $data) && $data['productBuyable'] === null) { + $object->setProductBuyable(null); } - if (property_exists($data, 'productBuyable') && $data->{'productBuyable'} !== null) { - $object->setProductBuyable($data->{'productBuyable'}); + if (\array_key_exists('inStock', $data) && $data['inStock'] !== null) { + $object->setInStock($data['inStock']); + unset($data['inStock']); } - if (property_exists($data, 'inStock') && $data->{'inStock'} !== null) { - $object->setInStock($data->{'inStock'}); + elseif (\array_key_exists('inStock', $data) && $data['inStock'] === null) { + $object->setInStock(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('stockoutNewStatusId') && null !== $object->getStockoutNewStatusId()) { + $data['stockoutNewStatusId'] = $object->getStockoutNewStatusId(); } - $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); - if (null !== $object->getProductBuyable()) { - $data->{'productBuyable'} = $object->getProductBuyable(); + if ($object->isInitialized('productBuyable') && null !== $object->getProductBuyable()) { + $data['productBuyable'] = $object->getProductBuyable(); } - if (null !== $object->getInStock()) { - $data->{'inStock'} = $object->getInStock(); + if ($object->isInitialized('inStock') && null !== $object->getInStock()) { + $data['inStock'] = $object->getInStock(); } - if (null !== $object->getLanguages()) { + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductStockStatusRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php index 80a2ce2c..0cefe48d 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductStockStatusResponseModelLanguagesNormalizer implements Denormalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusResponseModelLanguages(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php index dcfe88ce..9eea7841 100644 --- a/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,59 +16,117 @@ class ProductStockStatusResponseModelNormalizer implements DenormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductStockStatusResponseModel(); - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); + } + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); + } + if (\array_key_exists('idCode', $data) && $data['idCode'] !== null) { + $object->setIdCode($data['idCode']); + unset($data['idCode']); + } + elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) { + $object->setIdCode(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { - $object->setIdCode($data->{'idCode'}); + if (\array_key_exists('stockoutNewStatusId', $data) && $data['stockoutNewStatusId'] !== null) { + $object->setStockoutNewStatusId($data['stockoutNewStatusId']); + unset($data['stockoutNewStatusId']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('stockoutNewStatusId', $data) && $data['stockoutNewStatusId'] === null) { + $object->setStockoutNewStatusId(null); } - if (property_exists($data, 'stockoutNewStatusId') && $data->{'stockoutNewStatusId'} !== null) { - $object->setStockoutNewStatusId($data->{'stockoutNewStatusId'}); + if (\array_key_exists('productBuyable', $data) && $data['productBuyable'] !== null) { + $object->setProductBuyable($data['productBuyable']); + unset($data['productBuyable']); } - if (property_exists($data, 'productBuyable') && $data->{'productBuyable'} !== null) { - $object->setProductBuyable($data->{'productBuyable'}); + elseif (\array_key_exists('productBuyable', $data) && $data['productBuyable'] === null) { + $object->setProductBuyable(null); } - if (property_exists($data, 'inStock') && $data->{'inStock'} !== null) { - $object->setInStock($data->{'inStock'}); + if (\array_key_exists('inStock', $data) && $data['inStock'] !== null) { + $object->setInStock($data['inStock']); + unset($data['inStock']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages', 'json', $context)); + elseif (\array_key_exists('inStock', $data) && $data['inStock'] === null) { + $object->setInStock(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModelLanguages', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('stockoutNewStatusId') && null !== $object->getStockoutNewStatusId()) { + $data['stockoutNewStatusId'] = $object->getStockoutNewStatusId(); } - $data->{'stockoutNewStatusId'} = $object->getStockoutNewStatusId(); - if (null !== $object->getProductBuyable()) { - $data->{'productBuyable'} = $object->getProductBuyable(); + if ($object->isInitialized('productBuyable') && null !== $object->getProductBuyable()) { + $data['productBuyable'] = $object->getProductBuyable(); } - if (null !== $object->getInStock()) { - $data->{'inStock'} = $object->getInStock(); + if ($object->isInitialized('inStock') && null !== $object->getInStock()) { + $data['inStock'] = $object->getInStock(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductStockStatusResponseModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php index b585b59a..264481e4 100644 --- a/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,69 @@ class ProductTagLanguageModelNormalizer implements DenormalizerInterface, Normal { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + $data = array(); + $data['langCode'] = $object->getLangCode(); + $data['name'] = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php index 4bc0f923..16098636 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductTagLinkModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php index 60ebd3e7..d7fb6633 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductTagLinkModelItemNormalizer implements DenormalizerInterface, Normal { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php index 02464e25..4b9bd3aa 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductTagLinkModelNormalizer implements DenormalizerInterface, Normalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkModel(); - if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { - $object->setTagOptionId($data->{'tagOptionId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('tagOptionId', $data) && $data['tagOptionId'] !== null) { + $object->setTagOptionId($data['tagOptionId']); + unset($data['tagOptionId']); + } + elseif (\array_key_exists('tagOptionId', $data) && $data['tagOptionId'] === null) { + $object->setTagOptionId(null); + } + if (\array_key_exists('tagId', $data) && $data['tagId'] !== null) { + $object->setTagId($data['tagId']); + unset($data['tagId']); } - if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { - $object->setTagId($data->{'tagId'}); + elseif (\array_key_exists('tagId', $data) && $data['tagId'] === null) { + $object->setTagId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getTagOptionId()) { - $data->{'tagOptionId'} = $object->getTagOptionId(); + $data = array(); + if ($object->isInitialized('tagOptionId') && null !== $object->getTagOptionId()) { + $data['tagOptionId'] = $object->getTagOptionId(); + } + if ($object->isInitialized('tagId') && null !== $object->getTagId()) { + $data['tagId'] = $object->getTagId(); } - if (null !== $object->getTagId()) { - $data->{'tagId'} = $object->getTagId(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagLinkModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php index 3d95f46e..3abb627c 100644 --- a/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagLinkPostRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,61 @@ class ProductTagLinkPostRequestModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagLinkPostRequestModel(); - if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { - $object->setTagOptionId($data->{'tagOptionId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('tagOptionId', $data) && $data['tagOptionId'] !== null) { + $object->setTagOptionId($data['tagOptionId']); + unset($data['tagOptionId']); + } + elseif (\array_key_exists('tagOptionId', $data) && $data['tagOptionId'] === null) { + $object->setTagOptionId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getTagOptionId()) { - $data->{'tagOptionId'} = $object->getTagOptionId(); + $data = array(); + $data['tagOptionId'] = $object->getTagOptionId(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php index 36a70f6c..e4de6e24 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductTagModelCollectionNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php index 91a82a96..fdd5074d 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductTagModelItemNormalizer implements DenormalizerInterface, Normalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductTagModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php index aa858ab4..0be0d27d 100644 --- a/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,85 @@ class ProductTagModelNormalizer implements DenormalizerInterface, NormalizerInte { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagModel(); - if (property_exists($data, 'tagId') && $data->{'tagId'} !== null) { - $object->setTagId($data->{'tagId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('tagId', $data) && $data['tagId'] !== null) { + $object->setTagId($data['tagId']); + unset($data['tagId']); + } + elseif (\array_key_exists('tagId', $data) && $data['tagId'] === null) { + $object->setTagId(null); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLanguages()) { + $data = array(); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php index c80a19ef..83db528b 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,69 @@ class ProductTagOptionLanguageModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('value', $data) && $data['value'] !== null) { + $object->setValue($data['value']); + unset($data['value']); } - if (property_exists($data, 'value') && $data->{'value'} !== null) { - $object->setValue($data->{'value'}); + elseif (\array_key_exists('value', $data) && $data['value'] === null) { + $object->setValue(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getValue()) { - $data->{'value'} = $object->getValue(); + $data = array(); + $data['langCode'] = $object->getLangCode(); + $data['value'] = $object->getValue(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php index 22daca13..ad237216 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductTagOptionModelCollectionNormalizer implements DenormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php index b3d9b080..0a8eef6e 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductTagOptionModelItemNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php index f3e0d36a..96f53749 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,51 +16,95 @@ class ProductTagOptionModelNormalizer implements DenormalizerInterface, Normaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionModel(); - if (property_exists($data, 'tagOptionId') && $data->{'tagOptionId'} !== null) { - $object->setTagOptionId($data->{'tagOptionId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('tagOptionId', $data) && $data['tagOptionId'] !== null) { + $object->setTagOptionId($data['tagOptionId']); + unset($data['tagOptionId']); + } + elseif (\array_key_exists('tagOptionId', $data) && $data['tagOptionId'] === null) { + $object->setTagOptionId(null); } - if (property_exists($data, 'value') && $data->{'value'} !== null) { - $object->setValue($data->{'value'}); + if (\array_key_exists('value', $data) && $data['value'] !== null) { + $object->setValue($data['value']); + unset($data['value']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('value', $data) && $data['value'] === null) { + $object->setValue(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php index 1f5e9e3d..29328c4c 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPatchRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,79 @@ class ProductTagOptionPatchRequestModelNormalizer implements DenormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPatchRequestModel(); - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php index 0b97318b..fd9726c8 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPostRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,79 @@ class ProductTagOptionPostRequestModelNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPostRequestModel(); - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php index 785edf6e..bae97797 100644 --- a/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagOptionPutRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,79 @@ class ProductTagOptionPutRequestModelNormalizer implements DenormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagOptionPutRequestModel(); - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + $data = array(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php index 3ffc7eda..ddfebe0d 100644 --- a/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPatchRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,51 +16,85 @@ class ProductTagPatchRequestModelNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagPatchRequestModel(); - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + $data = array(); + $data['name'] = $object->getName(); + $data['type'] = $object->getType(); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php index 11ab7a6b..9b1dc3c5 100644 --- a/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPostRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,51 +16,85 @@ class ProductTagPostRequestModelNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagPostRequestModel(); - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + $data = array(); + $data['name'] = $object->getName(); + $data['type'] = $object->getType(); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php index fccba504..a9fe8175 100644 --- a/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductTagPutRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,51 +16,85 @@ class ProductTagPutRequestModelNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductTagPutRequestModel(); - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getType()) { - $data->{'type'} = $object->getType(); + $data = array(); + $data['name'] = $object->getName(); + $data['type'] = $object->getType(); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php index 444d3068..48c1d833 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductUnitLanguageModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductUnitLanguageModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php index 3a14fbf6..2803ad2d 100644 --- a/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,43 +16,83 @@ class ProductUnitLanguageModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductUnitLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('symbol', $data) && $data['symbol'] !== null) { + $object->setSymbol($data['symbol']); + unset($data['symbol']); } - if (property_exists($data, 'symbol') && $data->{'symbol'} !== null) { - $object->setSymbol($data->{'symbol'}); + elseif (\array_key_exists('symbol', $data) && $data['symbol'] === null) { + $object->setSymbol(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + if ($object->isInitialized('symbol') && null !== $object->getSymbol()) { + $data['symbol'] = $object->getSymbol(); } - if (null !== $object->getSymbol()) { - $data->{'symbol'} = $object->getSymbol(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php index 6d0cc2c8..6e074508 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductUnitModelCollectionNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductUnitModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php index ca2be8d0..fb34b26f 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductUnitModelItemNormalizer implements DenormalizerInterface, Normalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductUnitModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductUnitModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductUnitModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php index 5a2f0b18..93dfa5be 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,42 +16,90 @@ class ProductUnitModelNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductUnitModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductUnitModel(); - if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { - $object->setUnitId($data->{'unitId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('unitId', $data) && $data['unitId'] !== null) { + $object->setUnitId($data['unitId']); + unset($data['unitId']); + } + elseif (\array_key_exists('unitId', $data) && $data['unitId'] === null) { + $object->setUnitId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); + unset($data['languages']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection', 'json', $context)); + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductUnitModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php index d6907eea..1588d3bb 100644 --- a/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,50 +16,98 @@ class ProductUnitModelUpdatableNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductUnitModelUpdatable(); - if (property_exists($data, 'unitId') && $data->{'unitId'} !== null) { - $object->setUnitId($data->{'unitId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('unitId', $data) && $data['unitId'] !== null) { + $object->setUnitId($data['unitId']); + unset($data['unitId']); + } + elseif (\array_key_exists('unitId', $data) && $data['unitId'] === null) { + $object->setUnitId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getLanguages()) { + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductUnitModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php index b35c9bf6..4a54e2ae 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductVariantAttributeLanguageModelNormalizer implements DenormalizerInte { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php index 92249208..6b2fc544 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantAttributeModelCollectionNormalizer implements DenormalizerIn { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php index 35a1cfff..f65fe55a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVariantAttributeModelItemNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php index 0ddcd00b..fd0fec6c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelLanguagesNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantAttributeModelLanguagesNormalizer implements DenormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelLanguages(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php index c8379968..91685752 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,45 +16,93 @@ class ProductVariantAttributeModelNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModel(); - if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { - $object->setAttributeId($data->{'attributeId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attributeId', $data) && $data['attributeId'] !== null) { + $object->setAttributeId($data['attributeId']); + unset($data['attributeId']); + } + elseif (\array_key_exists('attributeId', $data) && $data['attributeId'] === null) { + $object->setAttributeId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); + unset($data['languages']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages', 'json', $context)); + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getAttributeId()) { - $data->{'attributeId'} = $object->getAttributeId(); + $data = array(); + if ($object->isInitialized('attributeId') && null !== $object->getAttributeId()) { + $data['attributeId'] = $object->getAttributeId(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php index a177573f..471a597a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,50 +16,98 @@ class ProductVariantAttributeModelUpdatableNormalizer implements DenormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeModelUpdatable(); - if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { - $object->setAttributeId($data->{'attributeId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attributeId', $data) && $data['attributeId'] !== null) { + $object->setAttributeId($data['attributeId']); + unset($data['attributeId']); + } + elseif (\array_key_exists('attributeId', $data) && $data['attributeId'] === null) { + $object->setAttributeId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getLanguages()) { + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php index e8586369..763d206c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,73 @@ class ProductVariantAttributeValueLanguageModelNormalizer implements Denormalize { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); + $data = array(); + if ($object->isInitialized('langCode') && null !== $object->getLangCode()) { + $data['langCode'] = $object->getLangCode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php index bd6ec3cb..00f0d4ac 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantAttributeValueModelCollectionNormalizer implements Denormali { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php index 760e355b..f3983293 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVariantAttributeValueModelItemNormalizer implements DenormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php index 9d9cdbab..6f248dc5 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantAttributeValueModelLanguagesNormalizer implements Denormaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelLanguages(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php index a2df9a95..63ce912f 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,57 +16,113 @@ class ProductVariantAttributeValueModelNormalizer implements DenormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModel(); - if (property_exists($data, 'attributeValueId') && $data->{'attributeValueId'} !== null) { - $object->setAttributeValueId($data->{'attributeValueId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attributeValueId', $data) && $data['attributeValueId'] !== null) { + $object->setAttributeValueId($data['attributeValueId']); + unset($data['attributeValueId']); + } + elseif (\array_key_exists('attributeValueId', $data) && $data['attributeValueId'] === null) { + $object->setAttributeValueId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] !== null) { + $object->setSkuSuffix($data['skuSuffix']); + unset($data['skuSuffix']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] === null) { + $object->setSkuSuffix(null); } - if (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} !== null) { - $object->setSkuSuffix($data->{'skuSuffix'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages', 'json', $context)); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelLanguages', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getAttributeValueId()) { - $data->{'attributeValueId'} = $object->getAttributeValueId(); + $data = array(); + if ($object->isInitialized('attributeValueId') && null !== $object->getAttributeValueId()) { + $data['attributeValueId'] = $object->getAttributeValueId(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getSkuSuffix()) { - $data->{'skuSuffix'} = $object->getSkuSuffix(); + if ($object->isInitialized('skuSuffix') && null !== $object->getSkuSuffix()) { + $data['skuSuffix'] = $object->getSkuSuffix(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php index f9c066dd..6cbca35e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelUpdatableNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,59 +16,111 @@ class ProductVariantAttributeValueModelUpdatableNormalizer implements Denormaliz { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantAttributeValueModelUpdatable(); - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'skuSuffix') && $data->{'skuSuffix'} !== null) { - $object->setSkuSuffix($data->{'skuSuffix'}); + if (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] !== null) { + $object->setSkuSuffix($data['skuSuffix']); + unset($data['skuSuffix']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] === null) { + $object->setSkuSuffix(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getSkuSuffix()) { - $data->{'skuSuffix'} = $object->getSkuSuffix(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('skuSuffix') && null !== $object->getSkuSuffix()) { + $data['skuSuffix'] = $object->getSkuSuffix(); } - if (null !== $object->getLanguages()) { + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { $values = array(); foreach ($object->getLanguages() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'languages'} = $values; + $data['languages'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php index 3c7292b7..ba719593 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php index 9dc2664a..3e240eee 100644 --- a/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVariantModelItemNormalizer implements DenormalizerInterface, Normal { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php index 7930c7ef..1ecdb144 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,125 +16,212 @@ class ProductVariantPatchRequestModelNormalizer implements DenormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantPatchRequestModel(); - if (property_exists($data, 'sku') && $data->{'sku'} !== null) { - $object->setSku($data->{'sku'}); + if (\array_key_exists('weightInKg', $data) && \is_int($data['weightInKg'])) { + $data['weightInKg'] = (double) $data['weightInKg']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sku', $data) && $data['sku'] !== null) { + $object->setSku($data['sku']); + unset($data['sku']); + } + elseif (\array_key_exists('sku', $data) && $data['sku'] === null) { + $object->setSku(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('isActive', $data) && $data['isActive'] !== null) { + $object->setIsActive($data['isActive']); + unset($data['isActive']); + } + elseif (\array_key_exists('isActive', $data) && $data['isActive'] === null) { + $object->setIsActive(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); + } + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); } - if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { - $object->setIsActive($data->{'isActive'}); + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); } - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) { + $object->setWeightInKg($data['weightInKg']); + unset($data['weightInKg']); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) { + $object->setWeightInKg(null); } - if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { - $object->setWeightInKg($data->{'weightInKg'}); + if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) { + $object->setCostPrice($data['costPrice']); + unset($data['costPrice']); } - if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { - $object->setCostPrice($data->{'costPrice'}); + elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) { + $object->setCostPrice(null); } - if (property_exists($data, 'ean') && $data->{'ean'} !== null) { - $object->setEan($data->{'ean'}); + if (\array_key_exists('ean', $data) && $data['ean'] !== null) { + $object->setEan($data['ean']); + unset($data['ean']); } - if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { - $object->setMpn($data->{'mpn'}); + elseif (\array_key_exists('ean', $data) && $data['ean'] === null) { + $object->setEan(null); } - if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { - $object->setImageFileId($data->{'imageFileId'}); + if (\array_key_exists('mpn', $data) && $data['mpn'] !== null) { + $object->setMpn($data['mpn']); + unset($data['mpn']); } - if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { + elseif (\array_key_exists('mpn', $data) && $data['mpn'] === null) { + $object->setMpn(null); + } + if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) { + $object->setImageFileId($data['imageFileId']); + unset($data['imageFileId']); + } + elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) { + $object->setImageFileId(null); + } + if (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] !== null) { $values = array(); - foreach ($data->{'attributeValueLinks'} as $value) { + foreach ($data['attributeValueLinks'] as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); + unset($data['attributeValueLinks']); } - if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { + elseif (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] === null) { + $object->setAttributeValueLinks(null); + } + if (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] !== null) { $values_1 = array(); - foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + foreach ($data['volumePricingInheritancePricelistIds'] as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); + unset($data['volumePricingInheritancePricelistIds']); + } + elseif (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSku()) { - $data->{'sku'} = $object->getSku(); + $data = array(); + if ($object->isInitialized('sku') && null !== $object->getSku()) { + $data['sku'] = $object->getSku(); } - if (null !== $object->getExternalId()) { - $data->{'externalId'} = $object->getExternalId(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - if (null !== $object->getExternalIdType()) { - $data->{'externalIdType'} = $object->getExternalIdType(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getIsActive()) { - $data->{'isActive'} = $object->getIsActive(); + if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { + $data['isActive'] = $object->getIsActive(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); + if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) { + $data['stockStatusId'] = $object->getStockStatusId(); } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); + if ($object->isInitialized('stockQuantity') && null !== $object->getStockQuantity()) { + $data['stockQuantity'] = $object->getStockQuantity(); } - if (null !== $object->getWeightInKg()) { - $data->{'weightInKg'} = $object->getWeightInKg(); + if ($object->isInitialized('weightInKg') && null !== $object->getWeightInKg()) { + $data['weightInKg'] = $object->getWeightInKg(); } - if (null !== $object->getCostPrice()) { - $data->{'costPrice'} = $object->getCostPrice(); + if ($object->isInitialized('costPrice') && null !== $object->getCostPrice()) { + $data['costPrice'] = $object->getCostPrice(); } - if (null !== $object->getEan()) { - $data->{'ean'} = $object->getEan(); + if ($object->isInitialized('ean') && null !== $object->getEan()) { + $data['ean'] = $object->getEan(); } - if (null !== $object->getMpn()) { - $data->{'mpn'} = $object->getMpn(); + if ($object->isInitialized('mpn') && null !== $object->getMpn()) { + $data['mpn'] = $object->getMpn(); } - if (null !== $object->getImageFileId()) { - $data->{'imageFileId'} = $object->getImageFileId(); + if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) { + $data['imageFileId'] = $object->getImageFileId(); } - if (null !== $object->getAttributeValueLinks()) { + if ($object->isInitialized('attributeValueLinks') && null !== $object->getAttributeValueLinks()) { $values = array(); foreach ($object->getAttributeValueLinks() as $value) { $values[] = $value; } - $data->{'attributeValueLinks'} = $values; + $data['attributeValueLinks'] = $values; } - if (null !== $object->getVolumePricingInheritancePricelistIds()) { + if ($object->isInitialized('volumePricingInheritancePricelistIds') && null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { $values_1[] = $value_1; } - $data->{'volumePricingInheritancePricelistIds'} = $values_1; + $data['volumePricingInheritancePricelistIds'] = $values_1; + } + foreach ($object as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_2; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantPatchRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php index ebd46392..b0c6d02c 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantPriceModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php index ced2863f..04518f30 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVariantPriceModelItemNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php index ec56a0d4..16932e07 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPriceModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,55 +16,117 @@ class ProductVariantPriceModelNormalizer implements DenormalizerInterface, Norma { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantPriceModel(); - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + if (\array_key_exists('priceExVat', $data) && \is_int($data['priceExVat'])) { + $data['priceExVat'] = (double) $data['priceExVat']; + } + if (\array_key_exists('specialPriceExVat', $data) && \is_int($data['specialPriceExVat'])) { + $data['specialPriceExVat'] = (double) $data['specialPriceExVat']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); + } + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('priceExVat', $data) && $data['priceExVat'] !== null) { + $object->setPriceExVat($data['priceExVat']); + unset($data['priceExVat']); } - if (property_exists($data, 'priceExVat') && $data->{'priceExVat'} !== null) { - $object->setPriceExVat($data->{'priceExVat'}); + elseif (\array_key_exists('priceExVat', $data) && $data['priceExVat'] === null) { + $object->setPriceExVat(null); } - if (property_exists($data, 'specialPriceExVat') && $data->{'specialPriceExVat'} !== null) { - $object->setSpecialPriceExVat($data->{'specialPriceExVat'}); + if (\array_key_exists('specialPriceExVat', $data) && $data['specialPriceExVat'] !== null) { + $object->setSpecialPriceExVat($data['specialPriceExVat']); + unset($data['specialPriceExVat']); } - if (property_exists($data, 'volumePrices') && $data->{'volumePrices'} !== null) { - $object->setVolumePrices($this->denormalizer->denormalize($data->{'volumePrices'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection', 'json', $context)); + elseif (\array_key_exists('specialPriceExVat', $data) && $data['specialPriceExVat'] === null) { + $object->setSpecialPriceExVat(null); + } + if (\array_key_exists('volumePrices', $data) && $data['volumePrices'] !== null) { + $object->setVolumePrices($this->denormalizer->denormalize($data['volumePrices'], 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection', 'json', $context)); + unset($data['volumePrices']); + } + elseif (\array_key_exists('volumePrices', $data) && $data['volumePrices'] === null) { + $object->setVolumePrices(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPricelistId()) { - $data->{'pricelistId'} = $object->getPricelistId(); + $data = array(); + $data['pricelistId'] = $object->getPricelistId(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getPriceExVat()) { - $data->{'priceExVat'} = $object->getPriceExVat(); + if ($object->isInitialized('priceExVat') && null !== $object->getPriceExVat()) { + $data['priceExVat'] = $object->getPriceExVat(); } - $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat(); - if (null !== $object->getVolumePrices()) { - $data->{'volumePrices'} = $this->normalizer->normalize($object->getVolumePrices(), 'json', $context); + if ($object->isInitialized('specialPriceExVat') && null !== $object->getSpecialPriceExVat()) { + $data['specialPriceExVat'] = $object->getSpecialPriceExVat(); + } + if ($object->isInitialized('volumePrices') && null !== $object->getVolumePrices()) { + $data['volumePrices'] = $this->normalizer->normalize($object->getVolumePrices(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php index 64897647..a54dbcc1 100644 --- a/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,109 +16,208 @@ class ProductVariantPutRequestModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantPutRequestModel(); - if (property_exists($data, 'sku') && $data->{'sku'} !== null) { - $object->setSku($data->{'sku'}); + if (\array_key_exists('weightInKg', $data) && \is_int($data['weightInKg'])) { + $data['weightInKg'] = (double) $data['weightInKg']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sku', $data) && $data['sku'] !== null) { + $object->setSku($data['sku']); + unset($data['sku']); + } + elseif (\array_key_exists('sku', $data) && $data['sku'] === null) { + $object->setSku(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('isActive', $data) && $data['isActive'] !== null) { + $object->setIsActive($data['isActive']); + unset($data['isActive']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('isActive', $data) && $data['isActive'] === null) { + $object->setIsActive(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { - $object->setIsActive($data->{'isActive'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); } - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); } - if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { - $object->setWeightInKg($data->{'weightInKg'}); + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); } - if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { - $object->setCostPrice($data->{'costPrice'}); + if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) { + $object->setWeightInKg($data['weightInKg']); + unset($data['weightInKg']); } - if (property_exists($data, 'ean') && $data->{'ean'} !== null) { - $object->setEan($data->{'ean'}); + elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) { + $object->setWeightInKg(null); } - if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { - $object->setMpn($data->{'mpn'}); + if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) { + $object->setCostPrice($data['costPrice']); + unset($data['costPrice']); } - if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { - $object->setImageFileId($data->{'imageFileId'}); + elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) { + $object->setCostPrice(null); } - if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { + if (\array_key_exists('ean', $data) && $data['ean'] !== null) { + $object->setEan($data['ean']); + unset($data['ean']); + } + elseif (\array_key_exists('ean', $data) && $data['ean'] === null) { + $object->setEan(null); + } + if (\array_key_exists('mpn', $data) && $data['mpn'] !== null) { + $object->setMpn($data['mpn']); + unset($data['mpn']); + } + elseif (\array_key_exists('mpn', $data) && $data['mpn'] === null) { + $object->setMpn(null); + } + if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) { + $object->setImageFileId($data['imageFileId']); + unset($data['imageFileId']); + } + elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) { + $object->setImageFileId(null); + } + if (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] !== null) { $values = array(); - foreach ($data->{'attributeValueLinks'} as $value) { + foreach ($data['attributeValueLinks'] as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); + unset($data['attributeValueLinks']); + } + elseif (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] === null) { + $object->setAttributeValueLinks(null); } - if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { + if (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] !== null) { $values_1 = array(); - foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + foreach ($data['volumePricingInheritancePricelistIds'] as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); + unset($data['volumePricingInheritancePricelistIds']); + } + elseif (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSku()) { - $data->{'sku'} = $object->getSku(); - } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); - if (null !== $object->getAttributeValueLinks()) { - $values = array(); - foreach ($object->getAttributeValueLinks() as $value) { - $values[] = $value; - } - $data->{'attributeValueLinks'} = $values; + $data = array(); + $data['sku'] = $object->getSku(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { + $data['isActive'] = $object->getIsActive(); + } + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) { + $data['stockStatusId'] = $object->getStockStatusId(); + } + if ($object->isInitialized('stockQuantity') && null !== $object->getStockQuantity()) { + $data['stockQuantity'] = $object->getStockQuantity(); } - else { - $data->{'attributeValueLinks'} = null; + if ($object->isInitialized('weightInKg') && null !== $object->getWeightInKg()) { + $data['weightInKg'] = $object->getWeightInKg(); } - if (null !== $object->getVolumePricingInheritancePricelistIds()) { + if ($object->isInitialized('costPrice') && null !== $object->getCostPrice()) { + $data['costPrice'] = $object->getCostPrice(); + } + if ($object->isInitialized('ean') && null !== $object->getEan()) { + $data['ean'] = $object->getEan(); + } + if ($object->isInitialized('mpn') && null !== $object->getMpn()) { + $data['mpn'] = $object->getMpn(); + } + if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) { + $data['imageFileId'] = $object->getImageFileId(); + } + $values = array(); + foreach ($object->getAttributeValueLinks() as $value) { + $values[] = $value; + } + $data['attributeValueLinks'] = $values; + if ($object->isInitialized('volumePricingInheritancePricelistIds') && null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { $values_1[] = $value_1; } - $data->{'volumePricingInheritancePricelistIds'} = $values_1; + $data['volumePricingInheritancePricelistIds'] = $values_1; } - else { - $data->{'volumePricingInheritancePricelistIds'} = null; + foreach ($object as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_2; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantPutRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php index aec3032e..832d4509 100644 --- a/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,106 +16,208 @@ class ProductVariantRequestModelNormalizer implements DenormalizerInterface, Nor { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantRequestModel(); - if (property_exists($data, 'sku') && $data->{'sku'} !== null) { - $object->setSku($data->{'sku'}); + if (\array_key_exists('weightInKg', $data) && \is_int($data['weightInKg'])) { + $data['weightInKg'] = (double) $data['weightInKg']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sku', $data) && $data['sku'] !== null) { + $object->setSku($data['sku']); + unset($data['sku']); + } + elseif (\array_key_exists('sku', $data) && $data['sku'] === null) { + $object->setSku(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('isActive', $data) && $data['isActive'] !== null) { + $object->setIsActive($data['isActive']); + unset($data['isActive']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('isActive', $data) && $data['isActive'] === null) { + $object->setIsActive(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { - $object->setIsActive($data->{'isActive'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); } - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); } - if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { - $object->setWeightInKg($data->{'weightInKg'}); + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); } - if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { - $object->setCostPrice($data->{'costPrice'}); + if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) { + $object->setWeightInKg($data['weightInKg']); + unset($data['weightInKg']); } - if (property_exists($data, 'ean') && $data->{'ean'} !== null) { - $object->setEan($data->{'ean'}); + elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) { + $object->setWeightInKg(null); } - if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { - $object->setMpn($data->{'mpn'}); + if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) { + $object->setCostPrice($data['costPrice']); + unset($data['costPrice']); } - if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { - $object->setImageFileId($data->{'imageFileId'}); + elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) { + $object->setCostPrice(null); } - if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { + if (\array_key_exists('ean', $data) && $data['ean'] !== null) { + $object->setEan($data['ean']); + unset($data['ean']); + } + elseif (\array_key_exists('ean', $data) && $data['ean'] === null) { + $object->setEan(null); + } + if (\array_key_exists('mpn', $data) && $data['mpn'] !== null) { + $object->setMpn($data['mpn']); + unset($data['mpn']); + } + elseif (\array_key_exists('mpn', $data) && $data['mpn'] === null) { + $object->setMpn(null); + } + if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) { + $object->setImageFileId($data['imageFileId']); + unset($data['imageFileId']); + } + elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) { + $object->setImageFileId(null); + } + if (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] !== null) { $values = array(); - foreach ($data->{'attributeValueLinks'} as $value) { + foreach ($data['attributeValueLinks'] as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); + unset($data['attributeValueLinks']); + } + elseif (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] === null) { + $object->setAttributeValueLinks(null); } - if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { + if (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] !== null) { $values_1 = array(); - foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + foreach ($data['volumePricingInheritancePricelistIds'] as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); + unset($data['volumePricingInheritancePricelistIds']); + } + elseif (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] === null) { + $object->setVolumePricingInheritancePricelistIds(null); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSku()) { - $data->{'sku'} = $object->getSku(); - } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); - if (null !== $object->getAttributeValueLinks()) { - $values = array(); - foreach ($object->getAttributeValueLinks() as $value) { - $values[] = $value; - } - $data->{'attributeValueLinks'} = $values; + $data = array(); + $data['sku'] = $object->getSku(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { + $data['isActive'] = $object->getIsActive(); + } + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) { + $data['stockStatusId'] = $object->getStockStatusId(); + } + if ($object->isInitialized('stockQuantity') && null !== $object->getStockQuantity()) { + $data['stockQuantity'] = $object->getStockQuantity(); } - if (null !== $object->getVolumePricingInheritancePricelistIds()) { + if ($object->isInitialized('weightInKg') && null !== $object->getWeightInKg()) { + $data['weightInKg'] = $object->getWeightInKg(); + } + if ($object->isInitialized('costPrice') && null !== $object->getCostPrice()) { + $data['costPrice'] = $object->getCostPrice(); + } + if ($object->isInitialized('ean') && null !== $object->getEan()) { + $data['ean'] = $object->getEan(); + } + if ($object->isInitialized('mpn') && null !== $object->getMpn()) { + $data['mpn'] = $object->getMpn(); + } + if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) { + $data['imageFileId'] = $object->getImageFileId(); + } + $values = array(); + foreach ($object->getAttributeValueLinks() as $value) { + $values[] = $value; + } + $data['attributeValueLinks'] = $values; + if ($object->isInitialized('volumePricingInheritancePricelistIds') && null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { $values_1[] = $value_1; } - $data->{'volumePricingInheritancePricelistIds'} = $values_1; + $data['volumePricingInheritancePricelistIds'] = $values_1; } - else { - $data->{'volumePricingInheritancePricelistIds'} = null; + foreach ($object as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_2; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php index 60c45479..4b6971ed 100644 --- a/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,137 +16,251 @@ class ProductVariantResponseModelNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantResponseModel(); - if (property_exists($data, 'sku') && $data->{'sku'} !== null) { - $object->setSku($data->{'sku'}); + if (\array_key_exists('weightInKg', $data) && \is_int($data['weightInKg'])) { + $data['weightInKg'] = (double) $data['weightInKg']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('sku', $data) && $data['sku'] !== null) { + $object->setSku($data['sku']); + unset($data['sku']); + } + elseif (\array_key_exists('sku', $data) && $data['sku'] === null) { + $object->setSku(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('isActive', $data) && $data['isActive'] !== null) { + $object->setIsActive($data['isActive']); + unset($data['isActive']); + } + elseif (\array_key_exists('isActive', $data) && $data['isActive'] === null) { + $object->setIsActive(null); + } + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); } - if (property_exists($data, 'isActive') && $data->{'isActive'} !== null) { - $object->setIsActive($data->{'isActive'}); + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); } - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) { + $object->setWeightInKg($data['weightInKg']); + unset($data['weightInKg']); } - if (property_exists($data, 'weightInKg') && $data->{'weightInKg'} !== null) { - $object->setWeightInKg($data->{'weightInKg'}); + elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) { + $object->setWeightInKg(null); } - if (property_exists($data, 'costPrice') && $data->{'costPrice'} !== null) { - $object->setCostPrice($data->{'costPrice'}); + if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) { + $object->setCostPrice($data['costPrice']); + unset($data['costPrice']); } - if (property_exists($data, 'ean') && $data->{'ean'} !== null) { - $object->setEan($data->{'ean'}); + elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) { + $object->setCostPrice(null); } - if (property_exists($data, 'mpn') && $data->{'mpn'} !== null) { - $object->setMpn($data->{'mpn'}); + if (\array_key_exists('ean', $data) && $data['ean'] !== null) { + $object->setEan($data['ean']); + unset($data['ean']); } - if (property_exists($data, 'imageFileId') && $data->{'imageFileId'} !== null) { - $object->setImageFileId($data->{'imageFileId'}); + elseif (\array_key_exists('ean', $data) && $data['ean'] === null) { + $object->setEan(null); } - if (property_exists($data, 'attributeValueLinks') && $data->{'attributeValueLinks'} !== null) { + if (\array_key_exists('mpn', $data) && $data['mpn'] !== null) { + $object->setMpn($data['mpn']); + unset($data['mpn']); + } + elseif (\array_key_exists('mpn', $data) && $data['mpn'] === null) { + $object->setMpn(null); + } + if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) { + $object->setImageFileId($data['imageFileId']); + unset($data['imageFileId']); + } + elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) { + $object->setImageFileId(null); + } + if (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] !== null) { $values = array(); - foreach ($data->{'attributeValueLinks'} as $value) { + foreach ($data['attributeValueLinks'] as $value) { $values[] = $value; } $object->setAttributeValueLinks($values); + unset($data['attributeValueLinks']); + } + elseif (\array_key_exists('attributeValueLinks', $data) && $data['attributeValueLinks'] === null) { + $object->setAttributeValueLinks(null); } - if (property_exists($data, 'volumePricingInheritancePricelistIds') && $data->{'volumePricingInheritancePricelistIds'} !== null) { + if (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] !== null) { $values_1 = array(); - foreach ($data->{'volumePricingInheritancePricelistIds'} as $value_1) { + foreach ($data['volumePricingInheritancePricelistIds'] as $value_1) { $values_1[] = $value_1; } $object->setVolumePricingInheritancePricelistIds($values_1); + unset($data['volumePricingInheritancePricelistIds']); } - if (property_exists($data, 'variantId') && $data->{'variantId'} !== null) { - $object->setVariantId($data->{'variantId'}); + elseif (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] === null) { + $object->setVolumePricingInheritancePricelistIds(null); } - if (property_exists($data, 'prices') && $data->{'prices'} !== null) { + if (\array_key_exists('variantId', $data) && $data['variantId'] !== null) { + $object->setVariantId($data['variantId']); + unset($data['variantId']); + } + elseif (\array_key_exists('variantId', $data) && $data['variantId'] === null) { + $object->setVariantId(null); + } + if (\array_key_exists('prices', $data) && $data['prices'] !== null) { $values_2 = array(); - foreach ($data->{'prices'} as $value_2) { + foreach ($data['prices'] as $value_2) { $values_2[] = $this->denormalizer->denormalize($value_2, 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel', 'json', $context); } $object->setPrices($values_2); + unset($data['prices']); + } + elseif (\array_key_exists('prices', $data) && $data['prices'] === null) { + $object->setPrices(null); } - if (property_exists($data, 'attributeValues') && $data->{'attributeValues'} !== null) { + if (\array_key_exists('attributeValues', $data) && $data['attributeValues'] !== null) { $values_3 = array(); - foreach ($data->{'attributeValues'} as $value_3) { + foreach ($data['attributeValues'] as $value_3) { $values_3[] = $this->denormalizer->denormalize($value_3, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel', 'json', $context); } $object->setAttributeValues($values_3); + unset($data['attributeValues']); + } + elseif (\array_key_exists('attributeValues', $data) && $data['attributeValues'] === null) { + $object->setAttributeValues(null); + } + foreach ($data as $key => $value_4) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_4; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getSku()) { - $data->{'sku'} = $object->getSku(); - } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - $data->{'isActive'} = $object->getIsActive(); - $data->{'sortIndex'} = $object->getSortIndex(); - $data->{'stockStatusId'} = $object->getStockStatusId(); - $data->{'stockQuantity'} = $object->getStockQuantity(); - $data->{'weightInKg'} = $object->getWeightInKg(); - $data->{'costPrice'} = $object->getCostPrice(); - $data->{'ean'} = $object->getEan(); - $data->{'mpn'} = $object->getMpn(); - $data->{'imageFileId'} = $object->getImageFileId(); - if (null !== $object->getAttributeValueLinks()) { - $values = array(); - foreach ($object->getAttributeValueLinks() as $value) { - $values[] = $value; - } - $data->{'attributeValueLinks'} = $values; + $data = array(); + $data['sku'] = $object->getSku(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { + $data['isActive'] = $object->getIsActive(); + } + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); + } + if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) { + $data['stockStatusId'] = $object->getStockStatusId(); + } + if ($object->isInitialized('stockQuantity') && null !== $object->getStockQuantity()) { + $data['stockQuantity'] = $object->getStockQuantity(); + } + if ($object->isInitialized('weightInKg') && null !== $object->getWeightInKg()) { + $data['weightInKg'] = $object->getWeightInKg(); } - if (null !== $object->getVolumePricingInheritancePricelistIds()) { + if ($object->isInitialized('costPrice') && null !== $object->getCostPrice()) { + $data['costPrice'] = $object->getCostPrice(); + } + if ($object->isInitialized('ean') && null !== $object->getEan()) { + $data['ean'] = $object->getEan(); + } + if ($object->isInitialized('mpn') && null !== $object->getMpn()) { + $data['mpn'] = $object->getMpn(); + } + if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) { + $data['imageFileId'] = $object->getImageFileId(); + } + $values = array(); + foreach ($object->getAttributeValueLinks() as $value) { + $values[] = $value; + } + $data['attributeValueLinks'] = $values; + if ($object->isInitialized('volumePricingInheritancePricelistIds') && null !== $object->getVolumePricingInheritancePricelistIds()) { $values_1 = array(); foreach ($object->getVolumePricingInheritancePricelistIds() as $value_1) { $values_1[] = $value_1; } - $data->{'volumePricingInheritancePricelistIds'} = $values_1; + $data['volumePricingInheritancePricelistIds'] = $values_1; } - else { - $data->{'volumePricingInheritancePricelistIds'} = null; - } - if (null !== $object->getPrices()) { + if ($object->isInitialized('prices') && null !== $object->getPrices()) { $values_2 = array(); foreach ($object->getPrices() as $value_2) { $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - $data->{'prices'} = $values_2; + $data['prices'] = $values_2; } - if (null !== $object->getAttributeValues()) { + if ($object->isInitialized('attributeValues') && null !== $object->getAttributeValues()) { $values_3 = array(); foreach ($object->getAttributeValues() as $value_3) { $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - $data->{'attributeValues'} = $values_3; + $data['attributeValues'] = $values_3; + } + foreach ($object as $key => $value_4) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_4; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantResponseModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php index 62d62c1a..49ec663d 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantStockModelCollectionNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php index 60cb5eca..e684807a 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVariantStockModelItemNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php index ebf02c88..1b221a59 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,76 @@ class ProductVariantStockPatchRequestModelNormalizer implements DenormalizerInte { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPatchRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPatchRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockPatchRequestModel(); - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + if (\array_key_exists('stockQuantity', $data) && \is_int($data['stockQuantity'])) { + $data['stockQuantity'] = (double) $data['stockQuantity']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); + } + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); + } + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); + $data = array(); + if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) { + $data['stockStatusId'] = $object->getStockStatusId(); + } + if ($object->isInitialized('stockQuantity') && null !== $object->getStockQuantity()) { + $data['stockQuantity'] = $object->getStockQuantity(); } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantStockPatchRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php index 0871db78..785af4c8 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockPutRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,72 @@ class ProductVariantStockPutRequestModelNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockPutRequestModel(); - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + if (\array_key_exists('stockQuantity', $data) && \is_int($data['stockQuantity'])) { + $data['stockQuantity'] = (double) $data['stockQuantity']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); + } + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); + } + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); - } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); + $data = array(); + $data['stockStatusId'] = $object->getStockStatusId(); + $data['stockQuantity'] = $object->getStockQuantity(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php index a5911ec7..8c112c81 100644 --- a/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantStockResponseModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,40 +16,83 @@ class ProductVariantStockResponseModelNormalizer implements DenormalizerInterfac { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantStockResponseModel(); - if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { - $object->setStockLocationId($data->{'stockLocationId'}); + if (\array_key_exists('stockQuantity', $data) && \is_int($data['stockQuantity'])) { + $data['stockQuantity'] = (double) $data['stockQuantity']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] !== null) { + $object->setStockLocationId($data['stockLocationId']); + unset($data['stockLocationId']); + } + elseif (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] === null) { + $object->setStockLocationId(null); + } + if (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] !== null) { + $object->setStockStatusId($data['stockStatusId']); + unset($data['stockStatusId']); } - if (property_exists($data, 'stockStatusId') && $data->{'stockStatusId'} !== null) { - $object->setStockStatusId($data->{'stockStatusId'}); + elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) { + $object->setStockStatusId(null); } - if (property_exists($data, 'stockQuantity') && $data->{'stockQuantity'} !== null) { - $object->setStockQuantity($data->{'stockQuantity'}); + if (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] !== null) { + $object->setStockQuantity($data['stockQuantity']); + unset($data['stockQuantity']); + } + elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) { + $object->setStockQuantity(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getStockStatusId()) { - $data->{'stockStatusId'} = $object->getStockStatusId(); + $data = array(); + if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) { + $data['stockStatusId'] = $object->getStockStatusId(); + } + if ($object->isInitialized('stockQuantity') && null !== $object->getStockQuantity()) { + $data['stockQuantity'] = $object->getStockQuantity(); } - if (null !== $object->getStockQuantity()) { - $data->{'stockQuantity'} = $object->getStockQuantity(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php index a62b1ca2..3f1ffb14 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVariantVolumePriceModelCollectionNormalizer implements Denormalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php index 6c0ff7aa..8a2c625e 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVariantVolumePriceModelItemNormalizer implements DenormalizerInterf { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php index d0c24ce3..1c2eb4cf 100644 --- a/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVariantVolumePriceModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,51 +16,107 @@ class ProductVariantVolumePriceModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVariantVolumePriceModel(); - if (property_exists($data, 'pricelistId') && $data->{'pricelistId'} !== null) { - $object->setPricelistId($data->{'pricelistId'}); + if (\array_key_exists('priceExVat', $data) && \is_int($data['priceExVat'])) { + $data['priceExVat'] = (double) $data['priceExVat']; + } + if (\array_key_exists('quantity', $data) && \is_int($data['quantity'])) { + $data['quantity'] = (double) $data['quantity']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('pricelistId', $data) && $data['pricelistId'] !== null) { + $object->setPricelistId($data['pricelistId']); + unset($data['pricelistId']); + } + elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) { + $object->setPricelistId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); } - if (property_exists($data, 'priceExVat') && $data->{'priceExVat'} !== null) { - $object->setPriceExVat($data->{'priceExVat'}); + if (\array_key_exists('priceExVat', $data) && $data['priceExVat'] !== null) { + $object->setPriceExVat($data['priceExVat']); + unset($data['priceExVat']); } - if (property_exists($data, 'quantity') && $data->{'quantity'} !== null) { - $object->setQuantity($data->{'quantity'}); + elseif (\array_key_exists('priceExVat', $data) && $data['priceExVat'] === null) { + $object->setPriceExVat(null); + } + if (\array_key_exists('quantity', $data) && $data['quantity'] !== null) { + $object->setQuantity($data['quantity']); + unset($data['quantity']); + } + elseif (\array_key_exists('quantity', $data) && $data['quantity'] === null) { + $object->setQuantity(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getPricelistId()) { - $data->{'pricelistId'} = $object->getPricelistId(); + $data = array(); + if ($object->isInitialized('pricelistId') && null !== $object->getPricelistId()) { + $data['pricelistId'] = $object->getPricelistId(); + } + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getPriceExVat()) { - $data->{'priceExVat'} = $object->getPriceExVat(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getQuantity()) { - $data->{'quantity'} = $object->getQuantity(); + if ($object->isInitialized('priceExVat') && null !== $object->getPriceExVat()) { + $data['priceExVat'] = $object->getPriceExVat(); + } + $data['quantity'] = $object->getQuantity(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php index 1fa7f7e1..a92f1a19 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ProductVatRateModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVatRateModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php index ae6d3bb1..f64ac5ca 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductVatRateModelItemNormalizer implements DenormalizerInterface, Normal { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVatRateModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php index 35544ffe..2b15b8aa 100644 --- a/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductVatRateModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,76 @@ class ProductVatRateModelNormalizer implements DenormalizerInterface, Normalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductVatRateModel(); - if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { - $object->setCountryCode($data->{'countryCode'}); + if (\array_key_exists('vatRate', $data) && \is_int($data['vatRate'])) { + $data['vatRate'] = (double) $data['vatRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('countryCode', $data) && $data['countryCode'] !== null) { + $object->setCountryCode($data['countryCode']); + unset($data['countryCode']); + } + elseif (\array_key_exists('countryCode', $data) && $data['countryCode'] === null) { + $object->setCountryCode(null); + } + if (\array_key_exists('vatRate', $data) && $data['vatRate'] !== null) { + $object->setVatRate($data['vatRate']); + unset($data['vatRate']); } - if (property_exists($data, 'vatRate') && $data->{'vatRate'} !== null) { - $object->setVatRate($data->{'vatRate'}); + elseif (\array_key_exists('vatRate', $data) && $data['vatRate'] === null) { + $object->setVatRate(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCountryCode()) { - $data->{'countryCode'} = $object->getCountryCode(); + $data = array(); + if ($object->isInitialized('countryCode') && null !== $object->getCountryCode()) { + $data['countryCode'] = $object->getCountryCode(); + } + if ($object->isInitialized('vatRate') && null !== $object->getVatRate()) { + $data['vatRate'] = $object->getVatRate(); } - if (null !== $object->getVatRate()) { - $data->{'vatRate'} = $object->getVatRate(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductVatRateModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php index d8fc60db..4ecf015f 100644 --- a/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ProductsAttributesModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ProductsAttributesModelItemNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ProductsAttributesModelItem(); - if (property_exists($data, 'attributeId') && $data->{'attributeId'} !== null) { - $object->setAttributeId($data->{'attributeId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('attributeId', $data) && $data['attributeId'] !== null) { + $object->setAttributeId($data['attributeId']); + unset($data['attributeId']); + } + elseif (\array_key_exists('attributeId', $data) && $data['attributeId'] === null) { + $object->setAttributeId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getAttributeId()) { - $data->{'attributeId'} = $object->getAttributeId(); + $data = array(); + if ($object->isInitialized('attributeId') && null !== $object->getAttributeId()) { + $data['attributeId'] = $object->getAttributeId(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php index 2306facc..08e4cce4 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ShippingMethodLanguageModelCollectionNormalizer implements DenormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingMethodLanguageModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php index 46c3d483..f33f92ed 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodLanguageModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,81 @@ class ShippingMethodLanguageModelNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingMethodLanguageModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('title', $data) && $data['title'] !== null) { + $object->setTitle($data['title']); + unset($data['title']); } - if (property_exists($data, 'title') && $data->{'title'} !== null) { - $object->setTitle($data->{'title'}); + elseif (\array_key_exists('title', $data) && $data['title'] === null) { + $object->setTitle(null); } - if (property_exists($data, 'shortDescription') && $data->{'shortDescription'} !== null) { - $object->setShortDescription($data->{'shortDescription'}); + if (\array_key_exists('shortDescription', $data) && $data['shortDescription'] !== null) { + $object->setShortDescription($data['shortDescription']); + unset($data['shortDescription']); + } + elseif (\array_key_exists('shortDescription', $data) && $data['shortDescription'] === null) { + $object->setShortDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php index 9d381968..def32db7 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ShippingMethodModelCollectionNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingMethodModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php index 37e0bf6d..14bb736b 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ShippingMethodModelItemNormalizer implements DenormalizerInterface, Normal { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingMethodModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php index 099af4d2..b6e1b409 100644 --- a/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingMethodModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,74 +16,176 @@ class ShippingMethodModelNormalizer implements DenormalizerInterface, Normalizer { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingMethodModel(); - if (property_exists($data, 'shippingMethodId') && $data->{'shippingMethodId'} !== null) { - $object->setShippingMethodId($data->{'shippingMethodId'}); + if (\array_key_exists('validForMinItemsSubtotal', $data) && \is_int($data['validForMinItemsSubtotal'])) { + $data['validForMinItemsSubtotal'] = (double) $data['validForMinItemsSubtotal']; + } + if (\array_key_exists('validForMaxItemsSubtotal', $data) && \is_int($data['validForMaxItemsSubtotal'])) { + $data['validForMaxItemsSubtotal'] = (double) $data['validForMaxItemsSubtotal']; + } + if (\array_key_exists('validForMinWeight', $data) && \is_int($data['validForMinWeight'])) { + $data['validForMinWeight'] = (double) $data['validForMinWeight']; + } + if (\array_key_exists('validForMaxWeight', $data) && \is_int($data['validForMaxWeight'])) { + $data['validForMaxWeight'] = (double) $data['validForMaxWeight']; + } + if (\array_key_exists('freeShippingMinItemsSubtotal', $data) && \is_int($data['freeShippingMinItemsSubtotal'])) { + $data['freeShippingMinItemsSubtotal'] = (double) $data['freeShippingMinItemsSubtotal']; + } + if (\array_key_exists('freeShippingMinWeight', $data) && \is_int($data['freeShippingMinWeight'])) { + $data['freeShippingMinWeight'] = (double) $data['freeShippingMinWeight']; + } + if (null === $data || false === \is_array($data)) { + return $object; } - if (property_exists($data, 'active') && $data->{'active'} !== null) { - $object->setActive($data->{'active'}); + if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) { + $object->setShippingMethodId($data['shippingMethodId']); + unset($data['shippingMethodId']); } - if (property_exists($data, 'validForCountries') && $data->{'validForCountries'} !== null) { - $object->setValidForCountries($data->{'validForCountries'}); + elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) { + $object->setShippingMethodId(null); } - if (property_exists($data, 'validCountriesSelected') && $data->{'validCountriesSelected'} !== null) { + if (\array_key_exists('active', $data) && $data['active'] !== null) { + $object->setActive($data['active']); + unset($data['active']); + } + elseif (\array_key_exists('active', $data) && $data['active'] === null) { + $object->setActive(null); + } + if (\array_key_exists('validForCountries', $data) && $data['validForCountries'] !== null) { + $object->setValidForCountries($data['validForCountries']); + unset($data['validForCountries']); + } + elseif (\array_key_exists('validForCountries', $data) && $data['validForCountries'] === null) { + $object->setValidForCountries(null); + } + if (\array_key_exists('validCountriesSelected', $data) && $data['validCountriesSelected'] !== null) { $values = array(); - foreach ($data->{'validCountriesSelected'} as $value) { + foreach ($data['validCountriesSelected'] as $value) { $values[] = $value; } $object->setValidCountriesSelected($values); + unset($data['validCountriesSelected']); + } + elseif (\array_key_exists('validCountriesSelected', $data) && $data['validCountriesSelected'] === null) { + $object->setValidCountriesSelected(null); + } + if (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] !== null) { + $object->setValidForMinItemsSubtotal($data['validForMinItemsSubtotal']); + unset($data['validForMinItemsSubtotal']); + } + elseif (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] === null) { + $object->setValidForMinItemsSubtotal(null); } - if (property_exists($data, 'validForMinItemsSubtotal') && $data->{'validForMinItemsSubtotal'} !== null) { - $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'}); + if (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] !== null) { + $object->setValidForMaxItemsSubtotal($data['validForMaxItemsSubtotal']); + unset($data['validForMaxItemsSubtotal']); } - if (property_exists($data, 'validForMaxItemsSubtotal') && $data->{'validForMaxItemsSubtotal'} !== null) { - $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'}); + elseif (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] === null) { + $object->setValidForMaxItemsSubtotal(null); } - if (property_exists($data, 'validForMinWeight') && $data->{'validForMinWeight'} !== null) { - $object->setValidForMinWeight($data->{'validForMinWeight'}); + if (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] !== null) { + $object->setValidForMinWeight($data['validForMinWeight']); + unset($data['validForMinWeight']); } - if (property_exists($data, 'validForMaxWeight') && $data->{'validForMaxWeight'} !== null) { - $object->setValidForMaxWeight($data->{'validForMaxWeight'}); + elseif (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] === null) { + $object->setValidForMinWeight(null); } - if (property_exists($data, 'validForCustomerType') && $data->{'validForCustomerType'} !== null) { - $object->setValidForCustomerType($data->{'validForCustomerType'}); + if (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] !== null) { + $object->setValidForMaxWeight($data['validForMaxWeight']); + unset($data['validForMaxWeight']); } - if (property_exists($data, 'freeShippingMinItemsSubtotal') && $data->{'freeShippingMinItemsSubtotal'} !== null) { - $object->setFreeShippingMinItemsSubtotal($data->{'freeShippingMinItemsSubtotal'}); + elseif (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] === null) { + $object->setValidForMaxWeight(null); } - if (property_exists($data, 'freeShippingMinWeight') && $data->{'freeShippingMinWeight'} !== null) { - $object->setFreeShippingMinWeight($data->{'freeShippingMinWeight'}); + if (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] !== null) { + $object->setValidForCustomerType($data['validForCustomerType']); + unset($data['validForCustomerType']); } - if (property_exists($data, 'isClickAndCollect') && $data->{'isClickAndCollect'} !== null) { - $object->setIsClickAndCollect($data->{'isClickAndCollect'}); + elseif (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] === null) { + $object->setValidForCustomerType(null); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (\array_key_exists('freeShippingMinItemsSubtotal', $data) && $data['freeShippingMinItemsSubtotal'] !== null) { + $object->setFreeShippingMinItemsSubtotal($data['freeShippingMinItemsSubtotal']); + unset($data['freeShippingMinItemsSubtotal']); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection', 'json', $context)); + elseif (\array_key_exists('freeShippingMinItemsSubtotal', $data) && $data['freeShippingMinItemsSubtotal'] === null) { + $object->setFreeShippingMinItemsSubtotal(null); + } + if (\array_key_exists('freeShippingMinWeight', $data) && $data['freeShippingMinWeight'] !== null) { + $object->setFreeShippingMinWeight($data['freeShippingMinWeight']); + unset($data['freeShippingMinWeight']); + } + elseif (\array_key_exists('freeShippingMinWeight', $data) && $data['freeShippingMinWeight'] === null) { + $object->setFreeShippingMinWeight(null); + } + if (\array_key_exists('isClickAndCollect', $data) && $data['isClickAndCollect'] !== null) { + $object->setIsClickAndCollect($data['isClickAndCollect']); + unset($data['isClickAndCollect']); + } + elseif (\array_key_exists('isClickAndCollect', $data) && $data['isClickAndCollect'] === null) { + $object->setIsClickAndCollect(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + $data = array(); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingMethodModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php index 900124e1..84d29b6e 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class ShippingTrackingTypeModelCollectionNormalizer implements DenormalizerInter { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingTrackingTypeModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php index 253c032f..c763de77 100644 --- a/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShippingTrackingTypeModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,67 @@ class ShippingTrackingTypeModelNormalizer implements DenormalizerInterface, Norm { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShippingTrackingTypeModel(); - if (property_exists($data, 'type') && $data->{'type'} !== null) { - $object->setType($data->{'type'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + unset($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopItemNormalizer.php b/src/Api/Generated/Normalizer/ShopItemNormalizer.php index e14f69af..b8799280 100644 --- a/src/Api/Generated/Normalizer/ShopItemNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class ShopItemNormalizer implements DenormalizerInterface, NormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShopItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShopItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ShopModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\ShopModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShopItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/ShopModelNormalizer.php b/src/Api/Generated/Normalizer/ShopModelNormalizer.php index 78f03e64..c14dd28b 100644 --- a/src/Api/Generated/Normalizer/ShopModelNormalizer.php +++ b/src/Api/Generated/Normalizer/ShopModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,77 +16,172 @@ class ShopModelNormalizer implements DenormalizerInterface, NormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\ShopModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\ShopModel(); - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + if (\array_key_exists('generalDefaultVatRate', $data) && \is_int($data['generalDefaultVatRate'])) { + $data['generalDefaultVatRate'] = (double) $data['generalDefaultVatRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('idCode', $data) && $data['idCode'] !== null) { + $object->setIdCode($data['idCode']); + unset($data['idCode']); + } + elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) { + $object->setIdCode(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + unset($data['status']); } - if (property_exists($data, 'idCode') && $data->{'idCode'} !== null) { - $object->setIdCode($data->{'idCode'}); + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); } - if (property_exists($data, 'status') && $data->{'status'} !== null) { - $object->setStatus($data->{'status'}); + if (\array_key_exists('defaultLangCode', $data) && $data['defaultLangCode'] !== null) { + $object->setDefaultLangCode($data['defaultLangCode']); + unset($data['defaultLangCode']); } - if (property_exists($data, 'defaultLangCode') && $data->{'defaultLangCode'} !== null) { - $object->setDefaultLangCode($data->{'defaultLangCode'}); + elseif (\array_key_exists('defaultLangCode', $data) && $data['defaultLangCode'] === null) { + $object->setDefaultLangCode(null); } - if (property_exists($data, 'activeLangCodes') && $data->{'activeLangCodes'} !== null) { + if (\array_key_exists('activeLangCodes', $data) && $data['activeLangCodes'] !== null) { $values = array(); - foreach ($data->{'activeLangCodes'} as $value) { + foreach ($data['activeLangCodes'] as $value) { $values[] = $value; } $object->setActiveLangCodes($values); + unset($data['activeLangCodes']); + } + elseif (\array_key_exists('activeLangCodes', $data) && $data['activeLangCodes'] === null) { + $object->setActiveLangCodes(null); + } + if (\array_key_exists('baseCurrency', $data) && $data['baseCurrency'] !== null) { + $object->setBaseCurrency($data['baseCurrency']); + unset($data['baseCurrency']); + } + elseif (\array_key_exists('baseCurrency', $data) && $data['baseCurrency'] === null) { + $object->setBaseCurrency(null); + } + if (\array_key_exists('defaultCustomerCountryCode', $data) && $data['defaultCustomerCountryCode'] !== null) { + $object->setDefaultCustomerCountryCode($data['defaultCustomerCountryCode']); + unset($data['defaultCustomerCountryCode']); + } + elseif (\array_key_exists('defaultCustomerCountryCode', $data) && $data['defaultCustomerCountryCode'] === null) { + $object->setDefaultCustomerCountryCode(null); + } + if (\array_key_exists('generalDefaultVatRate', $data) && $data['generalDefaultVatRate'] !== null) { + $object->setGeneralDefaultVatRate($data['generalDefaultVatRate']); + unset($data['generalDefaultVatRate']); } - if (property_exists($data, 'baseCurrency') && $data->{'baseCurrency'} !== null) { - $object->setBaseCurrency($data->{'baseCurrency'}); + elseif (\array_key_exists('generalDefaultVatRate', $data) && $data['generalDefaultVatRate'] === null) { + $object->setGeneralDefaultVatRate(null); } - if (property_exists($data, 'defaultCustomerCountryCode') && $data->{'defaultCustomerCountryCode'} !== null) { - $object->setDefaultCustomerCountryCode($data->{'defaultCustomerCountryCode'}); + if (\array_key_exists('shopCompanyName', $data) && $data['shopCompanyName'] !== null) { + $object->setShopCompanyName($data['shopCompanyName']); + unset($data['shopCompanyName']); } - if (property_exists($data, 'generalDefaultVatRate') && $data->{'generalDefaultVatRate'} !== null) { - $object->setGeneralDefaultVatRate($data->{'generalDefaultVatRate'}); + elseif (\array_key_exists('shopCompanyName', $data) && $data['shopCompanyName'] === null) { + $object->setShopCompanyName(null); } - if (property_exists($data, 'shopCompanyName') && $data->{'shopCompanyName'} !== null) { - $object->setShopCompanyName($data->{'shopCompanyName'}); + if (\array_key_exists('shopAddress', $data) && $data['shopAddress'] !== null) { + $object->setShopAddress($data['shopAddress']); + unset($data['shopAddress']); } - if (property_exists($data, 'shopAddress') && $data->{'shopAddress'} !== null) { - $object->setShopAddress($data->{'shopAddress'}); + elseif (\array_key_exists('shopAddress', $data) && $data['shopAddress'] === null) { + $object->setShopAddress(null); } - if (property_exists($data, 'shopPostalCode') && $data->{'shopPostalCode'} !== null) { - $object->setShopPostalCode($data->{'shopPostalCode'}); + if (\array_key_exists('shopPostalCode', $data) && $data['shopPostalCode'] !== null) { + $object->setShopPostalCode($data['shopPostalCode']); + unset($data['shopPostalCode']); } - if (property_exists($data, 'shopCity') && $data->{'shopCity'} !== null) { - $object->setShopCity($data->{'shopCity'}); + elseif (\array_key_exists('shopPostalCode', $data) && $data['shopPostalCode'] === null) { + $object->setShopPostalCode(null); } - if (property_exists($data, 'shopOrgNo') && $data->{'shopOrgNo'} !== null) { - $object->setShopOrgNo($data->{'shopOrgNo'}); + if (\array_key_exists('shopCity', $data) && $data['shopCity'] !== null) { + $object->setShopCity($data['shopCity']); + unset($data['shopCity']); } - if (property_exists($data, 'shopPhoneNo') && $data->{'shopPhoneNo'} !== null) { - $object->setShopPhoneNo($data->{'shopPhoneNo'}); + elseif (\array_key_exists('shopCity', $data) && $data['shopCity'] === null) { + $object->setShopCity(null); } - if (property_exists($data, 'shopVatNo') && $data->{'shopVatNo'} !== null) { - $object->setShopVatNo($data->{'shopVatNo'}); + if (\array_key_exists('shopOrgNo', $data) && $data['shopOrgNo'] !== null) { + $object->setShopOrgNo($data['shopOrgNo']); + unset($data['shopOrgNo']); } - if (property_exists($data, 'shopCountryCode') && $data->{'shopCountryCode'} !== null) { - $object->setShopCountryCode($data->{'shopCountryCode'}); + elseif (\array_key_exists('shopOrgNo', $data) && $data['shopOrgNo'] === null) { + $object->setShopOrgNo(null); + } + if (\array_key_exists('shopPhoneNo', $data) && $data['shopPhoneNo'] !== null) { + $object->setShopPhoneNo($data['shopPhoneNo']); + unset($data['shopPhoneNo']); + } + elseif (\array_key_exists('shopPhoneNo', $data) && $data['shopPhoneNo'] === null) { + $object->setShopPhoneNo(null); + } + if (\array_key_exists('shopVatNo', $data) && $data['shopVatNo'] !== null) { + $object->setShopVatNo($data['shopVatNo']); + unset($data['shopVatNo']); + } + elseif (\array_key_exists('shopVatNo', $data) && $data['shopVatNo'] === null) { + $object->setShopVatNo(null); + } + if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) { + $object->setShopCountryCode($data['shopCountryCode']); + unset($data['shopCountryCode']); + } + elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) { + $object->setShopCountryCode(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\ShopModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php index daa3f8f6..b103e26f 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class StockLocationLanguagesModelCollectionNormalizer implements DenormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationLanguagesModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php index 859a9af2..e0f06a8d 100644 --- a/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationLanguagesModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,37 +16,69 @@ class StockLocationLanguagesModelNormalizer implements DenormalizerInterface, No { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationLanguagesModel(); - if (property_exists($data, 'langCode') && $data->{'langCode'} !== null) { - $object->setLangCode($data->{'langCode'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) { + $object->setLangCode($data['langCode']); + unset($data['langCode']); + } + elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) { + $object->setLangCode(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getLangCode()) { - $data->{'langCode'} = $object->getLangCode(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + $data = array(); + $data['langCode'] = $object->getLangCode(); + $data['name'] = $object->getName(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php index b2e65abe..3c2eccf6 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class StockLocationModelCollectionNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php index 46468f0a..e6e1ff6b 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class StockLocationModelItemNormalizer implements DenormalizerInterface, Normali { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\StockLocationModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\StockLocationModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php index 07e7481c..8733985c 100644 --- a/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,60 +16,120 @@ class StockLocationModelNormalizer implements DenormalizerInterface, NormalizerI { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationModel(); - if (property_exists($data, 'stockLocationId') && $data->{'stockLocationId'} !== null) { - $object->setStockLocationId($data->{'stockLocationId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] !== null) { + $object->setStockLocationId($data['stockLocationId']); + unset($data['stockLocationId']); + } + elseif (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] === null) { + $object->setStockLocationId(null); + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); } - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] !== null) { + $object->setEcommerceStockLocation($data['ecommerceStockLocation']); + unset($data['ecommerceStockLocation']); } - if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { - $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); + elseif (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] === null) { + $object->setEcommerceStockLocation(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { - $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context)); + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { + $object->setLanguages($this->denormalizer->denormalize($data['languages'], 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context)); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); + } + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); + } + if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { + $data['visibility'] = $object->getVisibility(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) { + $data['sortIndex'] = $object->getSortIndex(); } - if (null !== $object->getEcommerceStockLocation()) { - $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); + if ($object->isInitialized('ecommerceStockLocation') && null !== $object->getEcommerceStockLocation()) { + $data['ecommerceStockLocation'] = $object->getEcommerceStockLocation(); } - if (null !== $object->getLanguages()) { - $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + if ($object->isInitialized('languages') && null !== $object->getLanguages()) { + $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php index 34f292e9..69349a6f 100644 --- a/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPostRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,65 +16,115 @@ class StockLocationPostRequestModelNormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationPostRequestModel(); - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] !== null) { + $object->setEcommerceStockLocation($data['ecommerceStockLocation']); + unset($data['ecommerceStockLocation']); } - if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { - $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); + elseif (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] === null) { + $object->setEcommerceStockLocation(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getEcommerceStockLocation()) { - $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); + $data['visibility'] = $object->getVisibility(); + $data['sortIndex'] = $object->getSortIndex(); + if ($object->isInitialized('ecommerceStockLocation') && null !== $object->getEcommerceStockLocation()) { + $data['ecommerceStockLocation'] = $object->getEcommerceStockLocation(); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php index 659f4481..73054ccd 100644 --- a/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php +++ b/src/Api/Generated/Normalizer/StockLocationPutRequestModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,65 +16,115 @@ class StockLocationPutRequestModelNormalizer implements DenormalizerInterface, N { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\StockLocationPutRequestModel(); - if (property_exists($data, 'externalId') && $data->{'externalId'} !== null) { - $object->setExternalId($data->{'externalId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) { + $object->setExternalId($data['externalId']); + unset($data['externalId']); + } + elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) { + $object->setExternalId(null); + } + if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) { + $object->setExternalIdType($data['externalIdType']); + unset($data['externalIdType']); + } + elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) { + $object->setExternalIdType(null); + } + if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) { + $object->setVisibility(null); } - if (property_exists($data, 'externalIdType') && $data->{'externalIdType'} !== null) { - $object->setExternalIdType($data->{'externalIdType'}); + if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) { + $object->setSortIndex($data['sortIndex']); + unset($data['sortIndex']); } - if (property_exists($data, 'visibility') && $data->{'visibility'} !== null) { - $object->setVisibility($data->{'visibility'}); + elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) { + $object->setSortIndex(null); } - if (property_exists($data, 'sortIndex') && $data->{'sortIndex'} !== null) { - $object->setSortIndex($data->{'sortIndex'}); + if (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] !== null) { + $object->setEcommerceStockLocation($data['ecommerceStockLocation']); + unset($data['ecommerceStockLocation']); } - if (property_exists($data, 'ecommerceStockLocation') && $data->{'ecommerceStockLocation'} !== null) { - $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'}); + elseif (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] === null) { + $object->setEcommerceStockLocation(null); } - if (property_exists($data, 'languages') && $data->{'languages'} !== null) { + if (\array_key_exists('languages', $data) && $data['languages'] !== null) { $values = array(); - foreach ($data->{'languages'} as $value) { + foreach ($data['languages'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel', 'json', $context); } $object->setLanguages($values); + unset($data['languages']); + } + elseif (\array_key_exists('languages', $data) && $data['languages'] === null) { + $object->setLanguages(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - $data->{'externalId'} = $object->getExternalId(); - $data->{'externalIdType'} = $object->getExternalIdType(); - if (null !== $object->getVisibility()) { - $data->{'visibility'} = $object->getVisibility(); + $data = array(); + if ($object->isInitialized('externalId') && null !== $object->getExternalId()) { + $data['externalId'] = $object->getExternalId(); } - if (null !== $object->getSortIndex()) { - $data->{'sortIndex'} = $object->getSortIndex(); + if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) { + $data['externalIdType'] = $object->getExternalIdType(); } - if (null !== $object->getEcommerceStockLocation()) { - $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation(); + $data['visibility'] = $object->getVisibility(); + $data['sortIndex'] = $object->getSortIndex(); + if ($object->isInitialized('ecommerceStockLocation') && null !== $object->getEcommerceStockLocation()) { + $data['ecommerceStockLocation'] = $object->getEcommerceStockLocation(); } - if (null !== $object->getLanguages()) { - $values = array(); - foreach ($object->getLanguages() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + $values = array(); + foreach ($object->getLanguages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['languages'] = $values; + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; } - $data->{'languages'} = $values; } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/TokenModelNormalizer.php b/src/Api/Generated/Normalizer/TokenModelNormalizer.php index 238adf13..9941c451 100644 --- a/src/Api/Generated/Normalizer/TokenModelNormalizer.php +++ b/src/Api/Generated/Normalizer/TokenModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,34 +16,74 @@ class TokenModelNormalizer implements DenormalizerInterface, NormalizerInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\TokenModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\TokenModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\TokenModel(); - if (property_exists($data, 'access_token') && $data->{'access_token'} !== null) { - $object->setAccessToken($data->{'access_token'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('access_token', $data) && $data['access_token'] !== null) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + elseif (\array_key_exists('access_token', $data) && $data['access_token'] === null) { + $object->setAccessToken(null); + } + if (\array_key_exists('scope', $data) && $data['scope'] !== null) { + $object->setScope($data['scope']); + unset($data['scope']); + } + elseif (\array_key_exists('scope', $data) && $data['scope'] === null) { + $object->setScope(null); } - if (property_exists($data, 'scope') && $data->{'scope'} !== null) { - $object->setScope($data->{'scope'}); + if (\array_key_exists('expires_in', $data) && $data['expires_in'] !== null) { + $object->setExpiresIn($data['expires_in']); + unset($data['expires_in']); } - if (property_exists($data, 'expires_in') && $data->{'expires_in'} !== null) { - $object->setExpiresIn($data->{'expires_in'}); + elseif (\array_key_exists('expires_in', $data) && $data['expires_in'] === null) { + $object->setExpiresIn(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); + $data = array(); + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } + } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\TokenModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php index e895f209..01b1d77a 100644 --- a/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class VatRateModelCollectionNormalizer implements DenormalizerInterface, Normali { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\VatRateModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\VatRateModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\VatRateModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php index 7075fdbd..3ca7576e 100644 --- a/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class VatRateModelItemNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\VatRateModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\VatRateModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\VatRateModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\VatRateModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\VatRateModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php index 0c281ac5..c972e824 100644 --- a/src/Api/Generated/Normalizer/VatRateModelNormalizer.php +++ b/src/Api/Generated/Normalizer/VatRateModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,55 +16,115 @@ class VatRateModelNormalizer implements DenormalizerInterface, NormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\VatRateModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\VatRateModel(); - if (property_exists($data, 'countryCode') && $data->{'countryCode'} !== null) { - $object->setCountryCode($data->{'countryCode'}); + if (\array_key_exists('defaultVatRate', $data) && \is_int($data['defaultVatRate'])) { + $data['defaultVatRate'] = (double) $data['defaultVatRate']; + } + if (\array_key_exists('fixedOrderPaymentVatRate', $data) && \is_int($data['fixedOrderPaymentVatRate'])) { + $data['fixedOrderPaymentVatRate'] = (double) $data['fixedOrderPaymentVatRate']; + } + if (\array_key_exists('fixedOrderShippingVatRate', $data) && \is_int($data['fixedOrderShippingVatRate'])) { + $data['fixedOrderShippingVatRate'] = (double) $data['fixedOrderShippingVatRate']; + } + if (\array_key_exists('fixedOrderDiscountVatRate', $data) && \is_int($data['fixedOrderDiscountVatRate'])) { + $data['fixedOrderDiscountVatRate'] = (double) $data['fixedOrderDiscountVatRate']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('countryCode', $data) && $data['countryCode'] !== null) { + $object->setCountryCode($data['countryCode']); + unset($data['countryCode']); + } + elseif (\array_key_exists('countryCode', $data) && $data['countryCode'] === null) { + $object->setCountryCode(null); + } + if (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] !== null) { + $object->setDefaultVatRate($data['defaultVatRate']); + unset($data['defaultVatRate']); } - if (property_exists($data, 'defaultVatRate') && $data->{'defaultVatRate'} !== null) { - $object->setDefaultVatRate($data->{'defaultVatRate'}); + elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) { + $object->setDefaultVatRate(null); } - if (property_exists($data, 'fixedOrderPaymentVatRate') && $data->{'fixedOrderPaymentVatRate'} !== null) { - $object->setFixedOrderPaymentVatRate($data->{'fixedOrderPaymentVatRate'}); + if (\array_key_exists('fixedOrderPaymentVatRate', $data) && $data['fixedOrderPaymentVatRate'] !== null) { + $object->setFixedOrderPaymentVatRate($data['fixedOrderPaymentVatRate']); + unset($data['fixedOrderPaymentVatRate']); } - if (property_exists($data, 'fixedOrderShippingVatRate') && $data->{'fixedOrderShippingVatRate'} !== null) { - $object->setFixedOrderShippingVatRate($data->{'fixedOrderShippingVatRate'}); + elseif (\array_key_exists('fixedOrderPaymentVatRate', $data) && $data['fixedOrderPaymentVatRate'] === null) { + $object->setFixedOrderPaymentVatRate(null); } - if (property_exists($data, 'fixedOrderDiscountVatRate') && $data->{'fixedOrderDiscountVatRate'} !== null) { - $object->setFixedOrderDiscountVatRate($data->{'fixedOrderDiscountVatRate'}); + if (\array_key_exists('fixedOrderShippingVatRate', $data) && $data['fixedOrderShippingVatRate'] !== null) { + $object->setFixedOrderShippingVatRate($data['fixedOrderShippingVatRate']); + unset($data['fixedOrderShippingVatRate']); + } + elseif (\array_key_exists('fixedOrderShippingVatRate', $data) && $data['fixedOrderShippingVatRate'] === null) { + $object->setFixedOrderShippingVatRate(null); + } + if (\array_key_exists('fixedOrderDiscountVatRate', $data) && $data['fixedOrderDiscountVatRate'] !== null) { + $object->setFixedOrderDiscountVatRate($data['fixedOrderDiscountVatRate']); + unset($data['fixedOrderDiscountVatRate']); + } + elseif (\array_key_exists('fixedOrderDiscountVatRate', $data) && $data['fixedOrderDiscountVatRate'] === null) { + $object->setFixedOrderDiscountVatRate(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getCountryCode()) { - $data->{'countryCode'} = $object->getCountryCode(); + $data = array(); + if ($object->isInitialized('countryCode') && null !== $object->getCountryCode()) { + $data['countryCode'] = $object->getCountryCode(); } - if (null !== $object->getDefaultVatRate()) { - $data->{'defaultVatRate'} = $object->getDefaultVatRate(); + if ($object->isInitialized('defaultVatRate') && null !== $object->getDefaultVatRate()) { + $data['defaultVatRate'] = $object->getDefaultVatRate(); } - if (null !== $object->getFixedOrderPaymentVatRate()) { - $data->{'fixedOrderPaymentVatRate'} = $object->getFixedOrderPaymentVatRate(); + if ($object->isInitialized('fixedOrderPaymentVatRate') && null !== $object->getFixedOrderPaymentVatRate()) { + $data['fixedOrderPaymentVatRate'] = $object->getFixedOrderPaymentVatRate(); } - if (null !== $object->getFixedOrderShippingVatRate()) { - $data->{'fixedOrderShippingVatRate'} = $object->getFixedOrderShippingVatRate(); + if ($object->isInitialized('fixedOrderShippingVatRate') && null !== $object->getFixedOrderShippingVatRate()) { + $data['fixedOrderShippingVatRate'] = $object->getFixedOrderShippingVatRate(); } - if (null !== $object->getFixedOrderDiscountVatRate()) { - $data->{'fixedOrderDiscountVatRate'} = $object->getFixedOrderDiscountVatRate(); + if ($object->isInitialized('fixedOrderDiscountVatRate') && null !== $object->getFixedOrderDiscountVatRate()) { + $data['fixedOrderDiscountVatRate'] = $object->getFixedOrderDiscountVatRate(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\VatRateModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php index 58b682b0..4cdfa337 100644 --- a/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelCollectionNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,39 +16,71 @@ class WebHookModelCollectionNormalizer implements DenormalizerInterface, Normali { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\WebHookModelCollection(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { $values = array(); - foreach ($data->{'data'} as $value) { + foreach ($data['data'] as $value) { $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\WebHookModel', 'json', $context); } $object->setData($values); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { $values = array(); foreach ($object->getData() as $value) { $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data->{'data'} = $values; + $data['data'] = $values; + } + foreach ($object as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value_1; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\WebHookModelCollection' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php index 92858f8e..877407f0 100644 --- a/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelItemNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,31 +16,63 @@ class WebHookModelItemNormalizer implements DenormalizerInterface, NormalizerInt { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\WebHookModelItem'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelItem'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\WebHookModelItem(); - if (property_exists($data, 'data') && $data->{'data'} !== null) { - $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\WebHookModel', 'json', $context)); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('data', $data) && $data['data'] !== null) { + $object->setData($this->denormalizer->denormalize($data['data'], 'Starweb\\Api\\Generated\\Model\\WebHookModel', 'json', $context)); + unset($data['data']); + } + elseif (\array_key_exists('data', $data) && $data['data'] === null) { + $object->setData(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getData()) { - $data->{'data'} = $this->normalizer->normalize($object->getData(), 'json', $context); + $data = array(); + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['data'] = $this->normalizer->normalize($object->getData(), 'json', $context); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\WebHookModelItem' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php index 4d56120d..88a63704 100644 --- a/src/Api/Generated/Normalizer/WebHookModelNormalizer.php +++ b/src/Api/Generated/Normalizer/WebHookModelNormalizer.php @@ -2,7 +2,9 @@ namespace Starweb\Api\Generated\Normalizer; -use Jane\JsonSchemaRuntime\Reference; +use Jane\Component\JsonSchemaRuntime\Reference; +use Starweb\Api\Generated\Runtime\Normalizer\CheckArray; +use Starweb\Api\Generated\Runtime\Normalizer\ValidatorTrait; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -14,50 +16,100 @@ class WebHookModelNormalizer implements DenormalizerInterface, NormalizerInterfa { use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, $format = null, array $context = array()) : bool { return $type === 'Starweb\\Api\\Generated\\Model\\WebHookModel'; } - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null, array $context = array()) : bool { return is_object($data) && get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModel'; } + /** + * @return mixed + */ public function denormalize($data, $class, $format = null, array $context = array()) { - if (!is_object($data)) { - return null; + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } $object = new \Starweb\Api\Generated\Model\WebHookModel(); - if (property_exists($data, 'webHookId') && $data->{'webHookId'} !== null) { - $object->setWebHookId($data->{'webHookId'}); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('webHookId', $data) && $data['webHookId'] !== null) { + $object->setWebHookId($data['webHookId']); + unset($data['webHookId']); + } + elseif (\array_key_exists('webHookId', $data) && $data['webHookId'] === null) { + $object->setWebHookId(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + unset($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('event', $data) && $data['event'] !== null) { + $object->setEvent($data['event']); + unset($data['event']); } - if (property_exists($data, 'name') && $data->{'name'} !== null) { - $object->setName($data->{'name'}); + elseif (\array_key_exists('event', $data) && $data['event'] === null) { + $object->setEvent(null); } - if (property_exists($data, 'event') && $data->{'event'} !== null) { - $object->setEvent($data->{'event'}); + if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) { + $object->setStatusId($data['statusId']); + unset($data['statusId']); } - if (property_exists($data, 'statusId') && $data->{'statusId'} !== null) { - $object->setStatusId($data->{'statusId'}); + elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) { + $object->setStatusId(null); } - if (property_exists($data, 'url') && $data->{'url'} !== null) { - $object->setUrl($data->{'url'}); + if (\array_key_exists('url', $data) && $data['url'] !== null) { + $object->setUrl($data['url']); + unset($data['url']); + } + elseif (\array_key_exists('url', $data) && $data['url'] === null) { + $object->setUrl(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } return $object; } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ public function normalize($object, $format = null, array $context = array()) { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); + $data = array(); + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('event') && null !== $object->getEvent()) { + $data['event'] = $object->getEvent(); } - if (null !== $object->getEvent()) { - $data->{'event'} = $object->getEvent(); + if ($object->isInitialized('statusId') && null !== $object->getStatusId()) { + $data['statusId'] = $object->getStatusId(); } - $data->{'statusId'} = $object->getStatusId(); - if (null !== $object->getUrl()) { - $data->{'url'} = $object->getUrl(); + if ($object->isInitialized('url') && null !== $object->getUrl()) { + $data['url'] = $object->getUrl(); + } + foreach ($object as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $data[$key] = $value; + } } return $data; } + public function getSupportedTypes(?string $format = null) : array + { + return array('Starweb\\Api\\Generated\\Model\\WebHookModel' => false); + } } \ No newline at end of file diff --git a/src/Api/Generated/Runtime/Client/BaseEndpoint.php b/src/Api/Generated/Runtime/Client/BaseEndpoint.php new file mode 100644 index 00000000..4383d440 --- /dev/null +++ b/src/Api/Generated/Runtime/Client/BaseEndpoint.php @@ -0,0 +1,66 @@ +getQueryOptionsResolver()->resolve($this->queryParameters); + $optionsResolved = array_map(function ($value) { + return null !== $value ? $value : ''; + }, $optionsResolved); + return http_build_query($optionsResolved, '', '&', PHP_QUERY_RFC3986); + } + public function getHeaders(array $baseHeaders = []) : array + { + return array_merge($this->getExtraHeaders(), $baseHeaders, $this->getHeadersOptionsResolver()->resolve($this->headerParameters)); + } + protected function getQueryOptionsResolver() : OptionsResolver + { + return new OptionsResolver(); + } + protected function getHeadersOptionsResolver() : OptionsResolver + { + return new OptionsResolver(); + } + // ---------------------------------------------------------------------------------------------------- + // Used for OpenApi2 compatibility + protected function getFormBody() : array + { + return [['Content-Type' => ['application/x-www-form-urlencoded']], http_build_query($this->getFormOptionsResolver()->resolve($this->formParameters))]; + } + protected function getMultipartBody($streamFactory = null) : array + { + $bodyBuilder = new MultipartStreamBuilder($streamFactory); + $formParameters = $this->getFormOptionsResolver()->resolve($this->formParameters); + foreach ($formParameters as $key => $value) { + $bodyBuilder->addResource($key, $value); + } + return [['Content-Type' => ['multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '"')]], $bodyBuilder->build()]; + } + protected function getFormOptionsResolver() : OptionsResolver + { + return new OptionsResolver(); + } + protected function getSerializedBody(SerializerInterface $serializer) : array + { + return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Runtime/Client/Client.php b/src/Api/Generated/Runtime/Client/Client.php new file mode 100644 index 00000000..2cd37b15 --- /dev/null +++ b/src/Api/Generated/Runtime/Client/Client.php @@ -0,0 +1,82 @@ +httpClient = $httpClient; + $this->requestFactory = $requestFactory; + $this->serializer = $serializer; + $this->streamFactory = $streamFactory; + } + public function executeEndpoint(Endpoint $endpoint, string $fetch = self::FETCH_OBJECT) + { + if (self::FETCH_RESPONSE === $fetch) { + trigger_deprecation('jane-php/open-api-common', '7.3', 'Using %s::%s method with $fetch parameter equals to response is deprecated, use %s::%s instead.', __CLASS__, __METHOD__, __CLASS__, 'executeRawEndpoint'); + return $this->executeRawEndpoint($endpoint); + } + return $endpoint->parseResponse($this->processEndpoint($endpoint), $this->serializer, $fetch); + } + public function executeRawEndpoint(Endpoint $endpoint) : ResponseInterface + { + return $this->processEndpoint($endpoint); + } + private function processEndpoint(Endpoint $endpoint) : ResponseInterface + { + [$bodyHeaders, $body] = $endpoint->getBody($this->serializer, $this->streamFactory); + $queryString = $endpoint->getQueryString(); + $uriGlue = false === strpos($endpoint->getUri(), '?') ? '?' : '&'; + $uri = $queryString !== '' ? $endpoint->getUri() . $uriGlue . $queryString : $endpoint->getUri(); + $request = $this->requestFactory->createRequest($endpoint->getMethod(), $uri); + if ($body) { + if ($body instanceof StreamInterface) { + $request = $request->withBody($body); + } elseif (is_resource($body)) { + $request = $request->withBody($this->streamFactory->createStreamFromResource($body)); + } elseif (strlen($body) <= 4000 && @file_exists($body)) { + // more than 4096 chars will trigger an error + $request = $request->withBody($this->streamFactory->createStreamFromFile($body)); + } else { + $request = $request->withBody($this->streamFactory->createStream($body)); + } + } + foreach ($endpoint->getHeaders($bodyHeaders) as $name => $value) { + $request = $request->withHeader($name, $value); + } + if (count($endpoint->getAuthenticationScopes()) > 0) { + $scopes = []; + foreach ($endpoint->getAuthenticationScopes() as $scope) { + $scopes[] = $scope; + } + $request = $request->withHeader(AuthenticationRegistry::SCOPES_HEADER, $scopes); + } + return $this->httpClient->sendRequest($request); + } +} \ No newline at end of file diff --git a/src/Api/Generated/Runtime/Client/CustomQueryResolver.php b/src/Api/Generated/Runtime/Client/CustomQueryResolver.php new file mode 100644 index 00000000..7cbf1f26 --- /dev/null +++ b/src/Api/Generated/Runtime/Client/CustomQueryResolver.php @@ -0,0 +1,9 @@ +hasHeader('Content-Type') ? current($response->getHeader('Content-Type')) : null; + return $this->transformResponseBody($response, $serializer, $contentType); + } +} \ No newline at end of file diff --git a/src/Api/Generated/Runtime/Normalizer/CheckArray.php b/src/Api/Generated/Runtime/Normalizer/CheckArray.php new file mode 100644 index 00000000..2d876a0b --- /dev/null +++ b/src/Api/Generated/Runtime/Normalizer/CheckArray.php @@ -0,0 +1,13 @@ +getReferenceUri(); + return $ref; + } + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null) : bool + { + return $data instanceof Reference; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Runtime/Normalizer/ValidationException.php b/src/Api/Generated/Runtime/Normalizer/ValidationException.php new file mode 100644 index 00000000..cc04d6bf --- /dev/null +++ b/src/Api/Generated/Runtime/Normalizer/ValidationException.php @@ -0,0 +1,19 @@ +violationList = $violationList; + parent::__construct(sprintf('Model validation failed with %d errors.', $violationList->count()), 400); + } + public function getViolationList() : ConstraintViolationListInterface + { + return $this->violationList; + } +} \ No newline at end of file diff --git a/src/Api/Generated/Runtime/Normalizer/ValidatorTrait.php b/src/Api/Generated/Runtime/Normalizer/ValidatorTrait.php new file mode 100644 index 00000000..974c1f4e --- /dev/null +++ b/src/Api/Generated/Runtime/Normalizer/ValidatorTrait.php @@ -0,0 +1,16 @@ +validate($data, $constraint); + if ($violations->count() > 0) { + throw new ValidationException($violations); + } + } +} \ No newline at end of file diff --git a/src/Exception/InvalidCredentialsException.php b/src/Exception/InvalidCredentialsException.php index 52018371..8c2f6619 100644 --- a/src/Exception/InvalidCredentialsException.php +++ b/src/Exception/InvalidCredentialsException.php @@ -2,8 +2,8 @@ namespace Starweb\Exception; -use Http\Client\Common\Exception\ClientErrorException; +use Http\Client\Exception\HttpException; -class InvalidCredentialsException extends ClientErrorException +class InvalidCredentialsException extends HttpException { } diff --git a/src/Exception/MaximumAuthenticationAttemptsReachedException.php b/src/Exception/MaximumAuthenticationAttemptsReachedException.php index bc95b765..3e19f48b 100644 --- a/src/Exception/MaximumAuthenticationAttemptsReachedException.php +++ b/src/Exception/MaximumAuthenticationAttemptsReachedException.php @@ -2,8 +2,8 @@ namespace Starweb\Exception; -use Http\Client\Common\Exception\ClientErrorException; +use Http\Client\Exception\HttpException; -class MaximumAuthenticationAttemptsReachedException extends ClientErrorException +class MaximumAuthenticationAttemptsReachedException extends HttpException { } diff --git a/src/HttpClient/Plugin/BaseUriPlugin.php b/src/HttpClient/Plugin/BaseUriPlugin.php index 0e653607..cad9328e 100644 --- a/src/HttpClient/Plugin/BaseUriPlugin.php +++ b/src/HttpClient/Plugin/BaseUriPlugin.php @@ -46,7 +46,7 @@ public function __construct(UriInterface $uri, array $hostConfig = []) /** * {@inheritdoc} */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + public function handleRequest(RequestInterface $request, callable $next, callable $first): \Http\Promise\Promise { $addHostNext = function (RequestInterface $request) use ($next, $first) { return $this->addHostPlugin->handleRequest($request, $next, $first); diff --git a/src/HttpClient/Plugin/ErrorPlugin.php b/src/HttpClient/Plugin/ErrorPlugin.php index 11a1067f..46a96d50 100644 --- a/src/HttpClient/Plugin/ErrorPlugin.php +++ b/src/HttpClient/Plugin/ErrorPlugin.php @@ -47,7 +47,7 @@ final class ErrorPlugin implements Plugin /** * {@inheritdoc} */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + public function handleRequest(RequestInterface $request, callable $next, callable $first): \Http\Promise\Promise { $promise = $next($request); diff --git a/tests/unit/Api/Authentication/AccessTokenTest.php b/tests/unit/Api/Authentication/AccessTokenTest.php index 602e45eb..03eebec0 100644 --- a/tests/unit/Api/Authentication/AccessTokenTest.php +++ b/tests/unit/Api/Authentication/AccessTokenTest.php @@ -17,7 +17,7 @@ public function testToString(): void { $token = new AccessToken('my-token'); - $this->assertTrue(is_string((string) $token)); + $this->assertIsString((string)$token); $this->assertEquals('my-token', (string) $token); } @@ -25,7 +25,7 @@ public function testGetTtl(): void { $token = new AccessToken('my-token'); - $this->assertTrue(is_int($token->getTtl())); + $this->assertIsInt($token->getTtl()); $this->assertEquals(3600, $token->getTtl()); } @@ -33,7 +33,7 @@ public function testGetCustomTtl(): void { $token = new AccessToken('my-token', 7200); - $this->assertTrue(is_int($token->getTtl())); + $this->assertIsInt($token->getTtl()); $this->assertEquals(7200, $token->getTtl()); } diff --git a/tests/unit/Api/Authentication/ClientCredentialsTest.php b/tests/unit/Api/Authentication/ClientCredentialsTest.php index 29536993..1adb2b51 100644 --- a/tests/unit/Api/Authentication/ClientCredentialsTest.php +++ b/tests/unit/Api/Authentication/ClientCredentialsTest.php @@ -18,7 +18,7 @@ public function testGetId(): void { $credentials = new ClientCredentials('client_id', 'client_secret'); - $this->assertTrue(is_string($credentials->getId())); + $this->assertIsString($credentials->getId()); $this->assertEquals('client_id', ($credentials->getId())); } @@ -26,7 +26,7 @@ public function testGetSecret(): void { $credentials = new ClientCredentials('client_id', 'client_secret'); - $this->assertTrue(is_string($credentials->getSecret())); + $this->assertIsString($credentials->getSecret()); $this->assertEquals('client_secret', ($credentials->getSecret())); } } diff --git a/tests/unit/Api/Authentication/TokenFileSystemCacheTest.php b/tests/unit/Api/Authentication/TokenFileSystemCacheTest.php index b370ec71..06a8126d 100644 --- a/tests/unit/Api/Authentication/TokenFileSystemCacheTest.php +++ b/tests/unit/Api/Authentication/TokenFileSystemCacheTest.php @@ -39,7 +39,6 @@ public function testHasToken(): void $this->cache->setToken(new AccessToken('my-token')); $hasToken = $this->cache->hasToken(); - $this->assertTrue(is_bool($hasToken)); $this->assertTrue($hasToken); } @@ -63,7 +62,6 @@ public function testIsExpired(): void { $this->cache->setToken(new AccessToken('my-token')); - $this->assertTrue(is_bool($this->cache->isExpired())); $this->assertFalse($this->cache->isExpired()); } @@ -72,7 +70,6 @@ public function testIsExpiredWithOneSecondTtl(): void $token = new AccessToken('my-token', 0); $this->cache->setToken($token); - $this->assertTrue(is_bool($this->cache->isExpired())); $this->assertTrue($this->cache->isExpired()); } diff --git a/tests/unit/Api/ClientTest.php b/tests/unit/Api/ClientTest.php index d3cfc8f7..d5f3890c 100644 --- a/tests/unit/Api/ClientTest.php +++ b/tests/unit/Api/ClientTest.php @@ -3,10 +3,10 @@ namespace Starweb\Tests\Api; use Http\Client\HttpClient; -use Http\Message\MessageFactory; +use Http\Factory\Guzzle\RequestFactory; use PHPUnit\Framework\TestCase; -use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamFactoryInterface; use Starweb\Api\Client; use Starweb\Api\Generated\Model\MediaFileUploadModel as GeneratedMediaFileUploadModel; use Starweb\Api\Model\MediaFileUploadModel; @@ -26,7 +26,7 @@ public function testCreateMediaFile(): void $client = $this->getClient(); $mediaFileUploadModelMock = $this->createMock(MediaFileUploadModel::class); - $this->assertSame(null, $client->createMediaFile($mediaFileUploadModelMock)); + $this->assertNull($client->createMediaFile($mediaFileUploadModelMock)); } public function testCreateMediaFileWithGeneratedModelThrowsException(): void @@ -43,7 +43,7 @@ public function testPutMediaFile(): void $client = $this->getClient(); $mediaFileUploadModelMock = $this->createMock(MediaFileUploadModel::class); - $this->assertSame(null, $client->putMediaFile(1, $mediaFileUploadModelMock)); + $this->assertNull($client->putMediaFile(1, $mediaFileUploadModelMock)); } public function testPutMediaFileWithGeneratedModelThrowsException(): void @@ -60,7 +60,7 @@ public function testPatchMediaFile(): void $client = $this->getClient(); $mediaFileUploadModelMock = $this->createMock(MediaFileUploadModel::class); - $this->assertSame(null, $client->patchMediaFile(1, $mediaFileUploadModelMock)); + $this->assertNull($client->patchMediaFile(1, $mediaFileUploadModelMock)); } public function testPatchMediaFileWithGeneratedModelThrowsException(): void @@ -84,17 +84,13 @@ private function getClient(): Client ->method('sendRequest') ->willReturn($responseMock); - $requestMock = $this->createMock(RequestInterface::class); - $messageFactoryMock = $this->createMock(MessageFactory::class); - $messageFactoryMock - ->method('createRequest') - ->willReturn($requestMock); - $serializerMock = $this->createMock(Serializer::class); $serializerMock ->method('normalize') ->willReturn([]); - return new Client($httpClientMock, $messageFactoryMock, $serializerMock); + $streamFactory = $this->createMock(StreamFactoryInterface::class); + + return new Client($httpClientMock, new RequestFactory(), $serializerMock, $streamFactory); } } diff --git a/tests/unit/Api/Endpoint/MediaFileEndpointTraitTest.php b/tests/unit/Api/Endpoint/MediaFileEndpointTraitTest.php index f5a386e9..b4f81c75 100644 --- a/tests/unit/Api/Endpoint/MediaFileEndpointTraitTest.php +++ b/tests/unit/Api/Endpoint/MediaFileEndpointTraitTest.php @@ -51,7 +51,7 @@ public function testGetBodyTraitForNotSupportedModelShouldReturnEmptyArrayParts( private function getEndpoint($body) { - $endpoint = new class ($body) + return new class ($body) { private $body; @@ -62,7 +62,5 @@ public function __construct($body) use MediaFileEndpointTrait; }; - - return $endpoint; } } diff --git a/tests/unit/Api/Model/MediaFileUploadModelTest.php b/tests/unit/Api/Model/MediaFileUploadModelTest.php index fcccb54a..f36723d2 100644 --- a/tests/unit/Api/Model/MediaFileUploadModelTest.php +++ b/tests/unit/Api/Model/MediaFileUploadModelTest.php @@ -8,7 +8,7 @@ class MediaFileUploadModelTest extends TestCase { - public function testInheritance() + public function testInheritance(): void { $model = new MediaFileUploadModel(); $this->assertInstanceOf(GeneratedMediaFileUploadModel::class, $model); diff --git a/tests/unit/HttpClient/BuilderTest.php b/tests/unit/HttpClient/BuilderTest.php index 791b1f60..4102655e 100644 --- a/tests/unit/HttpClient/BuilderTest.php +++ b/tests/unit/HttpClient/BuilderTest.php @@ -6,7 +6,6 @@ use Http\Discovery\MessageFactoryDiscovery; use Http\Mock\Client; use PHPUnit\Framework\TestCase; -use Starweb\Api\Authentication\AccessToken; use Starweb\Api\Authentication\TokenManager; use Starweb\HttpClient\Builder; use Starweb\Api\Generated\Client as JaneOpenApiClient; From f654c81ba01cb103a7276a050e680579aaee47fa Mon Sep 17 00:00:00 2001 From: Igor Pereginets Date: Tue, 29 Aug 2023 16:03:49 +0300 Subject: [PATCH 87/87] STA-20365 PHP 8.2 upgrade Removed unused variables. --- src/HttpClient/Builder.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/HttpClient/Builder.php b/src/HttpClient/Builder.php index 51f89180..c1d1234d 100644 --- a/src/HttpClient/Builder.php +++ b/src/HttpClient/Builder.php @@ -71,7 +71,6 @@ public function build(): Client public function addPlugin(Plugin $plugin): Builder { $this->plugins[] = $plugin; - $this->httpClientModified = true; return $this; } @@ -81,7 +80,6 @@ public function removePlugin($fqcn): Builder foreach ($this->plugins as $idx => $plugin) { if ($plugin instanceof $fqcn) { unset($this->plugins[$idx]); - $this->httpClientModified = true; } }