diff --git a/.jane-openapi b/.jane-openapi
index 29cb5523..57d5121f 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' => false
+];
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
diff --git a/composer.json b/composer.json
index 87aae6e7..54b3ee8f 100644
--- a/composer.json
+++ b/composer.json
@@ -13,29 +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": "dev-master"
+ "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"
@@ -47,9 +49,15 @@
"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",
"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/resources/specification/openapi.json b/resources/specification/openapi.json
index 5fd34788..f894482e 100644
--- a/resources/specification/openapi.json
+++ b/resources/specification/openapi.json
@@ -2,13 +2,13 @@
"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",
"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",
@@ -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-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-09-11T07:15:21+02:00",
+ "example": "2019-11-28T13:38:17+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",
@@ -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": {
@@ -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",
@@ -2918,7 +2931,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": {
@@ -3038,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": {
@@ -3072,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": {
@@ -3175,12 +3188,12 @@
"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": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelCollection"
+ "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelItem"
}
}
}
@@ -3267,7 +3280,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelCollection"
+ "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelItem"
}
}
}
@@ -3301,7 +3314,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelCollection"
+ "$ref": "#\/components\/schemas\/ProductVariantAttributeValueModelItem"
}
}
}
@@ -3647,16 +3660,16 @@
]
},
"post": {
- "operationId": "createProductManufacturers",
+ "operationId": "createProductManufacturer",
"summary": "Create a product manufacturer",
"description": "Creates a product manufacturer.",
"responses": {
- "200": {
+ "201": {
"description": "The created product manufacturer",
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductManufacturerModelCollection"
+ "$ref": "#\/components\/schemas\/ProductManufacturerModelItem"
}
}
}
@@ -3829,6 +3842,40 @@
"tags": [
"Product Units"
]
+ },
+ "post": {
+ "operationId": "createProductUnit",
+ "summary": "Create a product unit",
+ "description": "Creates a product unit.",
+ "responses": {
+ "201": {
+ "description": "The created product unit",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/ProductUnitModelItem"
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/BadRequest"
+ }
+ },
+ "requestBody": {
+ "description": "Product unit data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "$ref": "#\/components\/schemas\/ProductUnitModelUpdatable"
+ }
+ }
+ }
+ },
+ "tags": [
+ "Product Units"
+ ]
}
},
"\/product-units\/{unitId}": {
@@ -3856,6 +3903,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\/ProductUnitModelUpdatable"
+ }
+ }
+ }
+ },
+ "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\/ProductUnitModelUpdatable"
+ }
+ }
+ }
+ },
+ "tags": [
+ "Product Units"
+ ]
+ },
"parameters": [
{
"name": "unitId",
@@ -4111,7 +4242,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductStockStatusModel"
+ "$ref": "#\/components\/schemas\/ProductStockStatusRequestModel"
}
}
}
@@ -4190,7 +4321,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductStockStatusModel"
+ "$ref": "#\/components\/schemas\/ProductStockStatusRequestModel"
}
}
}
@@ -4227,7 +4358,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductStockStatusModel"
+ "$ref": "#\/components\/schemas\/ProductStockStatusRequestModel"
}
}
}
@@ -4707,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-09-11T07:15:21+02:00",
+ "example": "2019-11-28T13:38:17+01:00",
"schema": {
"type": "string"
}
@@ -4716,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-09-11T07:15:21+02:00",
+ "example": "2019-11-28T13:38:17+01:00",
"schema": {
"type": "string"
}
@@ -4744,7 +4875,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",
@@ -5272,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",
@@ -5336,7 +5467,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductVariantModel"
+ "$ref": "#\/components\/schemas\/ProductVariantRequestModel"
}
}
}
@@ -5387,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",
@@ -5455,7 +5586,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductVariantModel"
+ "$ref": "#\/components\/schemas\/ProductVariantPutRequestModel"
}
}
}
@@ -5492,7 +5623,7 @@
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ProductVariantModel"
+ "$ref": "#\/components\/schemas\/ProductVariantPatchRequestModel"
}
}
}
@@ -6779,6 +6910,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 +7080,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"
+ }
}
]
},
@@ -7678,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": {
@@ -7713,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",
@@ -8132,7 +8332,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 +8408,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 +8444,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 +8545,19 @@
"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-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": {
@@ -8399,7 +8611,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-11-28T13:38:17+01:00"
},
"customerId": {
"type": "integer",
@@ -8431,6 +8643,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",
@@ -8608,6 +8825,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"
},
@@ -8637,7 +8864,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-11-28T13:38:17+01:00",
"readOnly": true
},
"baseCurrencyCode": {
@@ -8691,7 +8918,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-11-28T13:38:17+01:00"
},
"customerId": {
"type": "integer",
@@ -8921,7 +9148,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-11-28T13:38:17+01:00",
"readOnly": true
},
"baseCurrencyCode": {
@@ -8975,7 +9202,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-11-28T13:38:17+01:00"
},
"customerId": {
"type": "integer",
@@ -9178,6 +9405,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",
@@ -9381,10 +9618,7 @@
"example": "created"
},
"languages": {
- "type": "array",
- "items": {
- "$ref": "#\/components\/schemas\/OrderStatusLanguageModel"
- }
+ "$ref": "#\/components\/schemas\/OrderStatusLanguageModelCollection"
}
}
},
@@ -9406,6 +9640,17 @@
}
}
},
+ "OrderStatusLanguageModelCollection": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/components\/schemas\/OrderStatusLanguageModel"
+ }
+ }
+ }
+ },
"OrderStatusModelItem": {
"properties": {
"data": {
@@ -9499,13 +9744,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"
+ }
+ ]
}
}
}
@@ -9525,6 +9792,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",
@@ -9602,7 +9873,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-11-28T13:38:17+01:00"
},
"type": {
"type": "string",
@@ -9640,6 +9911,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,
@@ -9669,7 +9950,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-11-28T13:38:17+01:00"
},
"type": {
"type": "string",
@@ -9705,7 +9986,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-11-28T13:38:17+01:00",
"readOnly": true
},
"approved": {
@@ -9717,14 +9998,25 @@
"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",
- "readOnly": true
+ "example": "2019-11-28T13:38:17+01:00",
+ "readOnly": true,
+ "nullable": true
},
"pricelistId": {
"type": "integer",
"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"
@@ -9748,7 +10040,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-11-28T13:38:17+01:00"
},
"type": {
"type": "string",
@@ -9784,7 +10076,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-11-28T13:38:17+01:00",
"readOnly": true
},
"approved": {
@@ -9796,7 +10088,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-11-28T13:38:17+01:00",
"readOnly": true
},
"pricelistId": {
@@ -9804,6 +10096,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"
}
}
},
@@ -10149,12 +10451,19 @@
"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"
- }
- }
+ "externalId": {
+ "type": "string",
+ "readOnly": true,
+ "nullable": true,
+ "example": "ABC123",
+ "description": "External id for systems like Specter, Fortnox etc"
+ },
+ "languages": {
+ "$ref": "#\/components\/schemas\/PaymentMethodLanguageModelCollection"
+ }
+ }
},
"PaymentMethodModelItem": {
"properties": {
@@ -10316,7 +10625,14 @@
"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"
+ },
+ "externalId": {
+ "type": "string",
+ "readOnly": true,
+ "nullable": true,
+ "example": "ABC123",
+ "description": "External id for systems like Specter, Fortnox etc"
},
"languages": {
"$ref": "#\/components\/schemas\/ShippingMethodLanguageModelCollection"
@@ -10350,6 +10666,21 @@
"example": 1,
"description": "The pricelist id"
},
+ "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
+ },
"name": {
"type": "string",
"maxLength": 30,
@@ -10405,7 +10736,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",
@@ -10429,6 +10761,21 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system",
+ "nullable": true
+ },
"currencyCode": {
"type": "string",
"minLength": 3,
@@ -10482,6 +10829,21 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system",
+ "nullable": true
+ },
"parentPricelistId": {
"type": "integer",
"example": null,
@@ -10575,6 +10937,21 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system",
+ "nullable": true
+ },
"currencyCode": {
"type": "string",
"minLength": 3,
@@ -10628,6 +11005,21 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system",
+ "nullable": true
+ },
"parentPricelistId": {
"type": "integer",
"example": null,
@@ -10687,6 +11079,20 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system"
}
},
"required": [
@@ -10703,6 +11109,21 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system",
+ "nullable": true
+ },
"currencyCode": {
"type": "string",
"minLength": 3,
@@ -10756,6 +11177,21 @@
"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",
+ "nullable": true
+ },
+ "externalIdType": {
+ "type": "string",
+ "description": "The system name the externalId belongs to.",
+ "maxLength": 20,
+ "example": "ERP system",
+ "nullable": true
+ },
"parentPricelistId": {
"type": "integer",
"example": null,
@@ -10798,7 +11234,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-11-28T13:38:17+01:00"
},
"text": {
"type": "string",
@@ -10858,13 +11294,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-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-09-11T07:15:21+02:00",
+ "example": "2019-11-28T13:38:17+01:00",
"readOnly": true
},
"size": {
@@ -10937,7 +11373,8 @@
"parentId": {
"type": "integer",
"description": "The category`s parent`s Id",
- "example": null
+ "example": null,
+ "nullable": true
},
"visibility": {
"type": "string",
@@ -10957,19 +11394,33 @@
"imageFileId": {
"type": "integer",
"description": "The Id to the category`s image file. Has to be an existing mediaFile",
- "example": null
+ "example": null,
+ "nullable": true
+ },
+ "externalId": {
+ "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",
- "description": "The system name the externalId belongs to.",
+ "deprecated": true,
+ "nullable": true,
+ "default": null,
+ "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,
+ "nullable": true,
+ "default": null,
+ "example": "Fortnox"
},
"hasChildren": {
"type": "boolean",
@@ -10994,7 +11445,8 @@
"parentId": {
"type": "integer",
"description": "The category`s parent`s Id",
- "example": null
+ "example": null,
+ "nullable": true
},
"visibility": {
"type": "string",
@@ -11014,19 +11466,33 @@
"imageFileId": {
"type": "integer",
"description": "The Id to the category`s image file. Has to be an existing mediaFile",
- "example": null
+ "example": null,
+ "nullable": true
+ },
+ "externalId": {
+ "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",
- "description": "The system name the externalId belongs to.",
+ "deprecated": true,
+ "description": "Deprecated: use `externalIdType` instead",
"maxLength": 20,
+ "nullable": true,
+ "default": null,
"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,
+ "nullable": true,
+ "default": null,
+ "example": "Fortnox"
},
"hasChildren": {
"type": "boolean",
@@ -11061,30 +11527,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"
}
@@ -11135,10 +11606,25 @@
"readOnly": true,
"example": 101
},
+ "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
+ },
"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-11-28T13:38:17+01:00"
},
"defaultVatRate": {
"type": "string",
@@ -11177,7 +11663,7 @@
"sortIndex": {
"type": "integer",
"nullable": true,
- "minimum": 1,
+ "minimum": 0,
"maximum": 10000,
"description": "Sort index for this product in a list"
},
@@ -11216,7 +11702,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-11-28T13:38:17+01:00",
"readOnly": true
},
"variants": {
@@ -11256,15 +11742,25 @@
"ProductModelUpdatable": {
"type": "object",
"properties": {
- "productId": {
- "type": "integer",
- "readOnly": true,
- "example": 101
+ "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
},
"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-11-28T13:38:17+01:00"
},
"defaultVatRate": {
"type": "string",
@@ -11283,7 +11779,8 @@
"type": "integer",
"description": "The ID of the pricelist the product should be visible for",
"example": 1
- }
+ },
+ "nullable": true
},
"moreInfoUrl": {
"type": "string",
@@ -11324,7 +11821,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",
@@ -11333,23 +11831,11 @@
"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-09-11T07:15:21+02:00",
- "readOnly": true
- },
"variants": {
"type": "array",
"description": "A collection of variants",
"items": {
- "$ref": "#\/components\/schemas\/ProductVariantModel"
+ "$ref": "#\/components\/schemas\/ProductVariantPutRequestModel"
}
},
"bundledProducts": {
@@ -11357,7 +11843,8 @@
"description": "A collection of bundled products",
"items": {
"$ref": "#\/components\/schemas\/BundledProductsModel"
- }
+ },
+ "nullable": true
},
"mediaFiles": {
"type": "array",
@@ -11399,15 +11886,25 @@
"ProductModelPatchable": {
"type": "object",
"properties": {
- "productId": {
- "type": "integer",
- "readOnly": true,
- "example": 101
+ "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
},
"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-11-28T13:38:17+01:00"
},
"defaultVatRate": {
"type": "string",
@@ -11426,11 +11923,13 @@
"type": "integer",
"description": "The ID of the pricelist the product should be visible for",
"example": 1
- }
+ },
+ "nullable": true
},
"moreInfoUrl": {
"type": "string",
"maxLength": 255,
+ "nullable": true,
"description": "A valid URL to a web page with more information for this product"
},
"manufacturerId": {
@@ -11467,6 +11966,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": {
@@ -11476,18 +11976,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-09-11T07:15:21+02:00",
- "readOnly": true
- },
"mediaFiles": {
"type": "array",
"description": "A collection of media files",
@@ -11554,7 +12042,7 @@
"ProductVariantModelItem": {
"properties": {
"data": {
- "$ref": "#\/components\/schemas\/ProductVariantModel"
+ "$ref": "#\/components\/schemas\/ProductVariantResponseModel"
}
}
},
@@ -11564,12 +12052,301 @@
"type": "array",
"description": "A collection of product variants",
"items": {
- "$ref": "#\/components\/schemas\/ProductVariantModel"
+ "$ref": "#\/components\/schemas\/ProductVariantResponseModel"
+ }
+ }
+ }
+ },
+ "ProductVariantRequestModel": {
+ "type": "object",
+ "properties": {
+ "sku": {
+ "type": "string",
+ "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,
+ "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
+ }
+ },
+ "required": [
+ "sku",
+ "attributeValueLinks"
+ ]
+ },
+ "ProductVariantPutRequestModel": {
+ "type": "object",
+ "properties": {
+ "sku": {
+ "type": "string",
+ "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,
+ "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"
+ },
+ "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)"
+ },
+ "externalId": {
+ "type": "string",
+ "maxLength": 40,
+ "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"
+ },
+ "isActive": {
+ "type": "boolean",
+ "description": "Is this variant active? Only active variants are visible to customers"
+ },
+ "sortIndex": {
+ "type": "integer",
+ "description": "The sort index of this variant."
+ },
+ "stockStatusId": {
+ "type": "integer",
+ "description": "The ID of the variants stock status. Available stock statuses can be fetched using the \/product-stock-statuses endpoint"
+ },
+ "stockQuantity": {
+ "type": "integer",
+ "maximum": 100000000,
+ "minimum": -100000000,
+ "description": "The current stock quantity for this variant"
+ },
+ "weightInKg": {
+ "type": "number",
+ "format": "float",
+ "minimum": 0,
+ "description": "The variants weight in KG",
+ "example": 0.15
+ },
+ "costPrice": {
+ "type": "string",
+ "minimum": 0,
+ "description": "The cost for this variant. Used for statistic and never displayed to customers"
+ },
+ "ean": {
+ "type": "string",
+ "maxLength": 20,
+ "description": "European article no"
+ },
+ "mpn": {
+ "type": "string",
+ "maxLength": 40,
+ "description": "Manufacturer part no"
+ },
+ "imageFileId": {
+ "type": "integer",
+ "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"
}
}
}
},
- "ProductVariantModel": {
+ "ProductVariantResponseModel": {
"type": "object",
"properties": {
"sku": {
@@ -11577,14 +12354,31 @@
"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,
- "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",
@@ -11615,12 +12409,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",
@@ -11629,7 +12425,7 @@
},
"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,
@@ -11643,7 +12439,16 @@
"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",
@@ -11659,7 +12464,11 @@
"$ref": "#\/components\/schemas\/ProductVariantAttributeValueModel"
}
}
- }
+ },
+ "required": [
+ "sku",
+ "attributeValueLinks"
+ ]
},
"ProductMediaFileLinkModelItem": {
"properties": {
@@ -11993,11 +12802,60 @@
"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": {
+ "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": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/components\/schemas\/ProductUnitLanguageModel"
+ }
+ }
+ }
+ },
"ProductUnitLanguageModelCollection": {
"properties": {
"data": {
@@ -12056,6 +12914,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",
@@ -12071,6 +12944,9 @@
"nullable": true,
"example": 13.6,
"description": "The special price excluding vat (a discounted price)"
+ },
+ "volumePrices": {
+ "$ref": "#\/components\/schemas\/ProductVariantVolumePriceModelCollection"
}
},
"required": [
@@ -12102,6 +12978,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",
@@ -12149,6 +13040,21 @@
"description": "The id of this manufacturer",
"example": 2
},
+ "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
+ },
"name": {
"type": "string",
"maxLength": 30,
@@ -12159,7 +13065,8 @@
"type": "string",
"maxLength": 255,
"description": "The URL to the manufacturers website",
- "example": "https:\/\/example.net"
+ "example": "https:\/\/example.net",
+ "nullable": true
}
},
"required": [
@@ -12235,7 +13142,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": {
@@ -12271,7 +13229,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",
@@ -12302,7 +13260,7 @@
"ProductStockStatusModelItem": {
"properties": {
"data": {
- "$ref": "#\/components\/schemas\/ProductStockStatusModel"
+ "$ref": "#\/components\/schemas\/ProductStockStatusResponseModel"
}
}
},
@@ -12312,7 +13270,7 @@
"type": "array",
"description": "A list of product stock statuses",
"items": {
- "$ref": "#\/components\/schemas\/ProductStockStatusModel"
+ "$ref": "#\/components\/schemas\/ProductStockStatusResponseModel"
}
}
}
@@ -12455,6 +13413,33 @@
"ProductVariantAttributeValueModelUpdatable": {
"type": "object",
"properties": {
+ "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
+ },
+ "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",
@@ -12485,6 +13470,21 @@
"type": "integer",
"description": "The id for this attribute value"
},
+ "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
+ },
"skuSuffix": {
"type": "string",
"description": "The suggested suffix for new Variants using this attribute value",
@@ -12498,10 +13498,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"
+ }
+ }
}
}
}
@@ -12532,6 +13537,21 @@
"readOnly": true,
"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": {
"type": "array",
"description": "A collection of attribute languages",
@@ -12562,6 +13582,21 @@
"type": "integer",
"description": "The id for this attribute"
},
+ "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": {
"type": "object",
"description": "A collection of attribute languages",
@@ -12688,6 +13723,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
@@ -12787,6 +13823,21 @@
"readOnly": true,
"example": 101
},
+ "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
+ },
"visibility": {
"type": "string",
"enum": [
@@ -12816,6 +13867,21 @@
"StockLocationPostRequestModel": {
"type": "object",
"properties": {
+ "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
+ },
"visibility": {
"type": "string",
"enum": [
@@ -12838,7 +13904,10 @@
"default": false
},
"languages": {
- "$ref": "#\/components\/schemas\/StockLocationLanguagesModelCollection"
+ "type": "array",
+ "items": {
+ "$ref": "#\/components\/schemas\/StockLocationLanguagesModel"
+ }
}
},
"required": [
@@ -12850,6 +13919,21 @@
"StockLocationPutRequestModel": {
"type": "object",
"properties": {
+ "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
+ },
"visibility": {
"type": "string",
"enum": [
@@ -12872,7 +13956,10 @@
"default": false
},
"languages": {
- "$ref": "#\/components\/schemas\/StockLocationLanguagesModelCollection"
+ "type": "array",
+ "items": {
+ "$ref": "#\/components\/schemas\/StockLocationLanguagesModel"
+ }
}
},
"required": [
@@ -12885,6 +13972,21 @@
"allOf": [
{
"properties": {
+ "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
+ },
"visibility": {
"type": "string",
"enum": [
@@ -12907,13 +14009,28 @@
"default": false
},
"languages": {
- "$ref": "#\/components\/schemas\/StockLocationLanguagesModelCollection"
+ "type": "array",
+ "items": {
+ "$ref": "#\/components\/schemas\/StockLocationLanguagesModel"
+ }
}
}
},
{
"title": "Property update",
"anyOf": [
+ {
+ "title": "externalId update",
+ "required": [
+ "externalId"
+ ]
+ },
+ {
+ "title": "externalIdType update",
+ "required": [
+ "externalIdType"
+ ]
+ },
{
"title": "visibility update",
"required": [
@@ -13052,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": {
@@ -13424,16 +14557,6 @@
}
},
"securitySchemes": {
- "oauth2": {
- "type": "oauth2",
- "description": "OAuth 2.0 using Client Credentials",
- "flows": {
- "clientCredentials": {
- "tokenUrl": "https:\/\/leksaker.starweb.se\/api\/v2\/token",
- "scopes": {}
- }
- }
- }
},
"responses": {
"ItemDeleted": {
@@ -13481,4 +14604,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Api/Authentication/TokenManager.php b/src/Api/Authentication/TokenManager.php
index 6b4ee361..17f920e4 100644
--- a/src/Api/Authentication/TokenManager.php
+++ b/src/Api/Authentication/TokenManager.php
@@ -2,15 +2,19 @@
namespace Starweb\Api\Authentication;
+use Http\Client\Common\Exception\ClientErrorException;
use Http\Client\Common\Exception\ServerErrorException;
use Http\Client\HttpClient;
use Http\Message\MessageFactory;
use Http\Message\RequestFactory;
use Starweb\Exception\InvalidBaseUriException;
use Starweb\Exception\InvalidCredentialsException;
+use Starweb\HttpClient\Plugin\ErrorPlugin;
class TokenManager
{
+ private const MAX_RETRIES = 25;
+
/**
* @var HttpClient
*/
@@ -70,20 +74,48 @@ public function requestToken(): TokenInterface
http_build_query($parameters)
);
- $response = $this->client->sendRequest($request);
+ $success = false;
+ $tries = 1;
- $responseData = json_decode($response->getBody()->__toString(), true);
+ while (!$success) {
+ $response = $this->client->sendRequest($request);
- if (404 === $response->getStatusCode()) {
- throw new InvalidBaseUriException(sprintf('invalid base uri "%s"', $this->baseUri), $request, $response);
- }
+ $responseJson = $response->getBody()->__toString();
+ $responseData = json_decode($responseJson, true);
- if (500 === $response->getStatusCode()) {
- throw new ServerErrorException('server error', $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 (!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 (!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;
+ }
+
+ $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);
+ $success = true;
}
return new AccessToken($responseData['access_token'], $responseData['expires_in']);
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 e4b552f8..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.
@@ -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
@@ -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,53 +770,56 @@ 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
*
* @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->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)
@@ -825,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.
@@ -853,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
@@ -866,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
@@ -881,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
@@ -898,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)
@@ -909,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
@@ -922,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)
@@ -931,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(mixed $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`
@@ -958,7 +961,7 @@ public function createPricelist(mixed $requestBody, string $fetch = self::FETCH_
*/
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
@@ -971,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, mixed $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, mixed $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)
@@ -1011,7 +1014,7 @@ public function putPricelist(int $pricelistId, mixed $requestBody, string $fetch
*/
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.
@@ -1024,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)
@@ -1034,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.
@@ -1061,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.
@@ -1074,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.
@@ -1120,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\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)
+ 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.
@@ -1149,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.
@@ -1166,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.
@@ -1174,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\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)
+ 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.
@@ -1190,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\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)
+ 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
@@ -1217,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
@@ -1243,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
@@ -1259,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)
@@ -1299,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\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 = null, string $fetch = self::FETCH_OBJECT)
{
- return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturers($requestBody), $fetch);
+ return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductManufacturer($requestBody), $fetch);
}
/**
* Deletes the `ProductManufacturer` object.
@@ -1325,7 +1328,7 @@ public function createProductManufacturers(\Starweb\Api\Generated\Model\ProductM
*/
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.
@@ -1338,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)
@@ -1376,7 +1379,33 @@ 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 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 = null, string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(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->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductUnit($unitId), $fetch);
}
/**
* Retrieves the `ProductUnit` object.
@@ -1389,7 +1418,35 @@ public function listProductUnits(string $fetch = self::FETCH_OBJECT)
*/
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 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 = null, string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductUnit($unitId, $requestBody), $fetch);
+ }
+ /**
+ * Updates the `ProductUnit` object.
+ *
+ * @param int $unitId The units id
+ * @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 = null, string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductUnit($unitId, $requestBody), $fetch);
}
/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
@@ -1399,20 +1456,20 @@ public function getProductUnit(int $unitId, string $fetch = self::FETCH_OBJECT)
*/
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
@@ -1425,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.
@@ -1438,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)
@@ -1478,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\ProductStockStatusModel $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\ProductStockStatusModel $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.
@@ -1504,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.
@@ -1517,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\ProductStockStatusModel $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\ProductStockStatusModel $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\ProductStockStatusModel $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\ProductStockStatusModel $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)
@@ -1556,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
@@ -1582,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
@@ -1595,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
@@ -1637,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.
@@ -1667,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
@@ -1681,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
@@ -1696,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
@@ -1713,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.
@@ -1737,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.
@@ -1763,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.
@@ -1779,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.
@@ -1826,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.
@@ -1854,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
@@ -1871,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.
@@ -1911,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
@@ -1920,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\ProductVariantModel $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\ProductVariantModel $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.
@@ -1948,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
@@ -1956,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
@@ -1965,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\ProductVariantModel $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\ProductVariantModel $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\ProductVariantModel $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\ProductVariantModel $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.
@@ -2010,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.
@@ -2038,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.
@@ -2052,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.
@@ -2097,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.
@@ -2126,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.
@@ -2140,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.
@@ -2148,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.
@@ -2165,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.
@@ -2187,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.
@@ -2215,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.
@@ -2229,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.
@@ -2274,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.
@@ -2302,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
@@ -2316,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.
@@ -2361,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.
@@ -2389,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.
@@ -2403,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.
@@ -2448,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.
@@ -2462,21 +2519,24 @@ 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
*
* @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->executeEndpoint(new \Starweb\Api\Generated\Endpoint\ListProductsVariantsPricelistPrices($productId, $variantId, $queryParameters), $fetch);
}
/**
* Creates a product variant pricelist price.
@@ -2484,15 +2544,18 @@ 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
+ * }
* @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 = null, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
{
- return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody), $fetch);
+ return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\CreateProductVariantPricelistPrice($productId, $variantId, $requestBody, $queryParameters), $fetch);
}
/**
* Deletes a product variant pricelist price permanently.
@@ -2500,14 +2563,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->executeEndpoint(new \Starweb\Api\Generated\Endpoint\DeleteProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch);
}
/**
* Retrieves the `ProductVariantPricelistPrice` object
@@ -2515,14 +2581,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->executeEndpoint(new \Starweb\Api\Generated\Endpoint\GetProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $queryParameters), $fetch);
}
/**
* Updates a product variant pricelist price.
@@ -2531,16 +2600,19 @@ 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
+ * }
* @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 = null, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
{
- return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody), $fetch);
+ return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PatchProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch);
}
/**
* Updates a product variant pricelist price.
@@ -2549,16 +2621,19 @@ 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
+ * }
* @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 = null, array $queryParameters = array(), string $fetch = self::FETCH_OBJECT)
{
- return $this->executePsr7Endpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody), $fetch);
+ return $this->executeEndpoint(new \Starweb\Api\Generated\Endpoint\PutProductsVariantsPricelistPrice($productId, $variantId, $pricelistId, $requestBody, $queryParameters), $fetch);
}
/**
* Returns a list of product variant pricelist prices
@@ -2572,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.
@@ -2580,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.
@@ -2603,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
@@ -2618,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.
@@ -2627,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.
@@ -2645,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.
@@ -2667,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.
@@ -2695,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
@@ -2709,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
@@ -2724,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.
@@ -2733,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.
@@ -2757,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
@@ -2773,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.
@@ -2783,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.
@@ -2802,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
@@ -2825,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.
@@ -2840,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
@@ -2855,7 +2930,25 @@ 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.
+ 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 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 = null, string $fetch = self::FETCH_OBJECT)
+ {
+ 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.
@@ -2864,16 +2957,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\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)
@@ -2882,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
@@ -2895,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)
@@ -2904,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)
@@ -2914,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)
@@ -2924,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
@@ -2952,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
@@ -2965,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
@@ -2979,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, mixed $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
@@ -2995,9 +3088,9 @@ public function patchStockLocation(int $stockLocationId, mixed $requestBody, str
*
* @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);
}
/**
*
@@ -3012,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);
}
/**
*
@@ -3038,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);
}
/**
*
@@ -3051,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}.starwebserver.se/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 312cda2c..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(mixed $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
new file mode 100644
index 00000000..031eae6d
--- /dev/null
+++ b/src/Api/Generated/Endpoint/CreateProductManufacturer.php
@@ -0,0 +1,58 @@
+body = $requestBody;
+ }
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
+ 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(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
+ {
+ $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 (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/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/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 d657c449..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\ProductStockStatusModel $requestBody
+ * @param null|\Starweb\Api\Generated\Model\ProductStockStatusRequestModel $requestBody
*/
- public function __construct(\Starweb\Api\Generated\Model\ProductStockStatusModel $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';
@@ -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);
@@ -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
new file mode 100644
index 00000000..7c0dcb3a
--- /dev/null
+++ b/src/Api/Generated/Endpoint/CreateProductUnit.php
@@ -0,0 +1,58 @@
+body = $requestBody;
+ }
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
+ 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\ProductUnitModelUpdatable) {
+ 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\ProductUnitModelItem
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
+ {
+ $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 (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 1d081e3b..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\ProductVariantModel $requestBody
+ * @param null|\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 = 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';
@@ -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);
@@ -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 05c86f3f..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,15 +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)
+ 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';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -47,13 +60,19 @@ public function getExtraHeaders() : array
*
* @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 fc8c3b6c..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';
@@ -42,15 +42,21 @@ 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)
+ 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) {
- return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json');
+ $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
new file mode 100644
index 00000000..5c1b7fc3
--- /dev/null
+++ b/src/Api/Generated/Endpoint/DeleteProductUnit.php
@@ -0,0 +1,56 @@
+unitId = $unitId;
+ }
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
+ 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(\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 (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 4f9f4d97..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;
@@ -13,14 +13,18 @@ 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;
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'DELETE';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -44,13 +57,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\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 bb8fb6f5..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;
@@ -11,13 +11,17 @@ 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;
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'GET';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -41,13 +54,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 (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 1dbdc33e..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;
@@ -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())
@@ -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 e4a5423f..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;
@@ -13,14 +13,18 @@ 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;
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'GET';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -44,13 +57,19 @@ public function getExtraHeaders() : array
*
* @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 dcfe62c6..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.
@@ -18,14 +18,14 @@ 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())
{
$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 500693a3..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;
/**
@@ -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())
@@ -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 a22201be..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;
@@ -11,13 +11,17 @@ 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;
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'GET';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -41,13 +54,19 @@ public function getExtraHeaders() : array
*
* @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 bd703c9f..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 (201 === $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 02ef800d..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 (201 === $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 358ea809..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, mixed $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 b4d06bfe..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\ProductStockStatusModel $requestBody
+ * @param null|\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 = 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';
@@ -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);
@@ -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
new file mode 100644
index 00000000..8ed0ced9
--- /dev/null
+++ b/src/Api/Generated/Endpoint/PatchProductUnit.php
@@ -0,0 +1,61 @@
+unitId = $unitId;
+ $this->body = $requestBody;
+ }
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
+ 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\ProductUnitModelUpdatable) {
+ 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(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
+ {
+ $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 (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
new file mode 100644
index 00000000..fc5b781e
--- /dev/null
+++ b/src/Api/Generated/Endpoint/PatchProductVariantStock.php
@@ -0,0 +1,72 @@
+productId = $productId;
+ $this->variantId = $variantId;
+ $this->stockLocationId = $stockLocationId;
+ $this->body = $requestBody;
+ }
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
+ 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(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
+ {
+ $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 (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 (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 a74c45c6..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\ProductVariantModel $requestBody
+ * @param null|\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 = 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';
@@ -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);
@@ -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 0f7a3f0d..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';
@@ -45,15 +45,21 @@ 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)
+ 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) {
- return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json');
+ $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 e7c46566..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,16 +14,20 @@ 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)
+ 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;
$this->pricelistId = $pricelistId;
$this->body = $requestBody;
+ $this->queryParameters = $queryParameters;
}
- use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait;
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'PATCH';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -51,16 +64,22 @@ public function getExtraHeaders() : array
*
* @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 9534aa01..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, mixed $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 99e8a570..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 (201 === $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 20a79269..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, mixed $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 381eeb13..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\ProductStockStatusModel $requestBody
+ * @param null|\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 = 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';
@@ -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);
@@ -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
new file mode 100644
index 00000000..9cb11053
--- /dev/null
+++ b/src/Api/Generated/Endpoint/PutProductUnit.php
@@ -0,0 +1,61 @@
+unitId = $unitId;
+ $this->body = $requestBody;
+ }
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
+ 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\ProductUnitModelUpdatable) {
+ 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(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
+ {
+ $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 (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 71154bd6..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\ProductVariantModel $requestBody
+ * @param null|\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 = 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';
@@ -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);
@@ -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 6aedbaaa..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';
@@ -45,15 +45,21 @@ 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)
+ 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) {
- return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection', 'json');
+ $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 153d6af4..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,16 +14,20 @@ 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)
+ 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;
$this->pricelistId = $pricelistId;
$this->body = $requestBody;
+ $this->queryParameters = $queryParameters;
}
- use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait;
+ use \Starweb\Api\Generated\Runtime\Client\EndpointTrait;
public function getMethod() : string
{
return 'PUT';
@@ -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->addAllowedTypes('include', array('string'));
+ return $optionsResolver;
+ }
/**
* {@inheritdoc}
*
@@ -51,16 +64,22 @@ public function getExtraHeaders() : array
*
* @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 e349c511..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 (201 === $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
new file mode 100644
index 00000000..60547c44
--- /dev/null
+++ b/src/Api/Generated/Exception/CreateProductManufacturerBadRequestException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->errorModel;
+ }
+ public function getResponse() : \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
\ 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/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
new file mode 100644
index 00000000..c73f0ba2
--- /dev/null
+++ b/src/Api/Generated/Exception/CreateProductUnitBadRequestException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->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
new file mode 100644
index 00000000..22f5b412
--- /dev/null
+++ b/src/Api/Generated/Exception/DeleteProductUnitNotFoundException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->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
new file mode 100644
index 00000000..8af75275
--- /dev/null
+++ b/src/Api/Generated/Exception/PatchProductUnitNotFoundException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->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
new file mode 100644
index 00000000..3a93bbde
--- /dev/null
+++ b/src/Api/Generated/Exception/PatchProductVariantStockBadRequestException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->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
new file mode 100644
index 00000000..f7b03ccd
--- /dev/null
+++ b/src/Api/Generated/Exception/PatchProductVariantStockNotFoundException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->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
new file mode 100644
index 00000000..390fcd46
--- /dev/null
+++ b/src/Api/Generated/Exception/PutProductUnitNotFoundException.php
@@ -0,0 +1,29 @@
+errorModel = $errorModel;
+ $this->response = $response;
+ }
+ public function getErrorModel() : \Starweb\Api\Generated\Model\ErrorModel
+ {
+ return $this->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 bd535166..44b48350 100644
--- a/src/Api/Generated/Model/AddressModel.php
+++ b/src/Api/Generated/Model/AddressModel.php
@@ -2,356 +2,377 @@
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
*
- * @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->initialized['companyName'] = true;
$this->companyName = $companyName;
return $this;
}
/**
* 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->initialized['firstName'] = true;
$this->firstName = $firstName;
return $this;
}
/**
* 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->initialized['lastName'] = true;
$this->lastName = $lastName;
return $this;
}
/**
* 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->initialized['careOf'] = true;
$this->careOf = $careOf;
return $this;
}
/**
* 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->initialized['attention'] = true;
$this->attention = $attention;
return $this;
}
/**
* 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->initialized['reference'] = true;
$this->reference = $reference;
return $this;
}
/**
* 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->initialized['address'] = true;
$this->address = $address;
return $this;
}
/**
* 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->initialized['postalCode'] = true;
$this->postalCode = $postalCode;
return $this;
}
/**
* 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->initialized['city'] = true;
$this->city = $city;
return $this;
}
/**
* 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->initialized['state'] = true;
$this->state = $state;
return $this;
}
/**
* 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->initialized['countryCode'] = true;
$this->countryCode = $countryCode;
return $this;
}
/**
* 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->initialized['phoneNo'] = true;
$this->phoneNo = $phoneNo;
return $this;
}
/**
* 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->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 32f8846a..3fe04c26 100644
--- a/src/Api/Generated/Model/AddressModelItem.php
+++ b/src/Api/Generated/Model/AddressModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 8e2cd7a5..8a74ce86 100644
--- a/src/Api/Generated/Model/BundledProductsModel.php
+++ b/src/Api/Generated/Model/BundledProductsModel.php
@@ -2,24 +2,32 @@
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
*
- * @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,75 +39,78 @@ 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->initialized['singleVariant'] = true;
$this->singleVariant = $singleVariant;
return $this;
}
/**
* 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->initialized['bundledProductId'] = true;
$this->bundledProductId = $bundledProductId;
return $this;
}
/**
* 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->initialized['variantSku'] = true;
$this->variantSku = $variantSku;
return $this;
}
@@ -121,48 +132,51 @@ public function getQuantity() : ?int
*/
public function setQuantity(?int $quantity) : self
{
+ $this->initialized['quantity'] = true;
$this->quantity = $quantity;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->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 65bf542a..2bcffd9e 100644
--- a/src/Api/Generated/Model/BundledProductsModelCollection.php
+++ b/src/Api/Generated/Model/BundledProductsModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 6588d0eb..ec6eabdd 100644
--- a/src/Api/Generated/Model/BundledProductsModelItem.php
+++ b/src/Api/Generated/Model/BundledProductsModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 2b375348..aadd0383 100644
--- a/src/Api/Generated/Model/ClientCredentialModel.php
+++ b/src/Api/Generated/Model/ClientCredentialModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['grantType'] = true;
$this->grantType = $grantType;
return $this;
}
/**
* 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->initialized['clientId'] = true;
$this->clientId = $clientId;
return $this;
}
/**
* 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->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 6cc05fd6..65cd0295 100644
--- a/src/Api/Generated/Model/CurrencyCollection.php
+++ b/src/Api/Generated/Model/CurrencyCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 a2a89fbd..e98c2418 100644
--- a/src/Api/Generated/Model/CurrencyModel.php
+++ b/src/Api/Generated/Model/CurrencyModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['code'] = true;
$this->code = $code;
return $this;
}
/**
* 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->initialized['exchangeRate'] = true;
$this->exchangeRate = $exchangeRate;
return $this;
}
/**
* 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->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 79a4ac44..b852303d 100644
--- a/src/Api/Generated/Model/CurrencyModelItem.php
+++ b/src/Api/Generated/Model/CurrencyModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 e22c7a16..758533e6 100644
--- a/src/Api/Generated/Model/CustomerAddedTagModel.php
+++ b/src/Api/Generated/Model/CustomerAddedTagModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['tagId'] = true;
$this->tagId = $tagId;
return $this;
}
/**
* 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->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 0fad2977..cb298760 100644
--- a/src/Api/Generated/Model/CustomerAddedTagModelCollection.php
+++ b/src/Api/Generated/Model/CustomerAddedTagModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 7e9975db..bcb27d3f 100644
--- a/src/Api/Generated/Model/CustomerAddedTagModelItem.php
+++ b/src/Api/Generated/Model/CustomerAddedTagModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 6812530c..97b19e5e 100644
--- a/src/Api/Generated/Model/CustomerAddressesModelCollection.php
+++ b/src/Api/Generated/Model/CustomerAddressesModelCollection.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 90d6a498..771cc649 100644
--- a/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php
+++ b/src/Api/Generated/Model/CustomerAddressesModelCollectionData.php
@@ -2,59 +2,69 @@
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);
+ }
/**
*
*
- * @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->initialized['invoice'] = true;
$this->invoice = $invoice;
return $this;
}
/**
*
*
- * @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->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 b3375f4c..cbd91703 100644
--- a/src/Api/Generated/Model/CustomerAddressesModelItem.php
+++ b/src/Api/Generated/Model/CustomerAddressesModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 d8373fe0..f8d1fe06 100644
--- a/src/Api/Generated/Model/CustomerCreatedModel.php
+++ b/src/Api/Generated/Model/CustomerCreatedModel.php
@@ -2,60 +2,68 @@
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
*
- * @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 +75,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;
/**
@@ -76,192 +84,213 @@ 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
*
- * @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->initialized['customerId'] = true;
$this->customerId = $customerId;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->initialized['email'] = true;
$this->email = $email;
return $this;
}
/**
* 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->initialized['nationalIdNo'] = true;
$this->nationalIdNo = $nationalIdNo;
return $this;
}
/**
* 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->initialized['vatNo'] = true;
$this->vatNo = $vatNo;
return $this;
}
/**
* 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->initialized['customInfo1'] = true;
$this->customInfo1 = $customInfo1;
return $this;
}
/**
* 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->initialized['customInfo2'] = true;
$this->customInfo2 = $customInfo2;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$this->modifiedAt = $modifiedAt;
return $this;
}
@@ -283,27 +312,29 @@ public function getApproved() : ?bool
*/
public function setApproved(?bool $approved) : self
{
+ $this->initialized['approved'] = true;
$this->approved = $approved;
return $this;
}
/**
* 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->initialized['approvedAt'] = true;
$this->approvedAt = $approvedAt;
return $this;
}
@@ -325,7 +356,52 @@ public function getPricelistId() : ?int
*/
public function setPricelistId(?int $pricelistId) : self
{
+ $this->initialized['pricelistId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/CustomerCreatedModelItem.php b/src/Api/Generated/Model/CustomerCreatedModelItem.php
index 32850ad0..3101d231 100644
--- a/src/Api/Generated/Model/CustomerCreatedModelItem.php
+++ b/src/Api/Generated/Model/CustomerCreatedModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 72f4704d..d0ee0369 100644
--- a/src/Api/Generated/Model/CustomerExternalServicesModel.php
+++ b/src/Api/Generated/Model/CustomerExternalServicesModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['serviceName'] = true;
$this->serviceName = $serviceName;
return $this;
}
/**
* 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->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 a34e7feb..55ab9937 100644
--- a/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php
+++ b/src/Api/Generated/Model/CustomerExternalServicesModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 413f0279..9acbaa14 100644
--- a/src/Api/Generated/Model/CustomerExternalServicesModelItem.php
+++ b/src/Api/Generated/Model/CustomerExternalServicesModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 cc60f4c3..bf30e016 100644
--- a/src/Api/Generated/Model/CustomerModel.php
+++ b/src/Api/Generated/Model/CustomerModel.php
@@ -2,60 +2,68 @@
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
*
- * @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 +75,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;
/**
@@ -76,192 +84,213 @@ 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
*
- * @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->initialized['customerId'] = true;
$this->customerId = $customerId;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->initialized['email'] = true;
$this->email = $email;
return $this;
}
/**
* 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->initialized['nationalIdNo'] = true;
$this->nationalIdNo = $nationalIdNo;
return $this;
}
/**
* 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->initialized['vatNo'] = true;
$this->vatNo = $vatNo;
return $this;
}
/**
* 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->initialized['customInfo1'] = true;
$this->customInfo1 = $customInfo1;
return $this;
}
/**
* 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->initialized['customInfo2'] = true;
$this->customInfo2 = $customInfo2;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$this->modifiedAt = $modifiedAt;
return $this;
}
@@ -283,27 +312,29 @@ public function getApproved() : ?bool
*/
public function setApproved(?bool $approved) : self
{
+ $this->initialized['approved'] = true;
$this->approved = $approved;
return $this;
}
/**
* 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->initialized['approvedAt'] = true;
$this->approvedAt = $approvedAt;
return $this;
}
@@ -325,7 +356,52 @@ public function getPricelistId() : ?int
*/
public function setPricelistId(?int $pricelistId) : self
{
+ $this->initialized['pricelistId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/CustomerModelCollection.php b/src/Api/Generated/Model/CustomerModelCollection.php
index 4b438885..b56317ce 100644
--- a/src/Api/Generated/Model/CustomerModelCollection.php
+++ b/src/Api/Generated/Model/CustomerModelCollection.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
/**
*
*
- * @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->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 814944c7..e5d961e3 100644
--- a/src/Api/Generated/Model/CustomerModelCollectionMeta.php
+++ b/src/Api/Generated/Model/CustomerModelCollectionMeta.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 b9aaadea..b9840b25 100644
--- a/src/Api/Generated/Model/CustomerModelItem.php
+++ b/src/Api/Generated/Model/CustomerModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 10dd5f63..c9619ed5 100644
--- a/src/Api/Generated/Model/CustomerTagModel.php
+++ b/src/Api/Generated/Model/CustomerTagModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['tagId'] = true;
$this->tagId = $tagId;
return $this;
}
/**
* 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->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 6dd1510d..9cf44079 100644
--- a/src/Api/Generated/Model/CustomerTagModelCollection.php
+++ b/src/Api/Generated/Model/CustomerTagModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 030cdd2b..63faa253 100644
--- a/src/Api/Generated/Model/CustomerTagModelItem.php
+++ b/src/Api/Generated/Model/CustomerTagModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 7b1578e7..3620c96f 100644
--- a/src/Api/Generated/Model/CustomerUpdateModel.php
+++ b/src/Api/Generated/Model/CustomerUpdateModel.php
@@ -2,54 +2,62 @@
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
*
- * @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;
/**
@@ -58,183 +66,203 @@ 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
*
- * @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->initialized['customerId'] = true;
$this->customerId = $customerId;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->initialized['email'] = true;
$this->email = $email;
return $this;
}
/**
* 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->initialized['nationalIdNo'] = true;
$this->nationalIdNo = $nationalIdNo;
return $this;
}
/**
* 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->initialized['vatNo'] = true;
$this->vatNo = $vatNo;
return $this;
}
/**
* 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->initialized['customInfo1'] = true;
$this->customInfo1 = $customInfo1;
return $this;
}
/**
* 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->initialized['customInfo2'] = true;
$this->customInfo2 = $customInfo2;
return $this;
}
@@ -256,48 +284,95 @@ public function getPricelistId() : ?int
*/
public function setPricelistId(?int $pricelistId) : self
{
+ $this->initialized['pricelistId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
*
*
- * @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->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 7748f97e..80c37a4d 100644
--- a/src/Api/Generated/Model/CustomerUpdateModelAddresses.php
+++ b/src/Api/Generated/Model/CustomerUpdateModelAddresses.php
@@ -2,59 +2,69 @@
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);
+ }
/**
*
*
- * @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->initialized['invoice'] = true;
$this->invoice = $invoice;
return $this;
}
/**
*
*
- * @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->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 3b867b2b..0c6932e6 100644
--- a/src/Api/Generated/Model/ErrorModel.php
+++ b/src/Api/Generated/Model/ErrorModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['error'] = true;
$this->error = $error;
return $this;
}
/**
* 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->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 31124a36..de472943 100644
--- a/src/Api/Generated/Model/MediaFileModel.php
+++ b/src/Api/Generated/Model/MediaFileModel.php
@@ -2,248 +2,265 @@
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
*
- * @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->initialized['mediaFileId'] = true;
$this->mediaFileId = $mediaFileId;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$this->modifiedAt = $modifiedAt;
return $this;
}
/**
* 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->initialized['size'] = true;
$this->size = $size;
return $this;
}
/**
* 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->initialized['mime'] = true;
$this->mime = $mime;
return $this;
}
/**
* 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->initialized['height'] = true;
$this->height = $height;
return $this;
}
/**
* 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->initialized['width'] = true;
$this->width = $width;
return $this;
}
/**
* 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->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 f7905b13..8ef3c007 100644
--- a/src/Api/Generated/Model/MediaFileModelCollection.php
+++ b/src/Api/Generated/Model/MediaFileModelCollection.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
/**
*
*
- * @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->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 efaa07fa..036560a9 100644
--- a/src/Api/Generated/Model/MediaFileModelCollectionMeta.php
+++ b/src/Api/Generated/Model/MediaFileModelCollectionMeta.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 a51d7dc5..3cb7fe83 100644
--- a/src/Api/Generated/Model/MediaFileModelItem.php
+++ b/src/Api/Generated/Model/MediaFileModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 8e0d38ad..fee2b721 100644
--- a/src/Api/Generated/Model/MediaFileUploadModel.php
+++ b/src/Api/Generated/Model/MediaFileUploadModel.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 e7936386..e9a5c3c1 100644
--- a/src/Api/Generated/Model/OrderAddressCollection.php
+++ b/src/Api/Generated/Model/OrderAddressCollection.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 381e9afc..4ef97d6a 100644
--- a/src/Api/Generated/Model/OrderAddressModel.php
+++ b/src/Api/Generated/Model/OrderAddressModel.php
@@ -2,167 +2,181 @@
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);
+ }
/**
*
*
- * @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->initialized['originalInvoice'] = true;
$this->originalInvoice = $originalInvoice;
return $this;
}
/**
*
*
- * @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->initialized['originalDelivery'] = true;
$this->originalDelivery = $originalDelivery;
return $this;
}
/**
*
*
- * @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->initialized['customerInvoice'] = true;
$this->customerInvoice = $customerInvoice;
return $this;
}
/**
*
*
- * @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->initialized['customerDelivery'] = true;
$this->customerDelivery = $customerDelivery;
return $this;
}
/**
*
*
- * @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->initialized['paymentMethodInvoice'] = true;
$this->paymentMethodInvoice = $paymentMethodInvoice;
return $this;
}
/**
*
*
- * @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->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 aefa0c77..7151569f 100644
--- a/src/Api/Generated/Model/OrderCommentModel.php
+++ b/src/Api/Generated/Model/OrderCommentModel.php
@@ -2,113 +2,125 @@
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
*
- * @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->initialized['commentId'] = true;
$this->commentId = $commentId;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['text'] = true;
$this->text = $text;
return $this;
}
/**
* 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->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 4afd154e..de8984de 100644
--- a/src/Api/Generated/Model/OrderCommentModelCollection.php
+++ b/src/Api/Generated/Model/OrderCommentModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 ffb4216f..6ead12f0 100644
--- a/src/Api/Generated/Model/OrderCommentModelItem.php
+++ b/src/Api/Generated/Model/OrderCommentModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 7dea00f1..964d4599 100644
--- a/src/Api/Generated/Model/OrderExternalServiceModel.php
+++ b/src/Api/Generated/Model/OrderExternalServiceModel.php
@@ -2,86 +2,125 @@
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
*
- * @var string
+ * @var string|null
*/
protected $serviceName;
/**
* The external id
*
- * @var string
+ * @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
*
- * @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->initialized['serviceName'] = true;
$this->serviceName = $serviceName;
return $this;
}
/**
* 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->initialized['externalIdValue'] = true;
$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->initialized['agent'] = true;
+ $this->agent = $agent;
+ return $this;
+ }
/**
* 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->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 130eb2b3..52ac1794 100644
--- a/src/Api/Generated/Model/OrderExternalServiceModelCollection.php
+++ b/src/Api/Generated/Model/OrderExternalServiceModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 4c860e92..d409e10b 100644
--- a/src/Api/Generated/Model/OrderExternalServicesModelItem.php
+++ b/src/Api/Generated/Model/OrderExternalServicesModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
diff --git a/src/Api/Generated/Model/OrderItemBundledModelItem.php b/src/Api/Generated/Model/OrderItemBundledModelItem.php
new file mode 100644
index 00000000..7f3751c2
--- /dev/null
+++ b/src/Api/Generated/Model/OrderItemBundledModelItem.php
@@ -0,0 +1,43 @@
+initialized);
+ }
+ /**
+ *
+ *
+ * @var OrderItemBundledModelItemBundledItems|null
+ */
+ protected $bundledItems;
+ /**
+ *
+ *
+ * @return OrderItemBundledModelItemBundledItems|null
+ */
+ public function getBundledItems() : ?OrderItemBundledModelItemBundledItems
+ {
+ return $this->bundledItems;
+ }
+ /**
+ *
+ *
+ * @param OrderItemBundledModelItemBundledItems|null $bundledItems
+ *
+ * @return self
+ */
+ public function setBundledItems(?OrderItemBundledModelItemBundledItems $bundledItems) : self
+ {
+ $this->initialized['bundledItems'] = true;
+ $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..8eb8be4b
--- /dev/null
+++ b/src/Api/Generated/Model/OrderItemBundledModelItemBundledItems.php
@@ -0,0 +1,43 @@
+initialized);
+ }
+ /**
+ *
+ *
+ * @var OrderItemModel[]|null
+ */
+ protected $data;
+ /**
+ *
+ *
+ * @return OrderItemModel[]|null
+ */
+ public function getData() : ?array
+ {
+ return $this->data;
+ }
+ /**
+ *
+ *
+ * @param OrderItemModel[]|null $data
+ *
+ * @return self
+ */
+ public function setData(?array $data) : self
+ {
+ $this->initialized['data'] = true;
+ $this->data = $data;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/OrderItemModel.php b/src/Api/Generated/Model/OrderItemModel.php
index 9d23c586..2f1ea9a1 100644
--- a/src/Api/Generated/Model/OrderItemModel.php
+++ b/src/Api/Generated/Model/OrderItemModel.php
@@ -2,275 +2,293 @@
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
*
- * @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->initialized['itemId'] = true;
$this->itemId = $itemId;
return $this;
}
/**
* 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->initialized['sku'] = true;
$this->sku = $sku;
return $this;
}
/**
* 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->initialized['description'] = true;
$this->description = $description;
return $this;
}
/**
* 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->initialized['quantity'] = true;
$this->quantity = $quantity;
return $this;
}
/**
* 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->initialized['unitSymbol'] = true;
$this->unitSymbol = $unitSymbol;
return $this;
}
/**
* 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->initialized['unitPrice'] = true;
$this->unitPrice = $unitPrice;
return $this;
}
/**
* 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->initialized['vatRate'] = true;
$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
+ * @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->initialized['discount'] = true;
$this->discount = $discount;
return $this;
}
/**
* 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->initialized['discountType'] = true;
$this->discountType = $discountType;
return $this;
}
/**
* 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->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 3a4d7a21..19b2a4f8 100644
--- a/src/Api/Generated/Model/OrderItemModelCollection.php
+++ b/src/Api/Generated/Model/OrderItemModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @var OrderItemModel[]
+ * @var OrderItemModelCollectionDataItem[]|null
*/
protected $data;
/**
* A list of order items
*
- * @return OrderItemModel[]
+ * @return OrderItemModelCollectionDataItem[]|null
*/
- public function getData() : array
+ public function getData() : ?array
{
return $this->data;
}
/**
* A list of order items
*
- * @param OrderItemModel[] $data
+ * @param OrderItemModelCollectionDataItem[]|null $data
*
* @return self
*/
- public function setData(array $data) : self
+ 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
new file mode 100644
index 00000000..f54ac9c4
--- /dev/null
+++ b/src/Api/Generated/Model/OrderItemModelCollectionDataItem.php
@@ -0,0 +1,323 @@
+initialized);
+ }
+ /**
+ * The id of the order item
+ *
+ * @var int|null
+ */
+ protected $itemId;
+ /**
+ * The SKU of the order item
+ *
+ * @var string|null
+ */
+ protected $sku;
+ /**
+ * The description of the order item
+ *
+ * @var string|null
+ */
+ protected $description;
+ /**
+ * The quantity of the order item
+ *
+ * @var int|null
+ */
+ protected $quantity;
+ /**
+ * The unit symbol of the order item
+ *
+ * @var string|null
+ */
+ protected $unitSymbol;
+ /**
+ * The price per unit excluding VAT
+ *
+ * @var float|null
+ */
+ protected $unitPrice;
+ /**
+ * The items VAT rate in percent. 25.0 = 25% VAT
+ *
+ * @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|null
+ */
+ protected $discount;
+ /**
+ * The type of discount. Either ”amount” or ”percent”. Default is ”percent”
+ *
+ * @var string|null
+ */
+ protected $discountType;
+ /**
+ * The sort order of the order items
+ *
+ * @var int|null
+ */
+ protected $sortIndex;
+ /**
+ *
+ *
+ * @var OrderItemBundledModelItemBundledItems|null
+ */
+ protected $bundledItems;
+ /**
+ * The id of the order item
+ *
+ * @return int|null
+ */
+ public function getItemId() : ?int
+ {
+ return $this->itemId;
+ }
+ /**
+ * The id of the order item
+ *
+ * @param int|null $itemId
+ *
+ * @return self
+ */
+ public function setItemId(?int $itemId) : self
+ {
+ $this->initialized['itemId'] = true;
+ $this->itemId = $itemId;
+ return $this;
+ }
+ /**
+ * The SKU of the order item
+ *
+ * @return string|null
+ */
+ public function getSku() : ?string
+ {
+ return $this->sku;
+ }
+ /**
+ * The SKU of the order item
+ *
+ * @param string|null $sku
+ *
+ * @return self
+ */
+ public function setSku(?string $sku) : self
+ {
+ $this->initialized['sku'] = true;
+ $this->sku = $sku;
+ return $this;
+ }
+ /**
+ * The description of the order item
+ *
+ * @return string|null
+ */
+ public function getDescription() : ?string
+ {
+ return $this->description;
+ }
+ /**
+ * The description of the order item
+ *
+ * @param string|null $description
+ *
+ * @return self
+ */
+ public function setDescription(?string $description) : self
+ {
+ $this->initialized['description'] = true;
+ $this->description = $description;
+ return $this;
+ }
+ /**
+ * The quantity of the order item
+ *
+ * @return int|null
+ */
+ public function getQuantity() : ?int
+ {
+ return $this->quantity;
+ }
+ /**
+ * The quantity of the order item
+ *
+ * @param int|null $quantity
+ *
+ * @return self
+ */
+ public function setQuantity(?int $quantity) : self
+ {
+ $this->initialized['quantity'] = true;
+ $this->quantity = $quantity;
+ return $this;
+ }
+ /**
+ * The unit symbol of the order item
+ *
+ * @return string|null
+ */
+ public function getUnitSymbol() : ?string
+ {
+ return $this->unitSymbol;
+ }
+ /**
+ * The unit symbol of the order item
+ *
+ * @param string|null $unitSymbol
+ *
+ * @return self
+ */
+ public function setUnitSymbol(?string $unitSymbol) : self
+ {
+ $this->initialized['unitSymbol'] = true;
+ $this->unitSymbol = $unitSymbol;
+ return $this;
+ }
+ /**
+ * The price per unit excluding VAT
+ *
+ * @return float|null
+ */
+ public function getUnitPrice() : ?float
+ {
+ return $this->unitPrice;
+ }
+ /**
+ * The price per unit excluding VAT
+ *
+ * @param float|null $unitPrice
+ *
+ * @return self
+ */
+ public function setUnitPrice(?float $unitPrice) : self
+ {
+ $this->initialized['unitPrice'] = true;
+ $this->unitPrice = $unitPrice;
+ return $this;
+ }
+ /**
+ * The items VAT rate in percent. 25.0 = 25% VAT
+ *
+ * @return float|null
+ */
+ public function getVatRate() : ?float
+ {
+ return $this->vatRate;
+ }
+ /**
+ * The items VAT rate in percent. 25.0 = 25% VAT
+ *
+ * @param float|null $vatRate
+ *
+ * @return self
+ */
+ public function setVatRate(?float $vatRate) : self
+ {
+ $this->initialized['vatRate'] = true;
+ $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|null
+ */
+ 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|null $discount
+ *
+ * @return self
+ */
+ public function setDiscount(?float $discount) : self
+ {
+ $this->initialized['discount'] = true;
+ $this->discount = $discount;
+ return $this;
+ }
+ /**
+ * The type of discount. Either ”amount” or ”percent”. Default is ”percent”
+ *
+ * @return string|null
+ */
+ public function getDiscountType() : ?string
+ {
+ return $this->discountType;
+ }
+ /**
+ * The type of discount. Either ”amount” or ”percent”. Default is ”percent”
+ *
+ * @param string|null $discountType
+ *
+ * @return self
+ */
+ public function setDiscountType(?string $discountType) : self
+ {
+ $this->initialized['discountType'] = true;
+ $this->discountType = $discountType;
+ return $this;
+ }
+ /**
+ * The sort order of the order items
+ *
+ * @return int|null
+ */
+ public function getSortIndex() : ?int
+ {
+ return $this->sortIndex;
+ }
+ /**
+ * The sort order of the order items
+ *
+ * @param int|null $sortIndex
+ *
+ * @return self
+ */
+ public function setSortIndex(?int $sortIndex) : self
+ {
+ $this->initialized['sortIndex'] = true;
+ $this->sortIndex = $sortIndex;
+ return $this;
+ }
+ /**
+ *
+ *
+ * @return OrderItemBundledModelItemBundledItems|null
+ */
+ public function getBundledItems() : ?OrderItemBundledModelItemBundledItems
+ {
+ return $this->bundledItems;
+ }
+ /**
+ *
+ *
+ * @param OrderItemBundledModelItemBundledItems|null $bundledItems
+ *
+ * @return self
+ */
+ public function setBundledItems(?OrderItemBundledModelItemBundledItems $bundledItems) : self
+ {
+ $this->initialized['bundledItems'] = true;
+ $this->bundledItems = $bundledItems;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/OrderItemModelItem.php b/src/Api/Generated/Model/OrderItemModelItem.php
index 66fd5a54..59e3f875 100644
--- a/src/Api/Generated/Model/OrderItemModelItem.php
+++ b/src/Api/Generated/Model/OrderItemModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 59cdf4e9..baf1c036 100644
--- a/src/Api/Generated/Model/OrderModel.php
+++ b/src/Api/Generated/Model/OrderModel.php
@@ -2,1490 +2,1693 @@
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
*
- * @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;
+ /**
+ * 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
*
- * @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;
+ /**
+ * Id of stock location this order was made for
+ *
+ * @var int|null
+ */
+ protected $stockLocationId;
/**
* 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;
+ /**
+ * 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;
/**
*
*
- * @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->initialized['orderId'] = true;
$this->orderId = $orderId;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$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->initialized['paymentMethodExternalId'] = true;
+ $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->initialized['shippingMethodExternalId'] = true;
+ $this->shippingMethodExternalId = $shippingMethodExternalId;
+ return $this;
+ }
/**
* 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->initialized['baseCurrencyCode'] = true;
$this->baseCurrencyCode = $baseCurrencyCode;
return $this;
}
/**
* 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->initialized['shopCountryCode'] = true;
$this->shopCountryCode = $shopCountryCode;
return $this;
}
/**
* 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->initialized['totalAmount'] = true;
$this->totalAmount = $totalAmount;
return $this;
}
/**
* 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->initialized['totalVat'] = true;
$this->totalVat = $totalVat;
return $this;
}
/**
* 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->initialized['amountToPay'] = true;
$this->amountToPay = $amountToPay;
return $this;
}
/**
* 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->initialized['totalAmountInBaseCurrency'] = true;
$this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency;
return $this;
}
/**
* 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->initialized['totalVatInBaseCurrency'] = true;
$this->totalVatInBaseCurrency = $totalVatInBaseCurrency;
return $this;
}
/**
* 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->initialized['amountToPayInBaseCurrency'] = true;
$this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['customerId'] = true;
$this->customerId = $customerId;
return $this;
}
/**
* 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->initialized['statusId'] = true;
$this->statusId = $statusId;
return $this;
}
/**
* 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->initialized['onOrderStatusChangeSendEmail'] = true;
$this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail;
return $this;
}
/**
* 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->initialized['onOrderStatusChangeProcessPayment'] = true;
$this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment;
return $this;
}
/**
* 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->initialized['sendEmailsOnStatusChange'] = true;
$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->initialized['stockLocationId'] = true;
+ $this->stockLocationId = $stockLocationId;
+ return $this;
+ }
/**
* 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->initialized['shippingMethodId'] = true;
$this->shippingMethodId = $shippingMethodId;
return $this;
}
/**
* 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->initialized['paymentMethodId'] = true;
$this->paymentMethodId = $paymentMethodId;
return $this;
}
/**
* 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->initialized['paymentMethodIdCode'] = true;
$this->paymentMethodIdCode = $paymentMethodIdCode;
return $this;
}
/**
* 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->initialized['paymentMethodName'] = true;
$this->paymentMethodName = $paymentMethodName;
return $this;
}
/**
* 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->initialized['paymentFee'] = true;
$this->paymentFee = $paymentFee;
return $this;
}
/**
* 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->initialized['paymentVatRate'] = true;
$this->paymentVatRate = $paymentVatRate;
return $this;
}
/**
* 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->initialized['shippingMethodName'] = true;
$this->shippingMethodName = $shippingMethodName;
return $this;
}
/**
* 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->initialized['shippingCost'] = true;
$this->shippingCost = $shippingCost;
return $this;
}
/**
* 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->initialized['shippingVatRate'] = true;
$this->shippingVatRate = $shippingVatRate;
return $this;
}
/**
* 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->initialized['totalWeight'] = true;
$this->totalWeight = $totalWeight;
return $this;
}
/**
* 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->initialized['customInfo1'] = true;
$this->customInfo1 = $customInfo1;
return $this;
}
/**
* 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->initialized['customInfo2'] = true;
$this->customInfo2 = $customInfo2;
return $this;
}
/**
* 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->initialized['customInfo3'] = true;
$this->customInfo3 = $customInfo3;
return $this;
}
/**
* 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->initialized['customInfo4'] = true;
$this->customInfo4 = $customInfo4;
return $this;
}
/**
* 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->initialized['discountCode'] = true;
$this->discountCode = $discountCode;
return $this;
}
/**
* 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->initialized['amountPaid'] = true;
$this->amountPaid = $amountPaid;
return $this;
}
/**
* 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->initialized['amountPaidInBaseCurrency'] = true;
$this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency;
return $this;
}
/**
* 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->initialized['isComplete'] = true;
$this->isComplete = $isComplete;
return $this;
}
/**
* 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->initialized['currencyCode'] = true;
$this->currencyCode = $currencyCode;
return $this;
}
/**
* 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->initialized['currencyExchangeRate'] = true;
$this->currencyExchangeRate = $currencyExchangeRate;
return $this;
}
/**
* 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->initialized['currencyPrecision'] = true;
$this->currencyPrecision = $currencyPrecision;
return $this;
}
/**
* 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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['paymentReference'] = true;
$this->paymentReference = $paymentReference;
return $this;
}
/**
* 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->initialized['paymentStatus'] = true;
$this->paymentStatus = $paymentStatus;
return $this;
}
/**
* 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->initialized['isRead'] = true;
$this->isRead = $isRead;
return $this;
}
/**
* 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->initialized['hasComments'] = true;
$this->hasComments = $hasComments;
return $this;
}
/**
* 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->initialized['internalComment'] = true;
$this->internalComment = $internalComment;
return $this;
}
/**
* 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->initialized['shippingTrackerType'] = true;
$this->shippingTrackerType = $shippingTrackerType;
return $this;
}
/**
* 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->initialized['shippingTrackingNo'] = true;
$this->shippingTrackingNo = $shippingTrackingNo;
return $this;
}
/**
* 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->initialized['originalCustomerEmail'] = true;
$this->originalCustomerEmail = $originalCustomerEmail;
return $this;
}
/**
* 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->initialized['originalCustomerNationalIdNo'] = true;
$this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo;
return $this;
}
/**
* 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->initialized['originalCustomerVatNo'] = true;
$this->originalCustomerVatNo = $originalCustomerVatNo;
return $this;
}
/**
* 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->initialized['originalCustomerCustomInfo1'] = true;
$this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1;
return $this;
}
/**
* 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->initialized['originalCustomerCustomInfo2'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
*
*
- * @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->initialized['items'] = true;
$this->items = $items;
return $this;
}
/**
*
*
- * @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->initialized['addresses'] = true;
$this->addresses = $addresses;
return $this;
}
/**
*
*
- * @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->initialized['externalServices'] = true;
$this->externalServices = $externalServices;
return $this;
}
/**
*
*
- * @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->initialized['customer'] = true;
$this->customer = $customer;
return $this;
}
/**
*
*
- * @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->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 8334513d..af31551d 100644
--- a/src/Api/Generated/Model/OrderModelCollection.php
+++ b/src/Api/Generated/Model/OrderModelCollection.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
/**
*
*
- * @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->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 7362e717..649afdcb 100644
--- a/src/Api/Generated/Model/OrderModelCollectionMeta.php
+++ b/src/Api/Generated/Model/OrderModelCollectionMeta.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 e5bf3dcc..c3275d83 100644
--- a/src/Api/Generated/Model/OrderModelItem.php
+++ b/src/Api/Generated/Model/OrderModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 9f439e48..5e802feb 100644
--- a/src/Api/Generated/Model/OrderPutModel.php
+++ b/src/Api/Generated/Model/OrderPutModel.php
@@ -2,1382 +2,1441 @@
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
*
- * @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->initialized['orderId'] = true;
$this->orderId = $orderId;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$this->modifiedAt = $modifiedAt;
return $this;
}
/**
* 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->initialized['baseCurrencyCode'] = true;
$this->baseCurrencyCode = $baseCurrencyCode;
return $this;
}
/**
* 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->initialized['shopCountryCode'] = true;
$this->shopCountryCode = $shopCountryCode;
return $this;
}
/**
* 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->initialized['totalAmount'] = true;
$this->totalAmount = $totalAmount;
return $this;
}
/**
* 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->initialized['totalVat'] = true;
$this->totalVat = $totalVat;
return $this;
}
/**
* 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->initialized['amountToPay'] = true;
$this->amountToPay = $amountToPay;
return $this;
}
/**
* 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->initialized['totalAmountInBaseCurrency'] = true;
$this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency;
return $this;
}
/**
* 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->initialized['totalVatInBaseCurrency'] = true;
$this->totalVatInBaseCurrency = $totalVatInBaseCurrency;
return $this;
}
/**
* 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->initialized['amountToPayInBaseCurrency'] = true;
$this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['customerId'] = true;
$this->customerId = $customerId;
return $this;
}
/**
* 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->initialized['statusId'] = true;
$this->statusId = $statusId;
return $this;
}
/**
* 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->initialized['onOrderStatusChangeSendEmail'] = true;
$this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail;
return $this;
}
/**
* 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->initialized['onOrderStatusChangeProcessPayment'] = true;
$this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment;
return $this;
}
/**
* 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->initialized['shippingMethodId'] = true;
$this->shippingMethodId = $shippingMethodId;
return $this;
}
/**
* 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->initialized['paymentMethodId'] = true;
$this->paymentMethodId = $paymentMethodId;
return $this;
}
/**
* 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->initialized['paymentMethodIdCode'] = true;
$this->paymentMethodIdCode = $paymentMethodIdCode;
return $this;
}
/**
* 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->initialized['paymentMethodName'] = true;
$this->paymentMethodName = $paymentMethodName;
return $this;
}
/**
* 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->initialized['paymentFee'] = true;
$this->paymentFee = $paymentFee;
return $this;
}
/**
* 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->initialized['paymentVatRate'] = true;
$this->paymentVatRate = $paymentVatRate;
return $this;
}
/**
* 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->initialized['shippingMethodName'] = true;
$this->shippingMethodName = $shippingMethodName;
return $this;
}
/**
* 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->initialized['shippingCost'] = true;
$this->shippingCost = $shippingCost;
return $this;
}
/**
* 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->initialized['shippingVatRate'] = true;
$this->shippingVatRate = $shippingVatRate;
return $this;
}
/**
* 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->initialized['totalWeight'] = true;
$this->totalWeight = $totalWeight;
return $this;
}
/**
* 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->initialized['customInfo1'] = true;
$this->customInfo1 = $customInfo1;
return $this;
}
/**
* 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->initialized['customInfo2'] = true;
$this->customInfo2 = $customInfo2;
return $this;
}
/**
* 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->initialized['customInfo3'] = true;
$this->customInfo3 = $customInfo3;
return $this;
}
/**
* 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->initialized['customInfo4'] = true;
$this->customInfo4 = $customInfo4;
return $this;
}
/**
* 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->initialized['discountCode'] = true;
$this->discountCode = $discountCode;
return $this;
}
/**
* 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->initialized['amountPaid'] = true;
$this->amountPaid = $amountPaid;
return $this;
}
/**
* 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->initialized['amountPaidInBaseCurrency'] = true;
$this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency;
return $this;
}
/**
* 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->initialized['isComplete'] = true;
$this->isComplete = $isComplete;
return $this;
}
/**
* 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->initialized['currencyCode'] = true;
$this->currencyCode = $currencyCode;
return $this;
}
/**
* 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->initialized['currencyExchangeRate'] = true;
$this->currencyExchangeRate = $currencyExchangeRate;
return $this;
}
/**
* 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->initialized['currencyPrecision'] = true;
$this->currencyPrecision = $currencyPrecision;
return $this;
}
/**
* 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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['paymentReference'] = true;
$this->paymentReference = $paymentReference;
return $this;
}
/**
* 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->initialized['paymentStatus'] = true;
$this->paymentStatus = $paymentStatus;
return $this;
}
/**
* 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->initialized['isRead'] = true;
$this->isRead = $isRead;
return $this;
}
/**
* 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->initialized['hasComment'] = true;
$this->hasComment = $hasComment;
return $this;
}
/**
* 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->initialized['internalComment'] = true;
$this->internalComment = $internalComment;
return $this;
}
/**
* 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->initialized['shippingTrackerType'] = true;
$this->shippingTrackerType = $shippingTrackerType;
return $this;
}
/**
* 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->initialized['shippingTrackingNo'] = true;
$this->shippingTrackingNo = $shippingTrackingNo;
return $this;
}
/**
* 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->initialized['originalCustomerEmail'] = true;
$this->originalCustomerEmail = $originalCustomerEmail;
return $this;
}
/**
* 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->initialized['originalCustomerNationalIdNo'] = true;
$this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo;
return $this;
}
/**
* 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->initialized['originalCustomerVatNo'] = true;
$this->originalCustomerVatNo = $originalCustomerVatNo;
return $this;
}
/**
* 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->initialized['originalCustomerCustomInfo1'] = true;
$this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1;
return $this;
}
/**
* 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->initialized['originalCustomerCustomInfo2'] = true;
$this->originalCustomerCustomInfo2 = $originalCustomerCustomInfo2;
return $this;
}
/**
* 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->initialized['items'] = true;
$this->items = $items;
return $this;
}
/**
*
*
- * @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->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 b3442583..2f400a73 100644
--- a/src/Api/Generated/Model/OrderStatusLanguageModel.php
+++ b/src/Api/Generated/Model/OrderStatusLanguageModel.php
@@ -2,59 +2,69 @@
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.
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
diff --git a/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php
new file mode 100644
index 00000000..28c2b7d6
--- /dev/null
+++ b/src/Api/Generated/Model/OrderStatusLanguageModelCollection.php
@@ -0,0 +1,43 @@
+initialized);
+ }
+ /**
+ *
+ *
+ * @var OrderStatusLanguageModel[]|null
+ */
+ protected $data;
+ /**
+ *
+ *
+ * @return OrderStatusLanguageModel[]|null
+ */
+ public function getData() : ?array
+ {
+ return $this->data;
+ }
+ /**
+ *
+ *
+ * @param OrderStatusLanguageModel[]|null $data
+ *
+ * @return self
+ */
+ public function setData(?array $data) : self
+ {
+ $this->initialized['data'] = true;
+ $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..5abd9da9 100644
--- a/src/Api/Generated/Model/OrderStatusModel.php
+++ b/src/Api/Generated/Model/OrderStatusModel.php
@@ -2,113 +2,125 @@
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
*
- * @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 OrderStatusLanguageModel[]
+ * @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->initialized['statusId'] = true;
$this->statusId = $statusId;
return $this;
}
/**
* 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->initialized['shouldSendEmail'] = true;
$this->shouldSendEmail = $shouldSendEmail;
return $this;
}
/**
* 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->initialized['idCode'] = true;
$this->idCode = $idCode;
return $this;
}
/**
*
*
- * @return OrderStatusLanguageModel[]
+ * @return OrderStatusLanguageModelCollection|null
*/
- public function getLanguages() : array
+ public function getLanguages() : ?OrderStatusLanguageModelCollection
{
return $this->languages;
}
/**
*
*
- * @param OrderStatusLanguageModel[] $languages
+ * @param OrderStatusLanguageModelCollection|null $languages
*
* @return self
*/
- public function setLanguages(array $languages) : self
+ 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 18c0d717..380f58a5 100644
--- a/src/Api/Generated/Model/OrderStatusModelCollection.php
+++ b/src/Api/Generated/Model/OrderStatusModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 22687d53..091c1dee 100644
--- a/src/Api/Generated/Model/OrderStatusModelItem.php
+++ b/src/Api/Generated/Model/OrderStatusModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 ac435ca9..8aa09866 100644
--- a/src/Api/Generated/Model/OrderUpdateModel.php
+++ b/src/Api/Generated/Model/OrderUpdateModel.php
@@ -2,1382 +2,1497 @@
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
*
- * @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;
+ /**
+ * 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
*
- * @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->initialized['orderId'] = true;
$this->orderId = $orderId;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$this->modifiedAt = $modifiedAt;
return $this;
}
/**
* 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->initialized['baseCurrencyCode'] = true;
$this->baseCurrencyCode = $baseCurrencyCode;
return $this;
}
/**
* 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->initialized['shopCountryCode'] = true;
$this->shopCountryCode = $shopCountryCode;
return $this;
}
/**
* 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->initialized['totalAmount'] = true;
$this->totalAmount = $totalAmount;
return $this;
}
/**
* 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->initialized['totalVat'] = true;
$this->totalVat = $totalVat;
return $this;
}
/**
* 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->initialized['amountToPay'] = true;
$this->amountToPay = $amountToPay;
return $this;
}
/**
* 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->initialized['totalAmountInBaseCurrency'] = true;
$this->totalAmountInBaseCurrency = $totalAmountInBaseCurrency;
return $this;
}
/**
* 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->initialized['totalVatInBaseCurrency'] = true;
$this->totalVatInBaseCurrency = $totalVatInBaseCurrency;
return $this;
}
/**
* 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->initialized['amountToPayInBaseCurrency'] = true;
$this->amountToPayInBaseCurrency = $amountToPayInBaseCurrency;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
/**
* 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->initialized['customerId'] = true;
$this->customerId = $customerId;
return $this;
}
/**
* 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->initialized['statusId'] = true;
$this->statusId = $statusId;
return $this;
}
/**
* 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->initialized['onOrderStatusChangeSendEmail'] = true;
$this->onOrderStatusChangeSendEmail = $onOrderStatusChangeSendEmail;
return $this;
}
/**
* 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->initialized['onOrderStatusChangeProcessPayment'] = true;
$this->onOrderStatusChangeProcessPayment = $onOrderStatusChangeProcessPayment;
return $this;
}
/**
* 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->initialized['shippingMethodId'] = true;
$this->shippingMethodId = $shippingMethodId;
return $this;
}
/**
* 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->initialized['paymentMethodId'] = true;
$this->paymentMethodId = $paymentMethodId;
return $this;
}
/**
* 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->initialized['paymentMethodIdCode'] = true;
$this->paymentMethodIdCode = $paymentMethodIdCode;
return $this;
}
/**
* 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->initialized['paymentMethodName'] = true;
$this->paymentMethodName = $paymentMethodName;
return $this;
}
/**
* 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->initialized['paymentFee'] = true;
$this->paymentFee = $paymentFee;
return $this;
}
/**
* 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->initialized['paymentVatRate'] = true;
$this->paymentVatRate = $paymentVatRate;
return $this;
}
/**
* 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->initialized['shippingMethodName'] = true;
$this->shippingMethodName = $shippingMethodName;
return $this;
}
/**
* 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->initialized['shippingCost'] = true;
$this->shippingCost = $shippingCost;
return $this;
}
/**
* 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->initialized['shippingVatRate'] = true;
$this->shippingVatRate = $shippingVatRate;
return $this;
}
/**
* 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->initialized['totalWeight'] = true;
$this->totalWeight = $totalWeight;
return $this;
}
/**
* 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->initialized['customInfo1'] = true;
$this->customInfo1 = $customInfo1;
return $this;
}
/**
* 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->initialized['customInfo2'] = true;
$this->customInfo2 = $customInfo2;
return $this;
}
/**
* 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->initialized['customInfo3'] = true;
$this->customInfo3 = $customInfo3;
return $this;
}
/**
* 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->initialized['customInfo4'] = true;
$this->customInfo4 = $customInfo4;
return $this;
}
/**
* 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->initialized['discountCode'] = true;
$this->discountCode = $discountCode;
return $this;
}
/**
* 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->initialized['amountPaid'] = true;
$this->amountPaid = $amountPaid;
return $this;
}
/**
* 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->initialized['amountPaidInBaseCurrency'] = true;
$this->amountPaidInBaseCurrency = $amountPaidInBaseCurrency;
return $this;
}
/**
* 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->initialized['isComplete'] = true;
$this->isComplete = $isComplete;
return $this;
}
/**
* 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->initialized['currencyCode'] = true;
$this->currencyCode = $currencyCode;
return $this;
}
/**
* 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->initialized['currencyExchangeRate'] = true;
$this->currencyExchangeRate = $currencyExchangeRate;
return $this;
}
/**
* 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->initialized['currencyPrecision'] = true;
$this->currencyPrecision = $currencyPrecision;
return $this;
}
/**
* 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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['paymentReference'] = true;
$this->paymentReference = $paymentReference;
return $this;
}
/**
* 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->initialized['paymentStatus'] = true;
$this->paymentStatus = $paymentStatus;
return $this;
}
/**
* 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->initialized['isRead'] = true;
$this->isRead = $isRead;
return $this;
}
/**
* 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->initialized['hasComment'] = true;
$this->hasComment = $hasComment;
return $this;
}
/**
* 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->initialized['internalComment'] = true;
$this->internalComment = $internalComment;
return $this;
}
/**
* 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->initialized['shippingTrackerType'] = true;
$this->shippingTrackerType = $shippingTrackerType;
return $this;
}
/**
* 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->initialized['shippingTrackingNo'] = true;
$this->shippingTrackingNo = $shippingTrackingNo;
return $this;
}
/**
* 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->initialized['originalCustomerEmail'] = true;
$this->originalCustomerEmail = $originalCustomerEmail;
return $this;
}
/**
* 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->initialized['originalCustomerNationalIdNo'] = true;
$this->originalCustomerNationalIdNo = $originalCustomerNationalIdNo;
return $this;
}
/**
* 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->initialized['originalCustomerVatNo'] = true;
$this->originalCustomerVatNo = $originalCustomerVatNo;
return $this;
}
/**
* 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->initialized['originalCustomerCustomInfo1'] = true;
$this->originalCustomerCustomInfo1 = $originalCustomerCustomInfo1;
return $this;
}
/**
* 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->initialized['originalCustomerCustomInfo2'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['items'] = true;
$this->items = $items;
return $this;
}
/**
*
*
- * @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->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 e05867e2..3c12461b 100644
--- a/src/Api/Generated/Model/PaginationModel.php
+++ b/src/Api/Generated/Model/PaginationModel.php
@@ -2,140 +2,153 @@
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
*
- * @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->initialized['currentPage'] = true;
$this->currentPage = $currentPage;
return $this;
}
/**
* 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->initialized['perPage'] = true;
$this->perPage = $perPage;
return $this;
}
/**
* 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->initialized['total'] = true;
$this->total = $total;
return $this;
}
/**
* 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->initialized['count'] = true;
$this->count = $count;
return $this;
}
/**
* 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->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 d1feca69..43ef2405 100644
--- a/src/Api/Generated/Model/PaymentMethodLanguageModel.php
+++ b/src/Api/Generated/Model/PaymentMethodLanguageModel.php
@@ -2,113 +2,125 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['title'] = true;
$this->title = $title;
return $this;
}
/**
* 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->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 ad9d7cbb..d3b6fb00 100644
--- a/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php
+++ b/src/Api/Generated/Model/PaymentMethodLanguageModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 520ad50a..843dd8d4 100644
--- a/src/Api/Generated/Model/PaymentMethodModel.php
+++ b/src/Api/Generated/Model/PaymentMethodModel.php
@@ -2,42 +2,50 @@
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
*
- * @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 +75,7 @@ class PaymentMethodModel
/**
* The shipping methods this is valid for. Valid values are: all, selected
*
- * @var string
+ * @var string|null
*/
protected $validForShippingMethods;
/**
@@ -79,138 +87,150 @@ class PaymentMethodModel
/**
* Tells whether this method is a "click and collect" or not
*
- * @var bool
+ * @var bool|null
*/
protected $isClickAndCollect;
+ /**
+ * External id for systems like Specter, Fortnox etc
+ *
+ * @var string|null
+ */
+ protected $externalId;
/**
*
*
- * @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->initialized['paymentMethodId'] = true;
$this->paymentMethodId = $paymentMethodId;
return $this;
}
/**
* 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->initialized['idCode'] = true;
$this->idCode = $idCode;
return $this;
}
/**
* 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->initialized['active'] = true;
$this->active = $active;
return $this;
}
/**
* 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->initialized['fee'] = true;
$this->fee = $fee;
return $this;
}
/**
* 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->initialized['validForCountries'] = true;
$this->validForCountries = $validForCountries;
return $this;
}
/**
* 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->initialized['validCountriesSelected'] = true;
$this->validCountriesSelected = $validCountriesSelected;
return $this;
}
@@ -232,6 +252,7 @@ public function getValidForMinItemsSubtotal() : ?float
*/
public function setValidForMinItemsSubtotal(?float $validForMinItemsSubtotal) : self
{
+ $this->initialized['validForMinItemsSubtotal'] = true;
$this->validForMinItemsSubtotal = $validForMinItemsSubtotal;
return $this;
}
@@ -253,6 +274,7 @@ public function getValidForMaxItemsSubtotal() : ?float
*/
public function setValidForMaxItemsSubtotal(?float $validForMaxItemsSubtotal) : self
{
+ $this->initialized['validForMaxItemsSubtotal'] = true;
$this->validForMaxItemsSubtotal = $validForMaxItemsSubtotal;
return $this;
}
@@ -274,6 +296,7 @@ public function getValidForMinWeight() : ?float
*/
public function setValidForMinWeight(?float $validForMinWeight) : self
{
+ $this->initialized['validForMinWeight'] = true;
$this->validForMinWeight = $validForMinWeight;
return $this;
}
@@ -295,27 +318,29 @@ public function getValidForMaxWeight() : ?float
*/
public function setValidForMaxWeight(?float $validForMaxWeight) : self
{
+ $this->initialized['validForMaxWeight'] = true;
$this->validForMaxWeight = $validForMaxWeight;
return $this;
}
/**
* 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->initialized['validForShippingMethods'] = true;
$this->validForShippingMethods = $validForShippingMethods;
return $this;
}
@@ -337,48 +362,73 @@ public function getValidForCustomerType() : ?string
*/
public function setValidForCustomerType(?string $validForCustomerType) : self
{
+ $this->initialized['validForCustomerType'] = true;
$this->validForCustomerType = $validForCustomerType;
return $this;
}
/**
* 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->initialized['isClickAndCollect'] = true;
$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->initialized['externalId'] = true;
+ $this->externalId = $externalId;
+ return $this;
+ }
/**
*
*
- * @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->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 626956b4..caf0973a 100644
--- a/src/Api/Generated/Model/PaymentMethodModelCollection.php
+++ b/src/Api/Generated/Model/PaymentMethodModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 7c5d177a..3002a7fd 100644
--- a/src/Api/Generated/Model/PaymentMethodModelItem.php
+++ b/src/Api/Generated/Model/PaymentMethodModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 535042e5..3a948cba 100644
--- a/src/Api/Generated/Model/PricelistModel.php
+++ b/src/Api/Generated/Model/PricelistModel.php
@@ -2,275 +2,349 @@
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
*
- * @var int
+ * @var int|null
*/
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 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;
/**
* Does this pricelist has a parent price list.
*
- * @var int
+ * @var int|null
*/
protected $parentPricelistId;
/**
* 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->initialized['pricelistId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['isMaster'] = true;
$this->isMaster = $isMaster;
return $this;
}
/**
* 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->initialized['isActive'] = true;
$this->isActive = $isActive;
return $this;
}
/**
* 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->initialized['region'] = true;
$this->region = $region;
return $this;
}
/**
* 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->initialized['countryCodes'] = true;
$this->countryCodes = $countryCodes;
return $this;
}
/**
* 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->initialized['currencyCode'] = true;
$this->currencyCode = $currencyCode;
return $this;
}
/**
* 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->initialized['parentPricelistId'] = true;
$this->parentPricelistId = $parentPricelistId;
return $this;
}
/**
* 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->initialized['isCustomerPricelist'] = true;
$this->isCustomerPricelist = $isCustomerPricelist;
return $this;
}
/**
* 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->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 9d3f3b4f..2dba6de7 100644
--- a/src/Api/Generated/Model/PricelistModelCollection.php
+++ b/src/Api/Generated/Model/PricelistModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 f43442d0..0cd02ffc 100644
--- a/src/Api/Generated/Model/PricelistModelItem.php
+++ b/src/Api/Generated/Model/PricelistModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 702e0f7f..a627e221 100644
--- a/src/Api/Generated/Model/ProductBundleProductPriceModel.php
+++ b/src/Api/Generated/Model/ProductBundleProductPriceModel.php
@@ -2,12 +2,20 @@
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
*
- * @var int
+ * @var int|null
*/
protected $pricelistId;
/**
@@ -19,21 +27,22 @@ 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->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 42b43042..b4421324 100644
--- a/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php
+++ b/src/Api/Generated/Model/ProductBundleProductPriceModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 b750399d..a4d38118 100644
--- a/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php
+++ b/src/Api/Generated/Model/ProductBundleProductPriceModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 ed52babe..454ab6cd 100644
--- a/src/Api/Generated/Model/ProductCategoryLanguagesModel.php
+++ b/src/Api/Generated/Model/ProductCategoryLanguagesModel.php
@@ -2,194 +2,209 @@
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)
*
- * @var string
+ * @var string|null
*/
protected $langCode;
/**
* The name of this product category (required)
*
- * @var string
+ * @var string|null
*/
protected $name;
/**
* 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;
/**
* 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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['pageTitle'] = true;
$this->pageTitle = $pageTitle;
return $this;
}
/**
* 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->initialized['description'] = true;
$this->description = $description;
return $this;
}
/**
* 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->initialized['bottomDescription'] = true;
$this->bottomDescription = $bottomDescription;
return $this;
}
/**
* 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->initialized['pageMetaDescription'] = true;
$this->pageMetaDescription = $pageMetaDescription;
return $this;
}
/**
* 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->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 80b90ac8..0685bdec 100644
--- a/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php
+++ b/src/Api/Generated/Model/ProductCategoryLanguagesModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 be305cf8..f8b58dc1 100644
--- a/src/Api/Generated/Model/ProductCategoryLinkModel.php
+++ b/src/Api/Generated/Model/ProductCategoryLinkModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['categoryId'] = true;
$this->categoryId = $categoryId;
return $this;
}
/**
* 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->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 39a989a3..941ae835 100644
--- a/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php
+++ b/src/Api/Generated/Model/ProductCategoryLinkModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 8c501318..24c05553 100644
--- a/src/Api/Generated/Model/ProductCategoryLinkModelItem.php
+++ b/src/Api/Generated/Model/ProductCategoryLinkModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 ec5bd5b4..3d4223cd 100644
--- a/src/Api/Generated/Model/ProductCategoryModel.php
+++ b/src/Api/Generated/Model/ProductCategoryModel.php
@@ -2,275 +2,327 @@
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
*
- * @var int
+ * @var int|null
*/
protected $categoryId;
/**
* The category`s parent`s Id
*
- * @var int
+ * @var int|null
*/
protected $parentId;
/**
* 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;
/**
* The Id to the category`s image file. Has to be an existing mediaFile
*
- * @var int
+ * @var int|null
*/
protected $imageFileId;
/**
- * The system name the externalId belongs to.
+ * The external Id for this category for the system named in externalType
+ *
+ * @var string|null
+ */
+ protected $externalId;
+ /**
+ * Deprecated: use `externalIdType` instead
+ *
+ * @deprecated
*
- * @var string
+ * @var string|null
*/
protected $externalType;
/**
- * The external Id for this category for the system named in externalType
+ * The system name the externalId belongs to.
*
- * @var string
+ * @var string|null
*/
- protected $externalId;
+ protected $externalIdType;
/**
* 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->initialized['categoryId'] = true;
$this->categoryId = $categoryId;
return $this;
}
/**
* 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->initialized['parentId'] = true;
$this->parentId = $parentId;
return $this;
}
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['openPage'] = true;
$this->openPage = $openPage;
return $this;
}
/**
* 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->initialized['imageFileId'] = true;
$this->imageFileId = $imageFileId;
return $this;
}
/**
- * The system name the externalId belongs to.
+ * The external Id for this category for the system named in externalType
*
- * @return string
+ * @return string|null
*/
- public function getExternalType() : string
+ public function getExternalId() : ?string
+ {
+ return $this->externalId;
+ }
+ /**
+ * The external Id for this category for the system named in externalType
+ *
+ * @param string|null $externalId
+ *
+ * @return self
+ */
+ public function setExternalId(?string $externalId) : self
+ {
+ $this->initialized['externalId'] = true;
+ $this->externalId = $externalId;
+ return $this;
+ }
+ /**
+ * Deprecated: use `externalIdType` instead
+ *
+ * @deprecated
+ *
+ * @return string|null
+ */
+ public function getExternalType() : ?string
{
return $this->externalType;
}
/**
- * The system name the externalId belongs to.
+ * 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->initialized['externalType'] = true;
$this->externalType = $externalType;
return $this;
}
/**
- * The external Id for this category for the system named in externalType
+ * The system name the externalId belongs to.
*
- * @return string
+ * @return string|null
*/
- 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|null $externalIdType
*
* @return self
*/
- public function setExternalId(string $externalId) : self
+ public function setExternalIdType(?string $externalIdType) : self
{
- $this->externalId = $externalId;
+ $this->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
return $this;
}
/**
* 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->initialized['hasChildren'] = true;
$this->hasChildren = $hasChildren;
return $this;
}
/**
*
*
- * @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->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 986abc70..2bc6e424 100644
--- a/src/Api/Generated/Model/ProductCategoryModelCollection.php
+++ b/src/Api/Generated/Model/ProductCategoryModelCollection.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
/**
*
*
- * @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->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 e6c5afa7..284bf4cf 100644
--- a/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php
+++ b/src/Api/Generated/Model/ProductCategoryModelCollectionMeta.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 d1b86411..85c49558 100644
--- a/src/Api/Generated/Model/ProductCategoryModelItem.php
+++ b/src/Api/Generated/Model/ProductCategoryModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 717695dd..5f87cf1d 100644
--- a/src/Api/Generated/Model/ProductCategoryModelUpdatable.php
+++ b/src/Api/Generated/Model/ProductCategoryModelUpdatable.php
@@ -2,275 +2,327 @@
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
*
- * @var int
+ * @var int|null
*/
protected $categoryId;
/**
* The category`s parent`s Id
*
- * @var int
+ * @var int|null
*/
protected $parentId;
/**
* 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;
/**
* The Id to the category`s image file. Has to be an existing mediaFile
*
- * @var int
+ * @var int|null
*/
protected $imageFileId;
/**
- * The system name the externalId belongs to.
+ * The external Id for this category for the system named in externalType
+ *
+ * @var string|null
+ */
+ protected $externalId;
+ /**
+ * Deprecated: use `externalIdType` instead
+ *
+ * @deprecated
*
- * @var string
+ * @var string|null
*/
protected $externalType;
/**
- * The external Id for this category for the system named in externalType
+ * The system name the externalId belongs to.
*
- * @var string
+ * @var string|null
*/
- protected $externalId;
+ protected $externalIdType;
/**
* 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->initialized['categoryId'] = true;
$this->categoryId = $categoryId;
return $this;
}
/**
* 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->initialized['parentId'] = true;
$this->parentId = $parentId;
return $this;
}
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['openPage'] = true;
$this->openPage = $openPage;
return $this;
}
/**
* 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->initialized['imageFileId'] = true;
$this->imageFileId = $imageFileId;
return $this;
}
/**
- * The system name the externalId belongs to.
+ * The external Id for this category for the system named in externalType
*
- * @return string
+ * @return string|null
*/
- public function getExternalType() : string
+ public function getExternalId() : ?string
+ {
+ return $this->externalId;
+ }
+ /**
+ * The external Id for this category for the system named in externalType
+ *
+ * @param string|null $externalId
+ *
+ * @return self
+ */
+ public function setExternalId(?string $externalId) : self
+ {
+ $this->initialized['externalId'] = true;
+ $this->externalId = $externalId;
+ return $this;
+ }
+ /**
+ * Deprecated: use `externalIdType` instead
+ *
+ * @deprecated
+ *
+ * @return string|null
+ */
+ public function getExternalType() : ?string
{
return $this->externalType;
}
/**
- * The system name the externalId belongs to.
+ * 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->initialized['externalType'] = true;
$this->externalType = $externalType;
return $this;
}
/**
- * The external Id for this category for the system named in externalType
+ * The system name the externalId belongs to.
*
- * @return string
+ * @return string|null
*/
- 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|null $externalIdType
*
* @return self
*/
- public function setExternalId(string $externalId) : self
+ public function setExternalIdType(?string $externalIdType) : self
{
- $this->externalId = $externalId;
+ $this->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
return $this;
}
/**
* 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->initialized['hasChildren'] = true;
$this->hasChildren = $hasChildren;
return $this;
}
/**
*
*
- * @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->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 6fb15cc2..36c21729 100644
--- a/src/Api/Generated/Model/ProductLanguageModel.php
+++ b/src/Api/Generated/Model/ProductLanguageModel.php
@@ -2,194 +2,209 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['shortDescription'] = true;
$this->shortDescription = $shortDescription;
return $this;
}
/**
* 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->initialized['longDescription'] = true;
$this->longDescription = $longDescription;
return $this;
}
/**
* 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->initialized['permalink'] = true;
$this->permalink = $permalink;
return $this;
}
/**
* 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->initialized['pageTitle'] = true;
$this->pageTitle = $pageTitle;
return $this;
}
/**
* 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->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 01566fe3..34ff8bd7 100644
--- a/src/Api/Generated/Model/ProductLanguageModelCollection.php
+++ b/src/Api/Generated/Model/ProductLanguageModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 cefa9150..4875f041 100644
--- a/src/Api/Generated/Model/ProductLanguageModelItem.php
+++ b/src/Api/Generated/Model/ProductLanguageModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 d16f40d8..f0f65204 100644
--- a/src/Api/Generated/Model/ProductLanguageSlimModel.php
+++ b/src/Api/Generated/Model/ProductLanguageSlimModel.php
@@ -2,113 +2,125 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['shortDescription'] = true;
$this->shortDescription = $shortDescription;
return $this;
}
/**
* 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->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 fd9ba412..1bfdf274 100644
--- a/src/Api/Generated/Model/ProductManufacturerModel.php
+++ b/src/Api/Generated/Model/ProductManufacturerModel.php
@@ -2,86 +2,153 @@
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
*
- * @var int
+ * @var int|null
*/
protected $manufacturerId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* The name of this manufacturer
*
- * @var string
+ * @var string|null
*/
protected $name;
/**
* The URL to the manufacturers website
*
- * @var string
+ * @var string|null
*/
protected $url;
/**
* 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->initialized['manufacturerId'] = true;
$this->manufacturerId = $manufacturerId;
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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->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 f2711669..d5b17937 100644
--- a/src/Api/Generated/Model/ProductManufacturerModelCollection.php
+++ b/src/Api/Generated/Model/ProductManufacturerModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 d0edbc35..fcdefa80 100644
--- a/src/Api/Generated/Model/ProductManufacturerModelItem.php
+++ b/src/Api/Generated/Model/ProductManufacturerModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 0855b94b..22647d41 100644
--- a/src/Api/Generated/Model/ProductMediaFileLinkModel.php
+++ b/src/Api/Generated/Model/ProductMediaFileLinkModel.php
@@ -2,113 +2,125 @@
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
*
- * @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->initialized['productMediaFileId'] = true;
$this->productMediaFileId = $productMediaFileId;
return $this;
}
/**
* 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->initialized['mediaFileId'] = true;
$this->mediaFileId = $mediaFileId;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->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 40c02f3c..81e6dd09 100644
--- a/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php
+++ b/src/Api/Generated/Model/ProductMediaFileLinkModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 23d3b8ac..fb9edb11 100644
--- a/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php
+++ b/src/Api/Generated/Model/ProductMediaFileLinkModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 e2f3ee44..a33233b0 100644
--- a/src/Api/Generated/Model/ProductMetaDataModel.php
+++ b/src/Api/Generated/Model/ProductMetaDataModel.php
@@ -2,113 +2,125 @@
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.
*
- * @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->initialized['metaDataId'] = true;
$this->metaDataId = $metaDataId;
return $this;
}
/**
* 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->initialized['metaDataTypeId'] = true;
$this->metaDataTypeId = $metaDataTypeId;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
*
*
- * @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->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 1c9993a6..f07acd00 100644
--- a/src/Api/Generated/Model/ProductMetaDataModelCollection.php
+++ b/src/Api/Generated/Model/ProductMetaDataModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 0c5445c6..50ce0450 100644
--- a/src/Api/Generated/Model/ProductMetaDataModelItem.php
+++ b/src/Api/Generated/Model/ProductMetaDataModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 cbdb3302..79347527 100644
--- a/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php
+++ b/src/Api/Generated/Model/ProductMetaDataModelUpdatable.php
@@ -2,113 +2,125 @@
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.
*
- * @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->initialized['metaDataId'] = true;
$this->metaDataId = $metaDataId;
return $this;
}
/**
* 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->initialized['metaDataTypeId'] = true;
$this->metaDataTypeId = $metaDataTypeId;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->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 afb187b0..2cd4209a 100644
--- a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php
+++ b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 c55e36e5..d7f3c81e 100644
--- a/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php
+++ b/src/Api/Generated/Model/ProductMetaDataTypeLanguageModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 63b23111..bbfa8c10 100644
--- a/src/Api/Generated/Model/ProductMetaDataTypeModel.php
+++ b/src/Api/Generated/Model/ProductMetaDataTypeModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['metaDataTypeId'] = true;
$this->metaDataTypeId = $metaDataTypeId;
return $this;
}
/**
*
*
- * @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->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 8ab588c1..9b0d359a 100644
--- a/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php
+++ b/src/Api/Generated/Model/ProductMetaDataTypeModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 51ee7226..676bdabf 100644
--- a/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php
+++ b/src/Api/Generated/Model/ProductMetaDataTypeModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 4559415f..0025ea41 100644
--- a/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php
+++ b/src/Api/Generated/Model/ProductMetaDataTypeModelUpdatable.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 c38d3e02..77a9abdd 100644
--- a/src/Api/Generated/Model/ProductMetaLanguageDataModel.php
+++ b/src/Api/Generated/Model/ProductMetaLanguageDataModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 38303e5d..26925ebb 100644
--- a/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php
+++ b/src/Api/Generated/Model/ProductMetaLanguageDataModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 dd12c8fa..4685f20e 100644
--- a/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php
+++ b/src/Api/Generated/Model/ProductMetaLanguageDataModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 fe7cf1e1..77ba60e8 100644
--- a/src/Api/Generated/Model/ProductModel.php
+++ b/src/Api/Generated/Model/ProductModel.php
@@ -2,18 +2,38 @@
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);
+ }
/**
*
*
- * @var int
+ * @var int|null
*/
protected $productId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* A timestamp of when the product was created. The time should be formatted using ISO-8601
*
- * @var string
+ * @var string|null
*/
protected $createdAt;
/**
@@ -25,19 +45,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;
/**
@@ -61,19 +81,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;
/**
@@ -85,102 +105,148 @@ 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->initialized['productId'] = true;
$this->productId = $productId;
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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
@@ -202,69 +268,73 @@ public function getDefaultVatRate() : ?string
*/
public function setDefaultVatRate(?string $defaultVatRate) : self
{
+ $this->initialized['defaultVatRate'] = true;
$this->defaultVatRate = $defaultVatRate;
return $this;
}
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['visibilityPricelistIds'] = true;
$this->visibilityPricelistIds = $visibilityPricelistIds;
return $this;
}
/**
* 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->initialized['moreInfoUrl'] = true;
$this->moreInfoUrl = $moreInfoUrl;
return $this;
}
@@ -286,6 +356,7 @@ public function getManufacturerId() : ?int
*/
public function setManufacturerId(?int $manufacturerId) : self
{
+ $this->initialized['manufacturerId'] = true;
$this->manufacturerId = $manufacturerId;
return $this;
}
@@ -307,6 +378,7 @@ public function getUnitId() : ?int
*/
public function setUnitId(?int $unitId) : self
{
+ $this->initialized['unitId'] = true;
$this->unitId = $unitId;
return $this;
}
@@ -328,69 +400,73 @@ public function getSortIndex() : ?int
*/
public function setSortIndex(?int $sortIndex) : self
{
+ $this->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->initialized['isBackInStockWatchable'] = true;
$this->isBackInStockWatchable = $isBackInStockWatchable;
return $this;
}
/**
* 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->initialized['bundleUseManualPrice'] = true;
$this->bundleUseManualPrice = $bundleUseManualPrice;
return $this;
}
@@ -412,216 +488,227 @@ public function getAccounting() : ?int
*/
public function setAccounting(?int $accounting) : self
{
+ $this->initialized['accounting'] = true;
$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
+ * @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->initialized['hasSeveralVariants'] = true;
$this->hasSeveralVariants = $hasSeveralVariants;
return $this;
}
/**
* 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->initialized['modifiedAt'] = true;
$this->modifiedAt = $modifiedAt;
return $this;
}
/**
*
*
- * @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->initialized['variants'] = true;
$this->variants = $variants;
return $this;
}
/**
*
*
- * @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->initialized['bundledProducts'] = true;
$this->bundledProducts = $bundledProducts;
return $this;
}
/**
*
*
- * @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->initialized['mediaFiles'] = true;
$this->mediaFiles = $mediaFiles;
return $this;
}
/**
*
*
- * @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->initialized['languages'] = true;
$this->languages = $languages;
return $this;
}
/**
*
*
- * @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->initialized['vatRates'] = true;
$this->vatRates = $vatRates;
return $this;
}
/**
*
*
- * @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->initialized['categories'] = true;
$this->categories = $categories;
return $this;
}
/**
*
*
- * @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->initialized['unit'] = true;
$this->unit = $unit;
return $this;
}
/**
*
*
- * @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->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 661f2900..933b0e82 100644
--- a/src/Api/Generated/Model/ProductModelCollection.php
+++ b/src/Api/Generated/Model/ProductModelCollection.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
/**
*
*
- * @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->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 865c939a..b381e356 100644
--- a/src/Api/Generated/Model/ProductModelCollectionMeta.php
+++ b/src/Api/Generated/Model/ProductModelCollectionMeta.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 fbef6854..55fc2787 100644
--- a/src/Api/Generated/Model/ProductModelItem.php
+++ b/src/Api/Generated/Model/ProductModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 909017a9..19bb6c14 100644
--- a/src/Api/Generated/Model/ProductModelLanguages.php
+++ b/src/Api/Generated/Model/ProductModelLanguages.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 98f7641a..d2eec75d 100644
--- a/src/Api/Generated/Model/ProductModelPatchable.php
+++ b/src/Api/Generated/Model/ProductModelPatchable.php
@@ -2,18 +2,32 @@
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
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
*
- * @var int
+ * @var string|null
*/
- protected $productId;
+ protected $externalIdType;
/**
* A timestamp of when the product was created. The time should be formatted using ISO-8601
*
- * @var string
+ * @var string|null
*/
protected $createdAt;
/**
@@ -25,19 +39,19 @@ class ProductModelPatchable
/**
* 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;
/**
@@ -61,19 +75,19 @@ 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;
/**
* Should all bundled products have a manually entered price? Only applies if type is bundle
*
- * @var bool
+ * @var bool|null
*/
protected $bundleUseManualPrice;
/**
@@ -82,87 +96,99 @@ 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
*
- * @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;
/**
- *
+ * 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->initialized['externalId'] = true;
+ $this->externalId = $externalId;
+ return $this;
+ }
+ /**
+ * The system name the externalId belongs to.
*
- * @return int
+ * @return string|null
*/
- public function getProductId() : int
+ public function getExternalIdType() : ?string
{
- return $this->productId;
+ return $this->externalIdType;
}
/**
- *
+ * The system name the externalId belongs to.
*
- * @param int $productId
+ * @param string|null $externalIdType
*
* @return self
*/
- public function setProductId(int $productId) : self
+ public function setExternalIdType(?string $externalIdType) : self
{
- $this->productId = $productId;
+ $this->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
@@ -184,69 +210,73 @@ public function getDefaultVatRate() : ?string
*/
public function setDefaultVatRate(?string $defaultVatRate) : self
{
+ $this->initialized['defaultVatRate'] = true;
$this->defaultVatRate = $defaultVatRate;
return $this;
}
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['visibilityPricelistIds'] = true;
$this->visibilityPricelistIds = $visibilityPricelistIds;
return $this;
}
/**
* 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->initialized['moreInfoUrl'] = true;
$this->moreInfoUrl = $moreInfoUrl;
return $this;
}
@@ -268,6 +298,7 @@ public function getManufacturerId() : ?int
*/
public function setManufacturerId(?int $manufacturerId) : self
{
+ $this->initialized['manufacturerId'] = true;
$this->manufacturerId = $manufacturerId;
return $this;
}
@@ -289,6 +320,7 @@ public function getUnitId() : ?int
*/
public function setUnitId(?int $unitId) : self
{
+ $this->initialized['unitId'] = true;
$this->unitId = $unitId;
return $this;
}
@@ -310,69 +342,73 @@ public function getSortIndex() : ?int
*/
public function setSortIndex(?int $sortIndex) : self
{
+ $this->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->initialized['isBackInStockWatchable'] = true;
$this->isBackInStockWatchable = $isBackInStockWatchable;
return $this;
}
/**
* 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->initialized['bundleUseManualPrice'] = true;
$this->bundleUseManualPrice = $bundleUseManualPrice;
return $this;
}
@@ -394,153 +430,117 @@ public function getAccounting() : ?int
*/
public function setAccounting(?int $accounting) : self
{
+ $this->initialized['accounting'] = true;
$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
*
- * @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->initialized['mediaFiles'] = true;
$this->mediaFiles = $mediaFiles;
return $this;
}
/**
* 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->initialized['languages'] = true;
$this->languages = $languages;
return $this;
}
/**
* 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->initialized['vatRates'] = true;
$this->vatRates = $vatRates;
return $this;
}
/**
* 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->initialized['categories'] = true;
$this->categories = $categories;
return $this;
}
/**
* 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->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 b3ca1ca9..1430a40b 100644
--- a/src/Api/Generated/Model/ProductModelUpdatable.php
+++ b/src/Api/Generated/Model/ProductModelUpdatable.php
@@ -2,18 +2,32 @@
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
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
*
- * @var int
+ * @var string|null
*/
- protected $productId;
+ protected $externalIdType;
/**
* A timestamp of when the product was created. The time should be formatted using ISO-8601
*
- * @var string
+ * @var string|null
*/
protected $createdAt;
/**
@@ -25,19 +39,19 @@ class ProductModelUpdatable
/**
* 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;
/**
@@ -61,19 +75,19 @@ 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;
/**
* Should all bundled products have a manually entered price? Only applies if type is bundle
*
- * @var bool
+ * @var bool|null
*/
protected $bundleUseManualPrice;
/**
@@ -82,99 +96,111 @@ 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
*
- * @var ProductVariantModel[]
+ * @var ProductVariantPutRequestModel[]|null
*/
protected $variants;
/**
* A collection of bundled products
*
- * @var BundledProductsModel[]
+ * @var BundledProductsModel[]|null
*/
protected $bundledProducts;
/**
* 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;
/**
- *
+ * 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->initialized['externalId'] = true;
+ $this->externalId = $externalId;
+ return $this;
+ }
+ /**
+ * The system name the externalId belongs to.
*
- * @return int
+ * @return string|null
*/
- public function getProductId() : int
+ public function getExternalIdType() : ?string
{
- return $this->productId;
+ return $this->externalIdType;
}
/**
- *
+ * The system name the externalId belongs to.
*
- * @param int $productId
+ * @param string|null $externalIdType
*
* @return self
*/
- public function setProductId(int $productId) : self
+ public function setExternalIdType(?string $externalIdType) : self
{
- $this->productId = $productId;
+ $this->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
return $this;
}
/**
* 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->initialized['createdAt'] = true;
$this->createdAt = $createdAt;
return $this;
}
@@ -196,69 +222,73 @@ public function getDefaultVatRate() : ?string
*/
public function setDefaultVatRate(?string $defaultVatRate) : self
{
+ $this->initialized['defaultVatRate'] = true;
$this->defaultVatRate = $defaultVatRate;
return $this;
}
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['visibilityPricelistIds'] = true;
$this->visibilityPricelistIds = $visibilityPricelistIds;
return $this;
}
/**
* 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->initialized['moreInfoUrl'] = true;
$this->moreInfoUrl = $moreInfoUrl;
return $this;
}
@@ -280,6 +310,7 @@ public function getManufacturerId() : ?int
*/
public function setManufacturerId(?int $manufacturerId) : self
{
+ $this->initialized['manufacturerId'] = true;
$this->manufacturerId = $manufacturerId;
return $this;
}
@@ -301,6 +332,7 @@ public function getUnitId() : ?int
*/
public function setUnitId(?int $unitId) : self
{
+ $this->initialized['unitId'] = true;
$this->unitId = $unitId;
return $this;
}
@@ -322,69 +354,73 @@ public function getSortIndex() : ?int
*/
public function setSortIndex(?int $sortIndex) : self
{
+ $this->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->initialized['isBackInStockWatchable'] = true;
$this->isBackInStockWatchable = $isBackInStockWatchable;
return $this;
}
/**
* 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->initialized['bundleUseManualPrice'] = true;
$this->bundleUseManualPrice = $bundleUseManualPrice;
return $this;
}
@@ -406,195 +442,161 @@ public function getAccounting() : ?int
*/
public function setAccounting(?int $accounting) : self
{
+ $this->initialized['accounting'] = true;
$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
*
- * @return ProductVariantModel[]
+ * @return ProductVariantPutRequestModel[]|null
*/
- public function getVariants() : array
+ public function getVariants() : ?array
{
return $this->variants;
}
/**
* A collection of variants
*
- * @param ProductVariantModel[] $variants
+ * @param ProductVariantPutRequestModel[]|null $variants
*
* @return self
*/
- public function setVariants(array $variants) : self
+ public function setVariants(?array $variants) : self
{
+ $this->initialized['variants'] = true;
$this->variants = $variants;
return $this;
}
/**
* 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->initialized['bundledProducts'] = true;
$this->bundledProducts = $bundledProducts;
return $this;
}
/**
* 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->initialized['mediaFiles'] = true;
$this->mediaFiles = $mediaFiles;
return $this;
}
/**
* 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->initialized['languages'] = true;
$this->languages = $languages;
return $this;
}
/**
* 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->initialized['vatRates'] = true;
$this->vatRates = $vatRates;
return $this;
}
/**
* 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->initialized['categories'] = true;
$this->categories = $categories;
return $this;
}
/**
* 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->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 0a012afe..11078a76 100644
--- a/src/Api/Generated/Model/ProductStockStatusLanguageModel.php
+++ b/src/Api/Generated/Model/ProductStockStatusLanguageModel.php
@@ -2,59 +2,69 @@
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.
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 0765e2c5..7230ead1 100644
--- a/src/Api/Generated/Model/ProductStockStatusModelCollection.php
+++ b/src/Api/Generated/Model/ProductStockStatusModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @var ProductStockStatusModel[]
+ * @var ProductStockStatusResponseModel[]|null
*/
protected $data;
/**
* A list of product stock statuses
*
- * @return ProductStockStatusModel[]
+ * @return ProductStockStatusResponseModel[]|null
*/
- public function getData() : array
+ public function getData() : ?array
{
return $this->data;
}
/**
* A list of product stock statuses
*
- * @param ProductStockStatusModel[] $data
+ * @param ProductStockStatusResponseModel[]|null $data
*
* @return self
*/
- public function setData(array $data) : self
+ 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 7b9d32d4..fc841529 100644
--- a/src/Api/Generated/Model/ProductStockStatusModelItem.php
+++ b/src/Api/Generated/Model/ProductStockStatusModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @var ProductStockStatusModel
+ * @var ProductStockStatusResponseModel|null
*/
protected $data;
/**
*
*
- * @return ProductStockStatusModel
+ * @return ProductStockStatusResponseModel|null
*/
- public function getData() : ProductStockStatusModel
+ public function getData() : ?ProductStockStatusResponseModel
{
return $this->data;
}
/**
*
*
- * @param ProductStockStatusModel $data
+ * @param ProductStockStatusResponseModel|null $data
*
* @return self
*/
- public function setData(ProductStockStatusModel $data) : self
+ public function setData(?ProductStockStatusResponseModel $data) : self
{
+ $this->initialized['data'] = true;
$this->data = $data;
return $this;
}
diff --git a/src/Api/Generated/Model/ProductStockStatusModel.php b/src/Api/Generated/Model/ProductStockStatusRequestModel.php
similarity index 66%
rename from src/Api/Generated/Model/ProductStockStatusModel.php
rename to src/Api/Generated/Model/ProductStockStatusRequestModel.php
index b66bcc36..b0712167 100644
--- a/src/Api/Generated/Model/ProductStockStatusModel.php
+++ b/src/Api/Generated/Model/ProductStockStatusRequestModel.php
@@ -2,24 +2,32 @@
namespace Starweb\Api\Generated\Model;
-class ProductStockStatusModel
+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
*
- * @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,81 +39,84 @@ class ProductStockStatusModel
/**
* 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->initialized['stockStatusId'] = true;
$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
+ * @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->initialized['idCode'] = true;
$this->idCode = $idCode;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
@@ -127,69 +138,73 @@ public function getStockoutNewStatusId() : ?int
*/
public function setStockoutNewStatusId(?int $stockoutNewStatusId) : self
{
+ $this->initialized['stockoutNewStatusId'] = true;
$this->stockoutNewStatusId = $stockoutNewStatusId;
return $this;
}
/**
* 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->initialized['productBuyable'] = true;
$this->productBuyable = $productBuyable;
return $this;
}
/**
* 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->initialized['inStock'] = true;
$this->inStock = $inStock;
return $this;
}
/**
*
*
- * @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->initialized['languages'] = true;
$this->languages = $languages;
return $this;
}
diff --git a/src/Api/Generated/Model/ProductStockStatusResponseModel.php b/src/Api/Generated/Model/ProductStockStatusResponseModel.php
new file mode 100644
index 00000000..57b7ce63
--- /dev/null
+++ b/src/Api/Generated/Model/ProductStockStatusResponseModel.php
@@ -0,0 +1,211 @@
+initialized);
+ }
+ /**
+ * The stock status id
+ *
+ * @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|null
+ */
+ protected $idCode;
+ /**
+ * Sort index for this status
+ *
+ * @var int|null
+ */
+ protected $sortIndex;
+ /**
+ * 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
+ *
+ * @var int|null
+ */
+ protected $stockoutNewStatusId;
+ /**
+ * Is the product buyable when this status is set?
+ *
+ * @var bool|null
+ */
+ protected $productBuyable = true;
+ /**
+ * Should the product be displayed as "in stock" when this status is set?
+ *
+ * @var bool|null
+ */
+ protected $inStock = false;
+ /**
+ *
+ *
+ * @var ProductStockStatusResponseModelLanguages|null
+ */
+ protected $languages;
+ /**
+ * The stock status id
+ *
+ * @return int|null
+ */
+ public function getStockStatusId() : ?int
+ {
+ return $this->stockStatusId;
+ }
+ /**
+ * The stock status id
+ *
+ * @param int|null $stockStatusId
+ *
+ * @return self
+ */
+ public function setStockStatusId(?int $stockStatusId) : self
+ {
+ $this->initialized['stockStatusId'] = true;
+ $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|null
+ */
+ 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|null $idCode
+ *
+ * @return self
+ */
+ public function setIdCode(?string $idCode) : self
+ {
+ $this->initialized['idCode'] = true;
+ $this->idCode = $idCode;
+ return $this;
+ }
+ /**
+ * Sort index for this status
+ *
+ * @return int|null
+ */
+ public function getSortIndex() : ?int
+ {
+ return $this->sortIndex;
+ }
+ /**
+ * Sort index for this status
+ *
+ * @param int|null $sortIndex
+ *
+ * @return self
+ */
+ public function setSortIndex(?int $sortIndex) : self
+ {
+ $this->initialized['sortIndex'] = true;
+ $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->initialized['stockoutNewStatusId'] = true;
+ $this->stockoutNewStatusId = $stockoutNewStatusId;
+ return $this;
+ }
+ /**
+ * Is the product buyable when this status is set?
+ *
+ * @return bool|null
+ */
+ public function getProductBuyable() : ?bool
+ {
+ return $this->productBuyable;
+ }
+ /**
+ * Is the product buyable when this status is set?
+ *
+ * @param bool|null $productBuyable
+ *
+ * @return self
+ */
+ public function setProductBuyable(?bool $productBuyable) : self
+ {
+ $this->initialized['productBuyable'] = true;
+ $this->productBuyable = $productBuyable;
+ return $this;
+ }
+ /**
+ * Should the product be displayed as "in stock" when this status is set?
+ *
+ * @return bool|null
+ */
+ public function getInStock() : ?bool
+ {
+ return $this->inStock;
+ }
+ /**
+ * Should the product be displayed as "in stock" when this status is set?
+ *
+ * @param bool|null $inStock
+ *
+ * @return self
+ */
+ public function setInStock(?bool $inStock) : self
+ {
+ $this->initialized['inStock'] = true;
+ $this->inStock = $inStock;
+ return $this;
+ }
+ /**
+ *
+ *
+ * @return ProductStockStatusResponseModelLanguages|null
+ */
+ public function getLanguages() : ?ProductStockStatusResponseModelLanguages
+ {
+ return $this->languages;
+ }
+ /**
+ *
+ *
+ * @param ProductStockStatusResponseModelLanguages|null $languages
+ *
+ * @return self
+ */
+ public function setLanguages(?ProductStockStatusResponseModelLanguages $languages) : self
+ {
+ $this->initialized['languages'] = true;
+ $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..a99e2f03
--- /dev/null
+++ b/src/Api/Generated/Model/ProductStockStatusResponseModelLanguages.php
@@ -0,0 +1,43 @@
+initialized);
+ }
+ /**
+ *
+ *
+ * @var ProductStockStatusLanguageModel[]|null
+ */
+ protected $data;
+ /**
+ *
+ *
+ * @return ProductStockStatusLanguageModel[]|null
+ */
+ public function getData() : ?array
+ {
+ return $this->data;
+ }
+ /**
+ *
+ *
+ * @param ProductStockStatusLanguageModel[]|null $data
+ *
+ * @return self
+ */
+ public function setData(?array $data) : self
+ {
+ $this->initialized['data'] = true;
+ $this->data = $data;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductTagLanguageModel.php b/src/Api/Generated/Model/ProductTagLanguageModel.php
index 7c7d8368..926fc810 100644
--- a/src/Api/Generated/Model/ProductTagLanguageModel.php
+++ b/src/Api/Generated/Model/ProductTagLanguageModel.php
@@ -2,59 +2,69 @@
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.
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 7114b380..c351609c 100644
--- a/src/Api/Generated/Model/ProductTagLinkModel.php
+++ b/src/Api/Generated/Model/ProductTagLinkModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['tagOptionId'] = true;
$this->tagOptionId = $tagOptionId;
return $this;
}
/**
* 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->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 1a9e5c8d..c8120fcb 100644
--- a/src/Api/Generated/Model/ProductTagLinkModelCollection.php
+++ b/src/Api/Generated/Model/ProductTagLinkModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 c04baf10..74d788db 100644
--- a/src/Api/Generated/Model/ProductTagLinkModelItem.php
+++ b/src/Api/Generated/Model/ProductTagLinkModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 93185cff..1904aa2a 100644
--- a/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagLinkPostRequestModel.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 fc1c72e1..54c5344b 100644
--- a/src/Api/Generated/Model/ProductTagModel.php
+++ b/src/Api/Generated/Model/ProductTagModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['tagId'] = true;
$this->tagId = $tagId;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
*
*
- * @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->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 18c95ff6..25a540b3 100644
--- a/src/Api/Generated/Model/ProductTagModelCollection.php
+++ b/src/Api/Generated/Model/ProductTagModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 66debe9e..e4d16c1a 100644
--- a/src/Api/Generated/Model/ProductTagModelItem.php
+++ b/src/Api/Generated/Model/ProductTagModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 e911853b..07a3341f 100644
--- a/src/Api/Generated/Model/ProductTagOptionLanguageModel.php
+++ b/src/Api/Generated/Model/ProductTagOptionLanguageModel.php
@@ -2,59 +2,69 @@
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.
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 37f0ae8b..7b7a575b 100644
--- a/src/Api/Generated/Model/ProductTagOptionModel.php
+++ b/src/Api/Generated/Model/ProductTagOptionModel.php
@@ -2,113 +2,125 @@
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
*
- * @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->initialized['tagOptionId'] = true;
$this->tagOptionId = $tagOptionId;
return $this;
}
/**
* 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->initialized['value'] = true;
$this->value = $value;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
*
*
- * @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->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 79d87884..91be75ab 100644
--- a/src/Api/Generated/Model/ProductTagOptionModelCollection.php
+++ b/src/Api/Generated/Model/ProductTagOptionModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 b17afb82..4c7819e5 100644
--- a/src/Api/Generated/Model/ProductTagOptionModelItem.php
+++ b/src/Api/Generated/Model/ProductTagOptionModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 a0a0b33a..07caeb9a 100644
--- a/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagOptionPatchRequestModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
*
*
- * @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->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 3ce8cc32..874aa32f 100644
--- a/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagOptionPostRequestModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
*
*
- * @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->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 29d01169..561c4099 100644
--- a/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagOptionPutRequestModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
*
*
- * @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->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 017a7881..ce558f54 100644
--- a/src/Api/Generated/Model/ProductTagPatchRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagPatchRequestModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->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 2a18a435..33114722 100644
--- a/src/Api/Generated/Model/ProductTagPostRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagPostRequestModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->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 286d09c3..673db51d 100644
--- a/src/Api/Generated/Model/ProductTagPutRequestModel.php
+++ b/src/Api/Generated/Model/ProductTagPutRequestModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->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 c470aa1b..9d6e85a3 100644
--- a/src/Api/Generated/Model/ProductUnitLanguageModel.php
+++ b/src/Api/Generated/Model/ProductUnitLanguageModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->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 c5037a4d..394ea4ca 100644
--- a/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php
+++ b/src/Api/Generated/Model/ProductUnitLanguageModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 c40d97f9..41ff64a0 100644
--- a/src/Api/Generated/Model/ProductUnitModel.php
+++ b/src/Api/Generated/Model/ProductUnitModel.php
@@ -2,59 +2,125 @@
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
*
- * @var int
+ * @var int|null
*/
protected $unitId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
*
*
- * @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->initialized['unitId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
*
*
- * @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->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 3d052f6b..af894b4b 100644
--- a/src/Api/Generated/Model/ProductUnitModelCollection.php
+++ b/src/Api/Generated/Model/ProductUnitModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 fe803e0d..7a05cd54 100644
--- a/src/Api/Generated/Model/ProductUnitModelItem.php
+++ b/src/Api/Generated/Model/ProductUnitModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
diff --git a/src/Api/Generated/Model/ProductUnitModelUpdatable.php b/src/Api/Generated/Model/ProductUnitModelUpdatable.php
new file mode 100644
index 00000000..c73ccc85
--- /dev/null
+++ b/src/Api/Generated/Model/ProductUnitModelUpdatable.php
@@ -0,0 +1,127 @@
+initialized);
+ }
+ /**
+ * The units id
+ *
+ * @var int|null
+ */
+ protected $unitId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
+ /**
+ *
+ *
+ * @var ProductUnitLanguageModel[]|null
+ */
+ protected $languages;
+ /**
+ * The units id
+ *
+ * @return int|null
+ */
+ public function getUnitId() : ?int
+ {
+ return $this->unitId;
+ }
+ /**
+ * The units id
+ *
+ * @param int|null $unitId
+ *
+ * @return self
+ */
+ public function setUnitId(?int $unitId) : self
+ {
+ $this->initialized['unitId'] = true;
+ $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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
+ /**
+ *
+ *
+ * @return ProductUnitLanguageModel[]|null
+ */
+ public function getLanguages() : ?array
+ {
+ return $this->languages;
+ }
+ /**
+ *
+ *
+ * @param ProductUnitLanguageModel[]|null $languages
+ *
+ * @return self
+ */
+ public function setLanguages(?array $languages) : self
+ {
+ $this->initialized['languages'] = true;
+ $this->languages = $languages;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php b/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php
index b6ec7c3c..385380bd 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeLanguageModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 57038c36..597c3809 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeModel.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeModel.php
@@ -2,59 +2,125 @@
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
*
- * @var int
+ * @var int|null
*/
protected $attributeId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* 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->initialized['attributeId'] = true;
$this->attributeId = $attributeId;
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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->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 77187c86..4ac97b70 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 7858bd07..0a4cdbe7 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeModelItem.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 fdac1c02..f81ee9f9 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeModelLanguages.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 39673ccd..2f4aecab 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeModelUpdatable.php
@@ -2,59 +2,125 @@
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);
+ }
/**
*
*
- * @var int
+ * @var int|null
*/
protected $attributeId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* 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->initialized['attributeId'] = true;
$this->attributeId = $attributeId;
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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->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 71f5ae1f..4db59ecf 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeValueLanguageModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 e71bd116..2d7d7361 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeValueModel.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeValueModel.php
@@ -2,113 +2,181 @@
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
*
- * @var int
+ * @var int|null
*/
protected $attributeValueId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* 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 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->initialized['attributeValueId'] = true;
$this->attributeValueId = $attributeValueId;
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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['skuSuffix'] = true;
$this->skuSuffix = $skuSuffix;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* A collection of attribute value languages
*
- * @return ProductVariantAttributeValueLanguageModel[]
+ * @return ProductVariantAttributeValueModelLanguages|null
*/
- public function getLanguages() : array
+ public function getLanguages() : ?ProductVariantAttributeValueModelLanguages
{
return $this->languages;
}
/**
* A collection of attribute value languages
*
- * @param ProductVariantAttributeValueLanguageModel[] $languages
+ * @param ProductVariantAttributeValueModelLanguages|null $languages
*
* @return self
*/
- public function setLanguages(array $languages) : self
+ 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 02f42d76..d0665e06 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 09e9e53d..3db5be7e 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php
new file mode 100644
index 00000000..1895d298
--- /dev/null
+++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelLanguages.php
@@ -0,0 +1,43 @@
+initialized);
+ }
+ /**
+ *
+ *
+ * @var ProductVariantAttributeValueLanguageModel[]|null
+ */
+ protected $data;
+ /**
+ *
+ *
+ * @return ProductVariantAttributeValueLanguageModel[]|null
+ */
+ public function getData() : ?array
+ {
+ return $this->data;
+ }
+ /**
+ *
+ *
+ * @param ProductVariantAttributeValueLanguageModel[]|null $data
+ *
+ * @return self
+ */
+ public function setData(?array $data) : self
+ {
+ $this->initialized['data'] = true;
+ $this->data = $data;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php
index 22a69ab2..8c852980 100644
--- a/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php
+++ b/src/Api/Generated/Model/ProductVariantAttributeValueModelUpdatable.php
@@ -2,32 +2,153 @@
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
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
+ /**
+ * The suggested suffix for new Variants using this attribute value
+ *
+ * @var string|null
+ */
+ protected $skuSuffix;
+ /**
+ * The sort order for this attribute value
+ *
+ * @var int|null
+ */
+ protected $sortIndex = 0;
/**
* A collection of attribute value languages
*
- * @var ProductVariantAttributeValueLanguageModel[]
+ * @var ProductVariantAttributeValueLanguageModel[]|null
*/
protected $languages;
+ /**
+ * 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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
+ /**
+ * The suggested suffix for new Variants using this attribute value
+ *
+ * @return string|null
+ */
+ public function getSkuSuffix() : ?string
+ {
+ return $this->skuSuffix;
+ }
+ /**
+ * The suggested suffix for new Variants using this attribute value
+ *
+ * @param string|null $skuSuffix
+ *
+ * @return self
+ */
+ public function setSkuSuffix(?string $skuSuffix) : self
+ {
+ $this->initialized['skuSuffix'] = true;
+ $this->skuSuffix = $skuSuffix;
+ return $this;
+ }
+ /**
+ * The sort order for this attribute value
+ *
+ * @return int|null
+ */
+ public function getSortIndex() : ?int
+ {
+ return $this->sortIndex;
+ }
+ /**
+ * The sort order for this attribute value
+ *
+ * @param int|null $sortIndex
+ *
+ * @return self
+ */
+ public function setSortIndex(?int $sortIndex) : self
+ {
+ $this->initialized['sortIndex'] = true;
+ $this->sortIndex = $sortIndex;
+ return $this;
+ }
/**
* 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->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 48ff160c..4acd6d54 100644
--- a/src/Api/Generated/Model/ProductVariantModelCollection.php
+++ b/src/Api/Generated/Model/ProductVariantModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @var ProductVariantModel[]
+ * @var ProductVariantResponseModel[]|null
*/
protected $data;
/**
* A collection of product variants
*
- * @return ProductVariantModel[]
+ * @return ProductVariantResponseModel[]|null
*/
- public function getData() : array
+ public function getData() : ?array
{
return $this->data;
}
/**
* A collection of product variants
*
- * @param ProductVariantModel[] $data
+ * @param ProductVariantResponseModel[]|null $data
*
* @return self
*/
- public function setData(array $data) : self
+ 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 a952f978..af2bca1e 100644
--- a/src/Api/Generated/Model/ProductVariantModelItem.php
+++ b/src/Api/Generated/Model/ProductVariantModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @var ProductVariantModel
+ * @var ProductVariantResponseModel|null
*/
protected $data;
/**
*
*
- * @return ProductVariantModel
+ * @return ProductVariantResponseModel|null
*/
- public function getData() : ProductVariantModel
+ public function getData() : ?ProductVariantResponseModel
{
return $this->data;
}
/**
*
*
- * @param ProductVariantModel $data
+ * @param ProductVariantResponseModel|null $data
*
* @return self
*/
- public function setData(ProductVariantModel $data) : self
+ 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
new file mode 100644
index 00000000..becf7d4d
--- /dev/null
+++ b/src/Api/Generated/Model/ProductVariantPatchRequestModel.php
@@ -0,0 +1,407 @@
+initialized);
+ }
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @var string|null
+ */
+ 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
+ *
+ * @var bool|null
+ */
+ protected $isActive;
+ /**
+ * The sort index of this variant.
+ *
+ * @var int|null
+ */
+ protected $sortIndex;
+ /**
+ * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint
+ *
+ * @var int|null
+ */
+ protected $stockStatusId;
+ /**
+ * The current stock quantity for this variant
+ *
+ * @var int|null
+ */
+ protected $stockQuantity;
+ /**
+ * The variants weight in KG
+ *
+ * @var float|null
+ */
+ protected $weightInKg;
+ /**
+ * The cost for this variant. Used for statistic and never displayed to customers
+ *
+ * @var string|null
+ */
+ protected $costPrice;
+ /**
+ * European article no
+ *
+ * @var string|null
+ */
+ protected $ean;
+ /**
+ * Manufacturer part no
+ *
+ * @var string|null
+ */
+ protected $mpn;
+ /**
+ * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint
+ *
+ * @var int|null
+ */
+ 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.
+ *
+ * @var int[]|null
+ */
+ protected $attributeValueLinks;
+ /**
+ * An array of pricelists IDs that will use inheritance
+ *
+ * @var int[]|null
+ */
+ protected $volumePricingInheritancePricelistIds;
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @return string|null
+ */
+ public function getSku() : ?string
+ {
+ return $this->sku;
+ }
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @param string|null $sku
+ *
+ * @return self
+ */
+ public function setSku(?string $sku) : self
+ {
+ $this->initialized['sku'] = true;
+ $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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ 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->initialized['isActive'] = true;
+ $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->initialized['sortIndex'] = true;
+ $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->initialized['stockStatusId'] = true;
+ $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->initialized['stockQuantity'] = true;
+ $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->initialized['weightInKg'] = true;
+ $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->initialized['costPrice'] = true;
+ $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->initialized['ean'] = true;
+ $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->initialized['mpn'] = true;
+ $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->initialized['imageFileId'] = true;
+ $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->initialized['attributeValueLinks'] = true;
+ $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->initialized['volumePricingInheritancePricelistIds'] = true;
+ $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantPriceModel.php b/src/Api/Generated/Model/ProductVariantPriceModel.php
index 7177a68f..66174b52 100644
--- a/src/Api/Generated/Model/ProductVariantPriceModel.php
+++ b/src/Api/Generated/Model/ProductVariantPriceModel.php
@@ -2,18 +2,38 @@
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
*
- * @var int
+ * @var int|null
*/
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
*
- * @var float
+ * @var float|null
*/
protected $priceExVat = 0;
/**
@@ -22,45 +42,97 @@ class ProductVariantPriceModel
* @var float|null
*/
protected $specialPriceExVat;
+ /**
+ *
+ *
+ * @var ProductVariantVolumePriceModelCollection|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->initialized['pricelistId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['priceExVat'] = true;
$this->priceExVat = $priceExVat;
return $this;
}
@@ -82,7 +154,30 @@ public function getSpecialPriceExVat() : ?float
*/
public function setSpecialPriceExVat(?float $specialPriceExVat) : self
{
+ $this->initialized['specialPriceExVat'] = true;
$this->specialPriceExVat = $specialPriceExVat;
return $this;
}
+ /**
+ *
+ *
+ * @return ProductVariantVolumePriceModelCollection|null
+ */
+ public function getVolumePrices() : ?ProductVariantVolumePriceModelCollection
+ {
+ return $this->volumePrices;
+ }
+ /**
+ *
+ *
+ * @param ProductVariantVolumePriceModelCollection|null $volumePrices
+ *
+ * @return self
+ */
+ public function setVolumePrices(?ProductVariantVolumePriceModelCollection $volumePrices) : self
+ {
+ $this->initialized['volumePrices'] = true;
+ $this->volumePrices = $volumePrices;
+ return $this;
+ }
}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantPriceModelCollection.php b/src/Api/Generated/Model/ProductVariantPriceModelCollection.php
index 79f0ee81..034dc68b 100644
--- a/src/Api/Generated/Model/ProductVariantPriceModelCollection.php
+++ b/src/Api/Generated/Model/ProductVariantPriceModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 ea31d92e..96f4a5ba 100644
--- a/src/Api/Generated/Model/ProductVariantPriceModelItem.php
+++ b/src/Api/Generated/Model/ProductVariantPriceModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
diff --git a/src/Api/Generated/Model/ProductVariantPutRequestModel.php b/src/Api/Generated/Model/ProductVariantPutRequestModel.php
new file mode 100644
index 00000000..3a6f09a0
--- /dev/null
+++ b/src/Api/Generated/Model/ProductVariantPutRequestModel.php
@@ -0,0 +1,407 @@
+initialized);
+ }
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @var string|null
+ */
+ 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
+ *
+ * @var bool|null
+ */
+ protected $isActive = true;
+ /**
+ * The sort index of this variant.
+ *
+ * @var int|null
+ */
+ protected $sortIndex;
+ /**
+ * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint
+ *
+ * @var int|null
+ */
+ protected $stockStatusId;
+ /**
+ * The current stock quantity for this variant
+ *
+ * @var int|null
+ */
+ protected $stockQuantity;
+ /**
+ * The variants weight in KG
+ *
+ * @var float|null
+ */
+ protected $weightInKg;
+ /**
+ * The cost for this variant. Used for statistic and never displayed to customers
+ *
+ * @var string|null
+ */
+ protected $costPrice;
+ /**
+ * European article no
+ *
+ * @var string|null
+ */
+ protected $ean;
+ /**
+ * Manufacturer part no
+ *
+ * @var string|null
+ */
+ protected $mpn;
+ /**
+ * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint
+ *
+ * @var int|null
+ */
+ 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.
+ *
+ * @var int[]|null
+ */
+ protected $attributeValueLinks;
+ /**
+ * An array of pricelists IDs that will use inheritance
+ *
+ * @var int[]|null
+ */
+ protected $volumePricingInheritancePricelistIds;
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @return string|null
+ */
+ public function getSku() : ?string
+ {
+ return $this->sku;
+ }
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @param string|null $sku
+ *
+ * @return self
+ */
+ public function setSku(?string $sku) : self
+ {
+ $this->initialized['sku'] = true;
+ $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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ 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->initialized['isActive'] = true;
+ $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->initialized['sortIndex'] = true;
+ $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->initialized['stockStatusId'] = true;
+ $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->initialized['stockQuantity'] = true;
+ $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->initialized['weightInKg'] = true;
+ $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->initialized['costPrice'] = true;
+ $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->initialized['ean'] = true;
+ $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->initialized['mpn'] = true;
+ $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->initialized['imageFileId'] = true;
+ $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->initialized['attributeValueLinks'] = true;
+ $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->initialized['volumePricingInheritancePricelistIds'] = true;
+ $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/ProductVariantRequestModel.php
similarity index 67%
rename from src/Api/Generated/Model/ProductVariantModel.php
rename to src/Api/Generated/Model/ProductVariantRequestModel.php
index 3f487a61..aa0ccdf4 100644
--- a/src/Api/Generated/Model/ProductVariantModel.php
+++ b/src/Api/Generated/Model/ProductVariantRequestModel.php
@@ -2,24 +2,44 @@
namespace Starweb\Api\Generated\Model;
-class ProductVariantModel
+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)
*
- * @var string
+ * @var string|null
*/
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
*
- * @var bool
+ * @var bool|null
*/
protected $isActive = true;
/**
* The sort index of this variant.
*
- * @var int
+ * @var int|null
*/
protected $sortIndex;
/**
@@ -49,13 +69,13 @@ class ProductVariantModel
/**
* European article no
*
- * @var string
+ * @var string|null
*/
protected $ean;
/**
* Manufacturer part no
*
- * @var string
+ * @var string|null
*/
protected $mpn;
/**
@@ -65,89 +85,124 @@ 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[]
+ * @var int[]|null
*/
protected $attributeValueLinks;
/**
* An array of pricelists IDs that will use inheritance
*
- * @var int[]
+ * @var int[]|null
*/
protected $volumePricingInheritancePricelistIds;
/**
- * A collection of product variant prices
+ * The product variants SKU (stock keeping unit)
*
- * @var ProductVariantPriceModel[]
+ * @return string|null
*/
- protected $prices;
+ public function getSku() : ?string
+ {
+ return $this->sku;
+ }
/**
- * A collection of product variant attribute values
+ * The product variants SKU (stock keeping unit)
*
- * @var ProductVariantAttributeValueModel[]
+ * @param string|null $sku
+ *
+ * @return self
*/
- protected $attributeValues;
+ public function setSku(?string $sku) : self
+ {
+ $this->initialized['sku'] = true;
+ $this->sku = $sku;
+ return $this;
+ }
/**
- * The product variants SKU (stock keeping unit)
+ * The external id of this pricelist
*
- * @return string
+ * @return string|null
*/
- public function getSku() : string
+ public function getExternalId() : ?string
{
- return $this->sku;
+ return $this->externalId;
}
/**
- * The product variants SKU (stock keeping unit)
+ * The external id of this pricelist
*
- * @param string $sku
+ * @param string|null $externalId
*
* @return self
*/
- public function setSku(string $sku) : self
+ public function setExternalId(?string $externalId) : self
{
- $this->sku = $sku;
+ $this->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $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->initialized['isActive'] = true;
$this->isActive = $isActive;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
@@ -169,6 +224,7 @@ public function getStockStatusId() : ?int
*/
public function setStockStatusId(?int $stockStatusId) : self
{
+ $this->initialized['stockStatusId'] = true;
$this->stockStatusId = $stockStatusId;
return $this;
}
@@ -190,6 +246,7 @@ public function getStockQuantity() : ?int
*/
public function setStockQuantity(?int $stockQuantity) : self
{
+ $this->initialized['stockQuantity'] = true;
$this->stockQuantity = $stockQuantity;
return $this;
}
@@ -211,6 +268,7 @@ public function getWeightInKg() : ?float
*/
public function setWeightInKg(?float $weightInKg) : self
{
+ $this->initialized['weightInKg'] = true;
$this->weightInKg = $weightInKg;
return $this;
}
@@ -232,48 +290,51 @@ public function getCostPrice() : ?string
*/
public function setCostPrice(?string $costPrice) : self
{
+ $this->initialized['costPrice'] = true;
$this->costPrice = $costPrice;
return $this;
}
/**
* 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->initialized['ean'] = true;
$this->ean = $ean;
return $this;
}
/**
* 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->initialized['mpn'] = true;
$this->mpn = $mpn;
return $this;
}
@@ -295,91 +356,52 @@ public function getImageFileId() : ?int
*/
public function setImageFileId(?int $imageFileId) : self
{
+ $this->initialized['imageFileId'] = true;
$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
+ * 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
+ * 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->initialized['attributeValueLinks'] = true;
$this->attributeValueLinks = $attributeValueLinks;
return $this;
}
/**
* 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->initialized['volumePricingInheritancePricelistIds'] = true;
$this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds;
return $this;
}
- /**
- * A collection of product variant prices
- *
- * @return ProductVariantPriceModel[]
- */
- public function getPrices() : array
- {
- return $this->prices;
- }
- /**
- * A collection of product variant prices
- *
- * @param ProductVariantPriceModel[] $prices
- *
- * @return self
- */
- public function setPrices(array $prices) : self
- {
- $this->prices = $prices;
- return $this;
- }
- /**
- * A collection of product variant attribute values
- *
- * @return ProductVariantAttributeValueModel[]
- */
- public function getAttributeValues() : array
- {
- return $this->attributeValues;
- }
- /**
- * A collection of product variant attribute values
- *
- * @param ProductVariantAttributeValueModel[] $attributeValues
- *
- * @return self
- */
- public function setAttributeValues(array $attributeValues) : self
- {
- $this->attributeValues = $attributeValues;
- return $this;
- }
}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantResponseModel.php b/src/Api/Generated/Model/ProductVariantResponseModel.php
new file mode 100644
index 00000000..b587ca31
--- /dev/null
+++ b/src/Api/Generated/Model/ProductVariantResponseModel.php
@@ -0,0 +1,491 @@
+initialized);
+ }
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @var string|null
+ */
+ 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
+ *
+ * @var bool|null
+ */
+ protected $isActive = true;
+ /**
+ * The sort index of this variant.
+ *
+ * @var int|null
+ */
+ protected $sortIndex;
+ /**
+ * The ID of the variants stock status. Available stock statuses can be fetched using the /product-stock-statuses endpoint
+ *
+ * @var int|null
+ */
+ protected $stockStatusId;
+ /**
+ * The current stock quantity for this variant
+ *
+ * @var int|null
+ */
+ protected $stockQuantity;
+ /**
+ * The variants weight in KG
+ *
+ * @var float|null
+ */
+ protected $weightInKg;
+ /**
+ * The cost for this variant. Used for statistic and never displayed to customers
+ *
+ * @var string|null
+ */
+ protected $costPrice;
+ /**
+ * European article no
+ *
+ * @var string|null
+ */
+ protected $ean;
+ /**
+ * Manufacturer part no
+ *
+ * @var string|null
+ */
+ protected $mpn;
+ /**
+ * The ID of this variant main image. Available media files can be fetched using the /media-files endpoint
+ *
+ * @var int|null
+ */
+ 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.
+ *
+ * @var int[]|null
+ */
+ protected $attributeValueLinks;
+ /**
+ * An array of pricelists IDs that will use inheritance
+ *
+ * @var int[]|null
+ */
+ protected $volumePricingInheritancePricelistIds;
+ /**
+ * The variant id
+ *
+ * @var int|null
+ */
+ protected $variantId;
+ /**
+ * A collection of product variant prices
+ *
+ * @var ProductVariantPriceModel[]|null
+ */
+ protected $prices;
+ /**
+ * A collection of product variant attribute values
+ *
+ * @var ProductVariantAttributeValueModel[]|null
+ */
+ protected $attributeValues;
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @return string|null
+ */
+ public function getSku() : ?string
+ {
+ return $this->sku;
+ }
+ /**
+ * The product variants SKU (stock keeping unit)
+ *
+ * @param string|null $sku
+ *
+ * @return self
+ */
+ public function setSku(?string $sku) : self
+ {
+ $this->initialized['sku'] = true;
+ $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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ 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->initialized['isActive'] = true;
+ $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->initialized['sortIndex'] = true;
+ $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->initialized['stockStatusId'] = true;
+ $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->initialized['stockQuantity'] = true;
+ $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->initialized['weightInKg'] = true;
+ $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->initialized['costPrice'] = true;
+ $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->initialized['ean'] = true;
+ $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->initialized['mpn'] = true;
+ $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->initialized['imageFileId'] = true;
+ $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->initialized['attributeValueLinks'] = true;
+ $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->initialized['volumePricingInheritancePricelistIds'] = true;
+ $this->volumePricingInheritancePricelistIds = $volumePricingInheritancePricelistIds;
+ return $this;
+ }
+ /**
+ * The variant id
+ *
+ * @return int|null
+ */
+ public function getVariantId() : ?int
+ {
+ return $this->variantId;
+ }
+ /**
+ * The variant id
+ *
+ * @param int|null $variantId
+ *
+ * @return self
+ */
+ public function setVariantId(?int $variantId) : self
+ {
+ $this->initialized['variantId'] = true;
+ $this->variantId = $variantId;
+ return $this;
+ }
+ /**
+ * A collection of product variant prices
+ *
+ * @return ProductVariantPriceModel[]|null
+ */
+ public function getPrices() : ?array
+ {
+ return $this->prices;
+ }
+ /**
+ * A collection of product variant prices
+ *
+ * @param ProductVariantPriceModel[]|null $prices
+ *
+ * @return self
+ */
+ public function setPrices(?array $prices) : self
+ {
+ $this->initialized['prices'] = true;
+ $this->prices = $prices;
+ return $this;
+ }
+ /**
+ * A collection of product variant attribute values
+ *
+ * @return ProductVariantAttributeValueModel[]|null
+ */
+ public function getAttributeValues() : ?array
+ {
+ return $this->attributeValues;
+ }
+ /**
+ * A collection of product variant attribute values
+ *
+ * @param ProductVariantAttributeValueModel[]|null $attributeValues
+ *
+ * @return self
+ */
+ public function setAttributeValues(?array $attributeValues) : self
+ {
+ $this->initialized['attributeValues'] = true;
+ $this->attributeValues = $attributeValues;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantStockModelCollection.php b/src/Api/Generated/Model/ProductVariantStockModelCollection.php
index 28c0fee2..d865a754 100644
--- a/src/Api/Generated/Model/ProductVariantStockModelCollection.php
+++ b/src/Api/Generated/Model/ProductVariantStockModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 b98d4494..fe495e79 100644
--- a/src/Api/Generated/Model/ProductVariantStockModelItem.php
+++ b/src/Api/Generated/Model/ProductVariantStockModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->initialized['data'] = true;
$this->data = $data;
return $this;
}
diff --git a/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php b/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php
new file mode 100644
index 00000000..ad22772e
--- /dev/null
+++ b/src/Api/Generated/Model/ProductVariantStockPatchRequestModel.php
@@ -0,0 +1,71 @@
+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)
+ *
+ * @var int|null
+ */
+ protected $stockStatusId;
+ /**
+ * stock quantity
+ *
+ * @var float|null
+ */
+ protected $stockQuantity;
+ /**
+ * 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)
+ *
+ * @return int|null
+ */
+ public function getStockStatusId() : ?int
+ {
+ return $this->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->initialized['stockStatusId'] = true;
+ $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->initialized['stockQuantity'] = true;
+ $this->stockQuantity = $stockQuantity;
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php b/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php
index c78fa970..b4fa421d 100644
--- a/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php
+++ b/src/Api/Generated/Model/ProductVariantStockPutRequestModel.php
@@ -2,59 +2,69 @@
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)
*
- * @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->initialized['stockStatusId'] = true;
$this->stockStatusId = $stockStatusId;
return $this;
}
/**
* 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->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 4580ad57..7a63aff1 100644
--- a/src/Api/Generated/Model/ProductVariantStockResponseModel.php
+++ b/src/Api/Generated/Model/ProductVariantStockResponseModel.php
@@ -2,86 +2,97 @@
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)
*
- * @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->initialized['stockLocationId'] = true;
$this->stockLocationId = $stockLocationId;
return $this;
}
/**
* 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->initialized['stockStatusId'] = true;
$this->stockStatusId = $stockStatusId;
return $this;
}
/**
* 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->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 18d7d4b5..757bb697 100644
--- a/src/Api/Generated/Model/ProductVariantVolumePriceModel.php
+++ b/src/Api/Generated/Model/ProductVariantVolumePriceModel.php
@@ -2,86 +2,153 @@
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
*
- * @var int
+ * @var int|null
*/
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
*
- * @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->initialized['pricelistId'] = true;
$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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['priceExVat'] = true;
$this->priceExVat = $priceExVat;
return $this;
}
/**
* 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->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 7d08da2e..fe5f41ce 100644
--- a/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php
+++ b/src/Api/Generated/Model/ProductVariantVolumePriceModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 ceb647c0..723c728d 100644
--- a/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php
+++ b/src/Api/Generated/Model/ProductVariantVolumePriceModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 7d745e40..371fc9ae 100644
--- a/src/Api/Generated/Model/ProductVatRateModel.php
+++ b/src/Api/Generated/Model/ProductVatRateModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['countryCode'] = true;
$this->countryCode = $countryCode;
return $this;
}
/**
* 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->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 a1a0cb59..5d13d673 100644
--- a/src/Api/Generated/Model/ProductVatRateModelCollection.php
+++ b/src/Api/Generated/Model/ProductVatRateModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 a6901f49..2997302b 100644
--- a/src/Api/Generated/Model/ProductVatRateModelItem.php
+++ b/src/Api/Generated/Model/ProductVatRateModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 bf526e2b..bf155894 100644
--- a/src/Api/Generated/Model/ProductsAttributesModelItem.php
+++ b/src/Api/Generated/Model/ProductsAttributesModelItem.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 e4fdd0a8..c1da21eb 100644
--- a/src/Api/Generated/Model/ShippingMethodLanguageModel.php
+++ b/src/Api/Generated/Model/ShippingMethodLanguageModel.php
@@ -2,113 +2,125 @@
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
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['title'] = true;
$this->title = $title;
return $this;
}
/**
* 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->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 7ba1e407..1326b888 100644
--- a/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php
+++ b/src/Api/Generated/Model/ShippingMethodLanguageModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 bc80573e..65f49bca 100644
--- a/src/Api/Generated/Model/ShippingMethodModel.php
+++ b/src/Api/Generated/Model/ShippingMethodModel.php
@@ -2,30 +2,38 @@
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
*
- * @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,96 +81,106 @@ class ShippingMethodModel
/**
* Tells whether this method is a "click and collect" or not
*
- * @var bool
+ * @var bool|null
*/
protected $isClickAndCollect;
+ /**
+ * External id for systems like Specter, Fortnox etc
+ *
+ * @var string|null
+ */
+ protected $externalId;
/**
*
*
- * @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->initialized['shippingMethodId'] = true;
$this->shippingMethodId = $shippingMethodId;
return $this;
}
/**
* 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->initialized['active'] = true;
$this->active = $active;
return $this;
}
/**
* 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->initialized['validForCountries'] = true;
$this->validForCountries = $validForCountries;
return $this;
}
/**
* 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->initialized['validCountriesSelected'] = true;
$this->validCountriesSelected = $validCountriesSelected;
return $this;
}
@@ -184,6 +202,7 @@ public function getValidForMinItemsSubtotal() : ?float
*/
public function setValidForMinItemsSubtotal(?float $validForMinItemsSubtotal) : self
{
+ $this->initialized['validForMinItemsSubtotal'] = true;
$this->validForMinItemsSubtotal = $validForMinItemsSubtotal;
return $this;
}
@@ -205,6 +224,7 @@ public function getValidForMaxItemsSubtotal() : ?float
*/
public function setValidForMaxItemsSubtotal(?float $validForMaxItemsSubtotal) : self
{
+ $this->initialized['validForMaxItemsSubtotal'] = true;
$this->validForMaxItemsSubtotal = $validForMaxItemsSubtotal;
return $this;
}
@@ -226,6 +246,7 @@ public function getValidForMinWeight() : ?float
*/
public function setValidForMinWeight(?float $validForMinWeight) : self
{
+ $this->initialized['validForMinWeight'] = true;
$this->validForMinWeight = $validForMinWeight;
return $this;
}
@@ -247,6 +268,7 @@ public function getValidForMaxWeight() : ?float
*/
public function setValidForMaxWeight(?float $validForMaxWeight) : self
{
+ $this->initialized['validForMaxWeight'] = true;
$this->validForMaxWeight = $validForMaxWeight;
return $this;
}
@@ -268,6 +290,7 @@ public function getValidForCustomerType() : ?string
*/
public function setValidForCustomerType(?string $validForCustomerType) : self
{
+ $this->initialized['validForCustomerType'] = true;
$this->validForCustomerType = $validForCustomerType;
return $this;
}
@@ -289,6 +312,7 @@ public function getFreeShippingMinItemsSubtotal() : ?float
*/
public function setFreeShippingMinItemsSubtotal(?float $freeShippingMinItemsSubtotal) : self
{
+ $this->initialized['freeShippingMinItemsSubtotal'] = true;
$this->freeShippingMinItemsSubtotal = $freeShippingMinItemsSubtotal;
return $this;
}
@@ -310,48 +334,73 @@ public function getFreeShippingMinWeight() : ?float
*/
public function setFreeShippingMinWeight(?float $freeShippingMinWeight) : self
{
+ $this->initialized['freeShippingMinWeight'] = true;
$this->freeShippingMinWeight = $freeShippingMinWeight;
return $this;
}
/**
* 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->initialized['isClickAndCollect'] = true;
$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->initialized['externalId'] = true;
+ $this->externalId = $externalId;
+ return $this;
+ }
/**
*
*
- * @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->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 f1a1727e..5c682bcc 100644
--- a/src/Api/Generated/Model/ShippingMethodModelCollection.php
+++ b/src/Api/Generated/Model/ShippingMethodModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 7bda301c..6774c6e5 100644
--- a/src/Api/Generated/Model/ShippingMethodModelItem.php
+++ b/src/Api/Generated/Model/ShippingMethodModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 9c9ac796..9dea3c71 100644
--- a/src/Api/Generated/Model/ShippingTrackingTypeModel.php
+++ b/src/Api/Generated/Model/ShippingTrackingTypeModel.php
@@ -2,59 +2,69 @@
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
*
- * @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->initialized['type'] = true;
$this->type = $type;
return $this;
}
/**
* 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->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 ed362e8f..eb0766f0 100644
--- a/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php
+++ b/src/Api/Generated/Model/ShippingTrackingTypeModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 79dece6c..6608f11f 100644
--- a/src/Api/Generated/Model/ShopItem.php
+++ b/src/Api/Generated/Model/ShopItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 47634519..95b5c3ff 100644
--- a/src/Api/Generated/Model/ShopModel.php
+++ b/src/Api/Generated/Model/ShopModel.php
@@ -2,437 +2,461 @@
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
*
- * @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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['idCode'] = true;
$this->idCode = $idCode;
return $this;
}
/**
* 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->initialized['status'] = true;
$this->status = $status;
return $this;
}
/**
* 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->initialized['defaultLangCode'] = true;
$this->defaultLangCode = $defaultLangCode;
return $this;
}
/**
* 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->initialized['activeLangCodes'] = true;
$this->activeLangCodes = $activeLangCodes;
return $this;
}
/**
* 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->initialized['baseCurrency'] = true;
$this->baseCurrency = $baseCurrency;
return $this;
}
/**
* 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->initialized['defaultCustomerCountryCode'] = true;
$this->defaultCustomerCountryCode = $defaultCustomerCountryCode;
return $this;
}
/**
* 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->initialized['generalDefaultVatRate'] = true;
$this->generalDefaultVatRate = $generalDefaultVatRate;
return $this;
}
/**
* 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->initialized['shopCompanyName'] = true;
$this->shopCompanyName = $shopCompanyName;
return $this;
}
/**
* 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->initialized['shopAddress'] = true;
$this->shopAddress = $shopAddress;
return $this;
}
/**
* 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->initialized['shopPostalCode'] = true;
$this->shopPostalCode = $shopPostalCode;
return $this;
}
/**
* 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->initialized['shopCity'] = true;
$this->shopCity = $shopCity;
return $this;
}
/**
* 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->initialized['shopOrgNo'] = true;
$this->shopOrgNo = $shopOrgNo;
return $this;
}
/**
* 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->initialized['shopPhoneNo'] = true;
$this->shopPhoneNo = $shopPhoneNo;
return $this;
}
/**
* 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->initialized['shopVatNo'] = true;
$this->shopVatNo = $shopVatNo;
return $this;
}
/**
* 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->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 a4b4d11d..7fbb33c6 100644
--- a/src/Api/Generated/Model/StockLocationLanguagesModel.php
+++ b/src/Api/Generated/Model/StockLocationLanguagesModel.php
@@ -2,59 +2,69 @@
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)
*
- * @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->initialized['langCode'] = true;
$this->langCode = $langCode;
return $this;
}
/**
* 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->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 da8acc2f..58220378 100644
--- a/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php
+++ b/src/Api/Generated/Model/StockLocationLanguagesModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 0f1ccc86..fbf8446a 100644
--- a/src/Api/Generated/Model/StockLocationModel.php
+++ b/src/Api/Generated/Model/StockLocationModel.php
@@ -2,140 +2,209 @@
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
*
- * @var int
+ * @var int|null
*/
protected $stockLocationId;
+ /**
+ * The external id of this pricelist
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* 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->initialized['stockLocationId'] = true;
$this->stockLocationId = $stockLocationId;
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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['ecommerceStockLocation'] = true;
$this->ecommerceStockLocation = $ecommerceStockLocation;
return $this;
}
/**
*
*
- * @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->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 ca9e4ffb..8613391f 100644
--- a/src/Api/Generated/Model/StockLocationModelCollection.php
+++ b/src/Api/Generated/Model/StockLocationModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 7a8abc1f..a634b1aa 100644
--- a/src/Api/Generated/Model/StockLocationModelItem.php
+++ b/src/Api/Generated/Model/StockLocationModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 422e7a9f..52268657 100644
--- a/src/Api/Generated/Model/StockLocationPostRequestModel.php
+++ b/src/Api/Generated/Model/StockLocationPostRequestModel.php
@@ -2,113 +2,181 @@
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
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* 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 StockLocationLanguagesModel[]|null
*/
protected $languages;
+ /**
+ * 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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['ecommerceStockLocation'] = true;
$this->ecommerceStockLocation = $ecommerceStockLocation;
return $this;
}
/**
*
*
- * @return StockLocationLanguagesModelCollection
+ * @return StockLocationLanguagesModel[]|null
*/
- public function getLanguages() : StockLocationLanguagesModelCollection
+ public function getLanguages() : ?array
{
return $this->languages;
}
/**
*
*
- * @param StockLocationLanguagesModelCollection $languages
+ * @param StockLocationLanguagesModel[]|null $languages
*
* @return self
*/
- public function setLanguages(StockLocationLanguagesModelCollection $languages) : self
+ 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 21be4695..b58a66db 100644
--- a/src/Api/Generated/Model/StockLocationPutRequestModel.php
+++ b/src/Api/Generated/Model/StockLocationPutRequestModel.php
@@ -2,113 +2,181 @@
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
+ *
+ * @var string|null
+ */
+ protected $externalId = '';
+ /**
+ * The system name the externalId belongs to.
+ *
+ * @var string|null
+ */
+ protected $externalIdType;
/**
* 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 StockLocationLanguagesModel[]|null
*/
protected $languages;
+ /**
+ * 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->initialized['externalId'] = true;
+ $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->initialized['externalIdType'] = true;
+ $this->externalIdType = $externalIdType;
+ return $this;
+ }
/**
* 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->initialized['visibility'] = true;
$this->visibility = $visibility;
return $this;
}
/**
* 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->initialized['sortIndex'] = true;
$this->sortIndex = $sortIndex;
return $this;
}
/**
* 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->initialized['ecommerceStockLocation'] = true;
$this->ecommerceStockLocation = $ecommerceStockLocation;
return $this;
}
/**
*
*
- * @return StockLocationLanguagesModelCollection
+ * @return StockLocationLanguagesModel[]|null
*/
- public function getLanguages() : StockLocationLanguagesModelCollection
+ public function getLanguages() : ?array
{
return $this->languages;
}
/**
*
*
- * @param StockLocationLanguagesModelCollection $languages
+ * @param StockLocationLanguagesModel[]|null $languages
*
* @return self
*/
- public function setLanguages(StockLocationLanguagesModelCollection $languages) : self
+ 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 4adfc1d3..309b4c95 100644
--- a/src/Api/Generated/Model/TokenModel.php
+++ b/src/Api/Generated/Model/TokenModel.php
@@ -2,86 +2,97 @@
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
*
- * @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->initialized['accessToken'] = true;
$this->accessToken = $accessToken;
return $this;
}
/**
* 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->initialized['scope'] = true;
$this->scope = $scope;
return $this;
}
/**
* 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->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 8d251f45..3bfdbdcd 100644
--- a/src/Api/Generated/Model/VatRateModel.php
+++ b/src/Api/Generated/Model/VatRateModel.php
@@ -2,140 +2,153 @@
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
*
- * @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->initialized['countryCode'] = true;
$this->countryCode = $countryCode;
return $this;
}
/**
* 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->initialized['defaultVatRate'] = true;
$this->defaultVatRate = $defaultVatRate;
return $this;
}
/**
* 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->initialized['fixedOrderPaymentVatRate'] = true;
$this->fixedOrderPaymentVatRate = $fixedOrderPaymentVatRate;
return $this;
}
/**
* 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->initialized['fixedOrderShippingVatRate'] = true;
$this->fixedOrderShippingVatRate = $fixedOrderShippingVatRate;
return $this;
}
/**
* 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->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 a03960be..2e1d7887 100644
--- a/src/Api/Generated/Model/VatRateModelCollection.php
+++ b/src/Api/Generated/Model/VatRateModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 017a9b6c..1fe6189f 100644
--- a/src/Api/Generated/Model/VatRateModelItem.php
+++ b/src/Api/Generated/Model/VatRateModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 ca028eb6..141b3b09 100644
--- a/src/Api/Generated/Model/WebHookModel.php
+++ b/src/Api/Generated/Model/WebHookModel.php
@@ -2,140 +2,153 @@
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
*
- * @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;
/**
* The id of an order status. Only used with the order-status-changes event.
*
- * @var int
+ * @var int|null
*/
protected $statusId;
/**
* 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->initialized['webHookId'] = true;
$this->webHookId = $webHookId;
return $this;
}
/**
* 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->initialized['name'] = true;
$this->name = $name;
return $this;
}
/**
* 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->initialized['event'] = true;
$this->event = $event;
return $this;
}
/**
* 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->initialized['statusId'] = true;
$this->statusId = $statusId;
return $this;
}
/**
* 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->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 2142f196..84bfd092 100644
--- a/src/Api/Generated/Model/WebHookModelCollection.php
+++ b/src/Api/Generated/Model/WebHookModelCollection.php
@@ -2,32 +2,41 @@
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
*
- * @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->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 815173c3..b52eb9a6 100644
--- a/src/Api/Generated/Model/WebHookModelItem.php
+++ b/src/Api/Generated/Model/WebHookModelItem.php
@@ -2,32 +2,41 @@
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);
+ }
/**
*
*
- * @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->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 50b572a4..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 cd752879..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\AddressModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $object->setFirstName($data->{'firstName'});
+ elseif (\array_key_exists('attention', $data) && $data['attention'] === null) {
+ $object->setAttention(null);
}
- if (property_exists($data, 'lastName')) {
- $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')) {
- $object->setCareOf($data->{'careOf'});
+ elseif (\array_key_exists('reference', $data) && $data['reference'] === null) {
+ $object->setReference(null);
}
- if (property_exists($data, 'attention')) {
- $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')) {
- $object->setReference($data->{'reference'});
+ elseif (\array_key_exists('address', $data) && $data['address'] === null) {
+ $object->setAddress(null);
}
- if (property_exists($data, 'address')) {
- $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')) {
- $object->setPostalCode($data->{'postalCode'});
+ elseif (\array_key_exists('postalCode', $data) && $data['postalCode'] === null) {
+ $object->setPostalCode(null);
}
- if (property_exists($data, 'city')) {
- $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')) {
- $object->setState($data->{'state'});
+ elseif (\array_key_exists('city', $data) && $data['city'] === null) {
+ $object->setCity(null);
}
- if (property_exists($data, 'countryCode')) {
- $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')) {
- $object->setPhoneNo($data->{'phoneNo'});
+ elseif (\array_key_exists('state', $data) && $data['state'] === null) {
+ $object->setState(null);
}
- if (property_exists($data, 'mobilePhoneNo')) {
- $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 727099b0..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 cc9fb4fc..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 913340df..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\BundledProductsModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setVariantSku($data->{'variantSku'});
+ elseif (\array_key_exists('quantity', $data) && $data['quantity'] === null) {
+ $object->setQuantity(null);
}
- if (property_exists($data, 'quantity')) {
- $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')) {
- $object->setSortIndex($data->{'sortIndex'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'prices')) {
+ 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 904bfd67..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ClientCredentialModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $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 0a030d0d..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 d93b804f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 cb347dba..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,43 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CurrencyModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $object->setExchangeRate($data->{'exchangeRate'});
+ elseif (\array_key_exists('exchangeRate', $data) && $data['exchangeRate'] === null) {
+ $object->setExchangeRate(null);
}
- if (property_exists($data, 'precision')) {
- $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->getCode()) {
- $data->{'code'} = $object->getCode();
+ $data = array();
+ if ($object->isInitialized('exchangeRate') && null !== $object->getExchangeRate()) {
+ $data['exchangeRate'] = $object->getExchangeRate();
}
- if (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 66957891..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 a05c0833..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 dc385839..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddedTagModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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();
}
- 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\\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 6687ce8d..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollectionData';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 bc482ac8..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 e9e72c86..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerAddressesModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 ca582533..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 93f766f6..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,93 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerCreatedModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setType($data->{'type'});
+ elseif (\array_key_exists('vatNo', $data) && $data['vatNo'] === null) {
+ $object->setVatNo(null);
}
- if (property_exists($data, 'email')) {
- $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')) {
- $object->setNationalIdNo($data->{'nationalIdNo'});
+ elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) {
+ $object->setCustomInfo1(null);
}
- if (property_exists($data, 'vatNo')) {
- $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')) {
- $object->setCustomInfo1($data->{'customInfo1'});
+ elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) {
+ $object->setCustomInfo2(null);
}
- if (property_exists($data, 'customInfo2')) {
- $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')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- if (property_exists($data, 'approved')) {
- $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')) {
- $object->setApprovedAt($data->{'approvedAt'});
+ elseif (\array_key_exists('approved', $data) && $data['approved'] === null) {
+ $object->setApproved(null);
}
- if (property_exists($data, 'pricelistId')) {
- $object->setPricelistId($data->{'pricelistId'});
+ if (\array_key_exists('approvedAt', $data) && $data['approvedAt'] !== null) {
+ $object->setApprovedAt($data['approvedAt']);
+ unset($data['approvedAt']);
+ }
+ elseif (\array_key_exists('approvedAt', $data) && $data['approvedAt'] === null) {
+ $object->setApprovedAt(null);
+ }
+ 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->getCustomerId()) {
- $data->{'customerId'} = $object->getCustomerId();
+ $data = array();
+ if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
+ $data['createdAt'] = $object->getCreatedAt();
}
- if (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('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- $data->{'approved'} = $object->getApproved();
- if (null !== $object->getApprovedAt()) {
- $data->{'approvedAt'} = $object->getApprovedAt();
+ foreach ($object as $key => $value) {
+ if (preg_match('/.*/', (string) $key)) {
+ $data[$key] = $value;
+ }
}
- $data->{'pricelistId'} = $object->getPricelistId();
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 a4fa5db1..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 c7451376..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 682cce92..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerExternalServicesModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 ae06fc95..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollectionMeta';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 835e0e00..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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')) {
- $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 c2bf374d..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 ef16f527..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,93 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setType($data->{'type'});
+ elseif (\array_key_exists('vatNo', $data) && $data['vatNo'] === null) {
+ $object->setVatNo(null);
}
- if (property_exists($data, 'email')) {
- $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')) {
- $object->setNationalIdNo($data->{'nationalIdNo'});
+ elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) {
+ $object->setCustomInfo1(null);
}
- if (property_exists($data, 'vatNo')) {
- $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')) {
- $object->setCustomInfo1($data->{'customInfo1'});
+ elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) {
+ $object->setCustomInfo2(null);
}
- if (property_exists($data, 'customInfo2')) {
- $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')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- if (property_exists($data, 'approved')) {
- $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')) {
- $object->setApprovedAt($data->{'approvedAt'});
+ elseif (\array_key_exists('approved', $data) && $data['approved'] === null) {
+ $object->setApproved(null);
}
- if (property_exists($data, 'pricelistId')) {
- $object->setPricelistId($data->{'pricelistId'});
+ if (\array_key_exists('approvedAt', $data) && $data['approvedAt'] !== null) {
+ $object->setApprovedAt($data['approvedAt']);
+ unset($data['approvedAt']);
+ }
+ elseif (\array_key_exists('approvedAt', $data) && $data['approvedAt'] === null) {
+ $object->setApprovedAt(null);
+ }
+ 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->getCustomerId()) {
- $data->{'customerId'} = $object->getCustomerId();
+ $data = array();
+ if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
+ $data['createdAt'] = $object->getCreatedAt();
}
- if (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('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- $data->{'approved'} = $object->getApproved();
- if (null !== $object->getApprovedAt()) {
- $data->{'approvedAt'} = $object->getApprovedAt();
+ foreach ($object as $key => $value) {
+ if (preg_match('/.*/', (string) $key)) {
+ $data[$key] = $value;
+ }
}
- $data->{'pricelistId'} = $object->getPricelistId();
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 05e20b03..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 fb18ef1b..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 35b82458..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerTagModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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();
- }
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ $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 8b8c0290..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 0ff33906..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,89 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setType($data->{'type'});
+ elseif (\array_key_exists('vatNo', $data) && $data['vatNo'] === null) {
+ $object->setVatNo(null);
}
- if (property_exists($data, 'email')) {
- $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')) {
- $object->setNationalIdNo($data->{'nationalIdNo'});
+ elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) {
+ $object->setCustomInfo1(null);
}
- if (property_exists($data, 'vatNo')) {
- $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')) {
- $object->setCustomInfo1($data->{'customInfo1'});
+ elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) {
+ $object->setCustomInfo2(null);
}
- if (property_exists($data, 'customInfo2')) {
- $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')) {
- $object->setPricelistId($data->{'pricelistId'});
+ elseif (\array_key_exists('pricelistId', $data) && $data['pricelistId'] === null) {
+ $object->setPricelistId(null);
}
- if (property_exists($data, 'langCode')) {
- $object->setLangCode($data->{'langCode'});
+ if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) {
+ $object->setExternalId($data['externalId']);
+ unset($data['externalId']);
}
- if (property_exists($data, 'addresses')) {
- $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\CustomerUpdateModelAddresses', 'json', $context));
+ 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('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->getCustomerId()) {
- $data->{'customerId'} = $object->getCustomerId();
+ $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 ($object->isInitialized('email') && null !== $object->getEmail()) {
+ $data['email'] = $object->getEmail();
}
- if (null !== $object->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ if ($object->isInitialized('nationalIdNo') && null !== $object->getNationalIdNo()) {
+ $data['nationalIdNo'] = $object->getNationalIdNo();
}
- if (null !== $object->getType()) {
- $data->{'type'} = $object->getType();
+ if ($object->isInitialized('vatNo') && null !== $object->getVatNo()) {
+ $data['vatNo'] = $object->getVatNo();
}
- if (null !== $object->getEmail()) {
- $data->{'email'} = $object->getEmail();
+ if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) {
+ $data['customInfo1'] = $object->getCustomInfo1();
}
- if (null !== $object->getNationalIdNo()) {
- $data->{'nationalIdNo'} = $object->getNationalIdNo();
+ if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) {
+ $data['customInfo2'] = $object->getCustomInfo2();
}
- if (null !== $object->getVatNo()) {
- $data->{'vatNo'} = $object->getVatNo();
+ if ($object->isInitialized('pricelistId') && null !== $object->getPricelistId()) {
+ $data['pricelistId'] = $object->getPricelistId();
}
- if (null !== $object->getCustomInfo1()) {
- $data->{'customInfo1'} = $object->getCustomInfo1();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getCustomInfo2()) {
- $data->{'customInfo2'} = $object->getCustomInfo2();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- $data->{'pricelistId'} = $object->getPricelistId();
- if (null !== $object->getLangCode()) {
- $data->{'langCode'} = $object->getLangCode();
+ 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);
+ 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 26c3c1b8..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ErrorModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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();
- if (null !== $object->getError()) {
- $data->{'error'} = $object->getError();
- }
- if (null !== $object->getErrorDescription()) {
- $data->{'error_description'} = $object->getErrorDescription();
+ $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 1be86293..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollectionMeta';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 c83acf85..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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')) {
- $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 99d866bd..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 abe862f7..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,79 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setMediaFileId($data->{'mediaFileId'});
+ if (null === $data || false === \is_array($data)) {
+ return $object;
}
- if (property_exists($data, 'name')) {
- $object->setName($data->{'name'});
+ if (\array_key_exists('mediaFileId', $data) && $data['mediaFileId'] !== null) {
+ $object->setMediaFileId($data['mediaFileId']);
+ unset($data['mediaFileId']);
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ elseif (\array_key_exists('mediaFileId', $data) && $data['mediaFileId'] === null) {
+ $object->setMediaFileId(null);
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ if (\array_key_exists('name', $data) && $data['name'] !== null) {
+ $object->setName($data['name']);
+ unset($data['name']);
}
- if (property_exists($data, 'size')) {
- $object->setSize($data->{'size'});
+ elseif (\array_key_exists('name', $data) && $data['name'] === null) {
+ $object->setName(null);
}
- if (property_exists($data, 'mime')) {
- $object->setMime($data->{'mime'});
+ if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) {
+ $object->setCreatedAt($data['createdAt']);
+ unset($data['createdAt']);
}
- if (property_exists($data, 'height')) {
- $object->setHeight($data->{'height'});
+ elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) {
+ $object->setCreatedAt(null);
}
- if (property_exists($data, 'width')) {
- $object->setWidth($data->{'width'});
+ if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) {
+ $object->setModifiedAt($data['modifiedAt']);
+ unset($data['modifiedAt']);
}
- if (property_exists($data, 'url')) {
- $object->setUrl($data->{'url'});
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getMediaFileId()) {
- $data->{'mediaFileId'} = $object->getMediaFileId();
+ if (\array_key_exists('size', $data) && $data['size'] !== null) {
+ $object->setSize($data['size']);
+ unset($data['size']);
+ }
+ elseif (\array_key_exists('size', $data) && $data['size'] === null) {
+ $object->setSize(null);
+ }
+ if (\array_key_exists('mime', $data) && $data['mime'] !== null) {
+ $object->setMime($data['mime']);
+ unset($data['mime']);
}
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ elseif (\array_key_exists('mime', $data) && $data['mime'] === null) {
+ $object->setMime(null);
}
- if (null !== $object->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ if (\array_key_exists('height', $data) && $data['height'] !== null) {
+ $object->setHeight($data['height']);
+ unset($data['height']);
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ elseif (\array_key_exists('height', $data) && $data['height'] === null) {
+ $object->setHeight(null);
}
- if (null !== $object->getSize()) {
- $data->{'size'} = $object->getSize();
+ if (\array_key_exists('width', $data) && $data['width'] !== null) {
+ $object->setWidth($data['width']);
+ unset($data['width']);
}
- if (null !== $object->getMime()) {
- $data->{'mime'} = $object->getMime();
+ elseif (\array_key_exists('width', $data) && $data['width'] === null) {
+ $object->setWidth(null);
}
- if (null !== $object->getHeight()) {
- $data->{'height'} = $object->getHeight();
+ if (\array_key_exists('url', $data) && $data['url'] !== null) {
+ $object->setUrl($data['url']);
+ unset($data['url']);
}
- if (null !== $object->getWidth()) {
- $data->{'width'} = $object->getWidth();
+ elseif (\array_key_exists('url', $data) && $data['url'] === null) {
+ $object->setUrl(null);
}
- if (null !== $object->getUrl()) {
- $data->{'url'} = $object->getUrl();
+ 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 = 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 9c4d4a06..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\MediaFileUploadModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 3965b044..00000000
--- a/src/Api/Generated/Normalizer/NormalizerFactory.php
+++ /dev/null
@@ -1,199 +0,0 @@
-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 433be7f8..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderAddressModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $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')) {
- $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')) {
- $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')) {
- $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 a8814e23..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 168df8f1..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 0ae895ac..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,49 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderCommentModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setText($data->{'text'});
+ elseif (\array_key_exists('text', $data) && $data['text'] === null) {
+ $object->setText(null);
}
- if (property_exists($data, 'from')) {
- $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->getCommentId()) {
- $data->{'commentId'} = $object->getCommentId();
+ $data = array();
+ if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
+ $data['createdAt'] = $object->getCreatedAt();
}
- if (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 c5894c8b..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 a0887758..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,43 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (\array_key_exists('agent', $data) && $data['agent'] !== null) {
+ $object->setAgent($data['agent']);
+ unset($data['agent']);
}
- if (property_exists($data, 'externalIdValue')) {
- $object->setExternalIdValue($data->{'externalIdValue'});
+ elseif (\array_key_exists('agent', $data) && $data['agent'] === null) {
+ $object->setAgent(null);
}
- if (property_exists($data, 'readOnly')) {
- $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->getReadOnly()) {
- $data->{'readOnly'} = $object->getReadOnly();
+ 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 cc189881..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderExternalServicesModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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
new file mode 100644
index 00000000..449095ef
--- /dev/null
+++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemBundledItemsNormalizer.php
@@ -0,0 +1,86 @@
+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 = 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;
+ }
+ 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
new file mode 100644
index 00000000..ee13c28f
--- /dev/null
+++ b/src/Api/Generated/Normalizer/OrderItemBundledModelItemNormalizer.php
@@ -0,0 +1,78 @@
+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 = 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
new file mode 100644
index 00000000..309db660
--- /dev/null
+++ b/src/Api/Generated/Normalizer/OrderItemModelCollectionDataItemNormalizer.php
@@ -0,0 +1,184 @@
+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 (\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);
+ }
+ if (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] !== null) {
+ $object->setUnitSymbol($data['unitSymbol']);
+ unset($data['unitSymbol']);
+ }
+ elseif (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] === null) {
+ $object->setUnitSymbol(null);
+ }
+ if (\array_key_exists('unitPrice', $data) && $data['unitPrice'] !== null) {
+ $object->setUnitPrice($data['unitPrice']);
+ unset($data['unitPrice']);
+ }
+ elseif (\array_key_exists('unitPrice', $data) && $data['unitPrice'] === null) {
+ $object->setUnitPrice(null);
+ }
+ if (\array_key_exists('vatRate', $data) && $data['vatRate'] !== null) {
+ $object->setVatRate($data['vatRate']);
+ unset($data['vatRate']);
+ }
+ elseif (\array_key_exists('vatRate', $data) && $data['vatRate'] === null) {
+ $object->setVatRate(null);
+ }
+ 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);
+ }
+ 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 = array();
+ if ($object->isInitialized('sku') && null !== $object->getSku()) {
+ $data['sku'] = $object->getSku();
+ }
+ if ($object->isInitialized('description') && null !== $object->getDescription()) {
+ $data['description'] = $object->getDescription();
+ }
+ if ($object->isInitialized('quantity') && null !== $object->getQuantity()) {
+ $data['quantity'] = $object->getQuantity();
+ }
+ if ($object->isInitialized('unitSymbol') && null !== $object->getUnitSymbol()) {
+ $data['unitSymbol'] = $object->getUnitSymbol();
+ }
+ if ($object->isInitialized('unitPrice') && null !== $object->getUnitPrice()) {
+ $data['unitPrice'] = $object->getUnitPrice();
+ }
+ if ($object->isInitialized('vatRate') && null !== $object->getVatRate()) {
+ $data['vatRate'] = $object->getVatRate();
+ }
+ if ($object->isInitialized('discount') && null !== $object->getDiscount()) {
+ $data['discount'] = $object->getDiscount();
+ }
+ if ($object->isInitialized('discountType') && null !== $object->getDiscountType()) {
+ $data['discountType'] = $object->getDiscountType();
+ }
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
+ }
+ 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\\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 5bb41f50..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context);
+ 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 a458d194..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 043c7e19..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,85 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderItemModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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']);
}
- if (property_exists($data, 'sku')) {
- $object->setSku($data->{'sku'});
+ elseif (\array_key_exists('description', $data) && $data['description'] === null) {
+ $object->setDescription(null);
}
- if (property_exists($data, 'description')) {
- $object->setDescription($data->{'description'});
+ if (\array_key_exists('quantity', $data) && $data['quantity'] !== null) {
+ $object->setQuantity($data['quantity']);
+ unset($data['quantity']);
}
- if (property_exists($data, 'quantity')) {
- $object->setQuantity($data->{'quantity'});
+ elseif (\array_key_exists('quantity', $data) && $data['quantity'] === null) {
+ $object->setQuantity(null);
}
- if (property_exists($data, 'unitSymbol')) {
- $object->setUnitSymbol($data->{'unitSymbol'});
+ if (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] !== null) {
+ $object->setUnitSymbol($data['unitSymbol']);
+ unset($data['unitSymbol']);
}
- if (property_exists($data, 'unitPrice')) {
- $object->setUnitPrice($data->{'unitPrice'});
+ elseif (\array_key_exists('unitSymbol', $data) && $data['unitSymbol'] === null) {
+ $object->setUnitSymbol(null);
}
- if (property_exists($data, 'vatRate')) {
- $object->setVatRate($data->{'vatRate'});
+ if (\array_key_exists('unitPrice', $data) && $data['unitPrice'] !== null) {
+ $object->setUnitPrice($data['unitPrice']);
+ unset($data['unitPrice']);
}
- if (property_exists($data, 'discount')) {
- $object->setDiscount($data->{'discount'});
+ elseif (\array_key_exists('unitPrice', $data) && $data['unitPrice'] === null) {
+ $object->setUnitPrice(null);
}
- if (property_exists($data, 'discountType')) {
- $object->setDiscountType($data->{'discountType'});
+ if (\array_key_exists('vatRate', $data) && $data['vatRate'] !== null) {
+ $object->setVatRate($data['vatRate']);
+ unset($data['vatRate']);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ elseif (\array_key_exists('vatRate', $data) && $data['vatRate'] === null) {
+ $object->setVatRate(null);
+ }
+ 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->getItemId()) {
- $data->{'itemId'} = $object->getItemId();
+ $data = array();
+ if ($object->isInitialized('sku') && null !== $object->getSku()) {
+ $data['sku'] = $object->getSku();
}
- if (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 428355bf..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollectionMeta';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 ad0c4e32..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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')) {
- $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 65d2e2ce..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 f613aadb..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,355 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setOrderId($data->{'orderId'});
+ if (\array_key_exists('totalAmount', $data) && \is_int($data['totalAmount'])) {
+ $data['totalAmount'] = (double) $data['totalAmount'];
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ if (\array_key_exists('totalVat', $data) && \is_int($data['totalVat'])) {
+ $data['totalVat'] = (double) $data['totalVat'];
}
- if (property_exists($data, 'baseCurrencyCode')) {
- $object->setBaseCurrencyCode($data->{'baseCurrencyCode'});
+ if (\array_key_exists('amountToPay', $data) && \is_int($data['amountToPay'])) {
+ $data['amountToPay'] = (double) $data['amountToPay'];
}
- if (property_exists($data, 'shopCountryCode')) {
- $object->setShopCountryCode($data->{'shopCountryCode'});
+ if (\array_key_exists('totalAmountInBaseCurrency', $data) && \is_int($data['totalAmountInBaseCurrency'])) {
+ $data['totalAmountInBaseCurrency'] = (double) $data['totalAmountInBaseCurrency'];
}
- if (property_exists($data, 'totalAmount')) {
- $object->setTotalAmount($data->{'totalAmount'});
+ if (\array_key_exists('totalVatInBaseCurrency', $data) && \is_int($data['totalVatInBaseCurrency'])) {
+ $data['totalVatInBaseCurrency'] = (double) $data['totalVatInBaseCurrency'];
}
- if (property_exists($data, 'totalVat')) {
- $object->setTotalVat($data->{'totalVat'});
+ if (\array_key_exists('amountToPayInBaseCurrency', $data) && \is_int($data['amountToPayInBaseCurrency'])) {
+ $data['amountToPayInBaseCurrency'] = (double) $data['amountToPayInBaseCurrency'];
}
- if (property_exists($data, 'amountToPay')) {
- $object->setAmountToPay($data->{'amountToPay'});
+ if (\array_key_exists('paymentFee', $data) && \is_int($data['paymentFee'])) {
+ $data['paymentFee'] = (double) $data['paymentFee'];
}
- if (property_exists($data, 'totalAmountInBaseCurrency')) {
- $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'});
+ if (\array_key_exists('paymentVatRate', $data) && \is_int($data['paymentVatRate'])) {
+ $data['paymentVatRate'] = (double) $data['paymentVatRate'];
}
- if (property_exists($data, 'totalVatInBaseCurrency')) {
- $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'});
+ if (\array_key_exists('shippingCost', $data) && \is_int($data['shippingCost'])) {
+ $data['shippingCost'] = (double) $data['shippingCost'];
}
- if (property_exists($data, 'amountToPayInBaseCurrency')) {
- $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'});
+ if (\array_key_exists('shippingVatRate', $data) && \is_int($data['shippingVatRate'])) {
+ $data['shippingVatRate'] = (double) $data['shippingVatRate'];
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ if (\array_key_exists('totalWeight', $data) && \is_int($data['totalWeight'])) {
+ $data['totalWeight'] = (double) $data['totalWeight'];
}
- if (property_exists($data, 'customerId')) {
- $object->setCustomerId($data->{'customerId'});
+ if (\array_key_exists('amountPaid', $data) && \is_int($data['amountPaid'])) {
+ $data['amountPaid'] = (double) $data['amountPaid'];
}
- if (property_exists($data, 'statusId')) {
- $object->setStatusId($data->{'statusId'});
+ if (\array_key_exists('amountPaidInBaseCurrency', $data) && \is_int($data['amountPaidInBaseCurrency'])) {
+ $data['amountPaidInBaseCurrency'] = (double) $data['amountPaidInBaseCurrency'];
}
- if (property_exists($data, 'onOrderStatusChangeSendEmail')) {
- $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'});
+ if (\array_key_exists('currencyExchangeRate', $data) && \is_int($data['currencyExchangeRate'])) {
+ $data['currencyExchangeRate'] = (double) $data['currencyExchangeRate'];
}
- if (property_exists($data, 'onOrderStatusChangeProcessPayment')) {
- $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'});
+ if (null === $data || false === \is_array($data)) {
+ return $object;
}
- if (property_exists($data, 'sendEmailsOnStatusChange')) {
- $object->setSendEmailsOnStatusChange($data->{'sendEmailsOnStatusChange'});
+ if (\array_key_exists('orderId', $data) && $data['orderId'] !== null) {
+ $object->setOrderId($data['orderId']);
+ unset($data['orderId']);
}
- if (property_exists($data, 'shippingMethodId')) {
- $object->setShippingMethodId($data->{'shippingMethodId'});
+ elseif (\array_key_exists('orderId', $data) && $data['orderId'] === null) {
+ $object->setOrderId(null);
}
- if (property_exists($data, 'paymentMethodId')) {
- $object->setPaymentMethodId($data->{'paymentMethodId'});
+ if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) {
+ $object->setModifiedAt($data['modifiedAt']);
+ unset($data['modifiedAt']);
}
- if (property_exists($data, 'paymentMethodIdCode')) {
- $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'});
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- if (property_exists($data, 'paymentMethodName')) {
- $object->setPaymentMethodName($data->{'paymentMethodName'});
+ if (\array_key_exists('paymentMethodExternalId', $data) && $data['paymentMethodExternalId'] !== null) {
+ $object->setPaymentMethodExternalId($data['paymentMethodExternalId']);
+ unset($data['paymentMethodExternalId']);
}
- if (property_exists($data, 'paymentFee')) {
- $object->setPaymentFee($data->{'paymentFee'});
+ elseif (\array_key_exists('paymentMethodExternalId', $data) && $data['paymentMethodExternalId'] === null) {
+ $object->setPaymentMethodExternalId(null);
}
- if (property_exists($data, 'paymentVatRate')) {
- $object->setPaymentVatRate($data->{'paymentVatRate'});
+ if (\array_key_exists('shippingMethodExternalId', $data) && $data['shippingMethodExternalId'] !== null) {
+ $object->setShippingMethodExternalId($data['shippingMethodExternalId']);
+ unset($data['shippingMethodExternalId']);
}
- if (property_exists($data, 'shippingMethodName')) {
- $object->setShippingMethodName($data->{'shippingMethodName'});
+ elseif (\array_key_exists('shippingMethodExternalId', $data) && $data['shippingMethodExternalId'] === null) {
+ $object->setShippingMethodExternalId(null);
}
- if (property_exists($data, 'shippingCost')) {
- $object->setShippingCost($data->{'shippingCost'});
+ if (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] !== null) {
+ $object->setBaseCurrencyCode($data['baseCurrencyCode']);
+ unset($data['baseCurrencyCode']);
}
- if (property_exists($data, 'shippingVatRate')) {
- $object->setShippingVatRate($data->{'shippingVatRate'});
+ elseif (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] === null) {
+ $object->setBaseCurrencyCode(null);
}
- if (property_exists($data, 'totalWeight')) {
- $object->setTotalWeight($data->{'totalWeight'});
+ if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) {
+ $object->setShopCountryCode($data['shopCountryCode']);
+ unset($data['shopCountryCode']);
}
- if (property_exists($data, 'customInfo1')) {
- $object->setCustomInfo1($data->{'customInfo1'});
+ elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) {
+ $object->setShopCountryCode(null);
}
- if (property_exists($data, 'customInfo2')) {
- $object->setCustomInfo2($data->{'customInfo2'});
+ if (\array_key_exists('totalAmount', $data) && $data['totalAmount'] !== null) {
+ $object->setTotalAmount($data['totalAmount']);
+ unset($data['totalAmount']);
}
- if (property_exists($data, 'customInfo3')) {
- $object->setCustomInfo3($data->{'customInfo3'});
+ elseif (\array_key_exists('totalAmount', $data) && $data['totalAmount'] === null) {
+ $object->setTotalAmount(null);
}
- if (property_exists($data, 'customInfo4')) {
- $object->setCustomInfo4($data->{'customInfo4'});
+ if (\array_key_exists('totalVat', $data) && $data['totalVat'] !== null) {
+ $object->setTotalVat($data['totalVat']);
+ unset($data['totalVat']);
}
- if (property_exists($data, 'discountCode')) {
- $object->setDiscountCode($data->{'discountCode'});
+ elseif (\array_key_exists('totalVat', $data) && $data['totalVat'] === null) {
+ $object->setTotalVat(null);
}
- if (property_exists($data, 'amountPaid')) {
- $object->setAmountPaid($data->{'amountPaid'});
+ if (\array_key_exists('amountToPay', $data) && $data['amountToPay'] !== null) {
+ $object->setAmountToPay($data['amountToPay']);
+ unset($data['amountToPay']);
}
- if (property_exists($data, 'amountPaidInBaseCurrency')) {
- $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'});
+ elseif (\array_key_exists('amountToPay', $data) && $data['amountToPay'] === null) {
+ $object->setAmountToPay(null);
}
- if (property_exists($data, 'isComplete')) {
- $object->setIsComplete($data->{'isComplete'});
+ if (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] !== null) {
+ $object->setTotalAmountInBaseCurrency($data['totalAmountInBaseCurrency']);
+ unset($data['totalAmountInBaseCurrency']);
}
- if (property_exists($data, 'currencyCode')) {
- $object->setCurrencyCode($data->{'currencyCode'});
+ elseif (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] === null) {
+ $object->setTotalAmountInBaseCurrency(null);
}
- if (property_exists($data, 'currencyExchangeRate')) {
- $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'});
+ if (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] !== null) {
+ $object->setTotalVatInBaseCurrency($data['totalVatInBaseCurrency']);
+ unset($data['totalVatInBaseCurrency']);
}
- if (property_exists($data, 'currencyPrecision')) {
- $object->setCurrencyPrecision($data->{'currencyPrecision'});
+ elseif (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] === null) {
+ $object->setTotalVatInBaseCurrency(null);
}
- if (property_exists($data, 'langCode')) {
- $object->setLangCode($data->{'langCode'});
+ if (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] !== null) {
+ $object->setAmountToPayInBaseCurrency($data['amountToPayInBaseCurrency']);
+ unset($data['amountToPayInBaseCurrency']);
}
- if (property_exists($data, 'paymentReference')) {
- $object->setPaymentReference($data->{'paymentReference'});
+ elseif (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] === null) {
+ $object->setAmountToPayInBaseCurrency(null);
}
- if (property_exists($data, 'paymentStatus')) {
- $object->setPaymentStatus($data->{'paymentStatus'});
+ if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) {
+ $object->setCreatedAt($data['createdAt']);
+ unset($data['createdAt']);
}
- if (property_exists($data, 'isRead')) {
- $object->setIsRead($data->{'isRead'});
+ elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) {
+ $object->setCreatedAt(null);
}
- if (property_exists($data, 'hasComments')) {
- $object->setHasComments($data->{'hasComments'});
+ if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) {
+ $object->setCustomerId($data['customerId']);
+ unset($data['customerId']);
}
- if (property_exists($data, 'internalComment')) {
- $object->setInternalComment($data->{'internalComment'});
+ elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) {
+ $object->setCustomerId(null);
}
- if (property_exists($data, 'shippingTrackerType')) {
- $object->setShippingTrackerType($data->{'shippingTrackerType'});
+ if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) {
+ $object->setStatusId($data['statusId']);
+ unset($data['statusId']);
}
- if (property_exists($data, 'shippingTrackingNo')) {
- $object->setShippingTrackingNo($data->{'shippingTrackingNo'});
+ elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) {
+ $object->setStatusId(null);
}
- if (property_exists($data, 'originalCustomerEmail')) {
- $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'});
+ if (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] !== null) {
+ $object->setOnOrderStatusChangeSendEmail($data['onOrderStatusChangeSendEmail']);
+ unset($data['onOrderStatusChangeSendEmail']);
}
- if (property_exists($data, 'originalCustomerNationalIdNo')) {
- $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'});
+ elseif (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] === null) {
+ $object->setOnOrderStatusChangeSendEmail(null);
}
- if (property_exists($data, 'originalCustomerVatNo')) {
- $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'});
+ if (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] !== null) {
+ $object->setOnOrderStatusChangeProcessPayment($data['onOrderStatusChangeProcessPayment']);
+ unset($data['onOrderStatusChangeProcessPayment']);
}
- if (property_exists($data, 'originalCustomerCustomInfo1')) {
- $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'});
+ elseif (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] === null) {
+ $object->setOnOrderStatusChangeProcessPayment(null);
}
- if (property_exists($data, 'originalCustomerCustomInfo2')) {
- $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'});
+ if (\array_key_exists('sendEmailsOnStatusChange', $data) && $data['sendEmailsOnStatusChange'] !== null) {
+ $object->setSendEmailsOnStatusChange($data['sendEmailsOnStatusChange']);
+ unset($data['sendEmailsOnStatusChange']);
}
- if (property_exists($data, 'items')) {
- $object->setItems($this->denormalizer->denormalize($data->{'items'}, 'Starweb\\Api\\Generated\\Model\\OrderItemModelCollection', 'json', $context));
+ elseif (\array_key_exists('sendEmailsOnStatusChange', $data) && $data['sendEmailsOnStatusChange'] === null) {
+ $object->setSendEmailsOnStatusChange(null);
}
- if (property_exists($data, 'addresses')) {
- $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressCollection', 'json', $context));
+ if (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] !== null) {
+ $object->setStockLocationId($data['stockLocationId']);
+ unset($data['stockLocationId']);
}
- if (property_exists($data, 'externalServices')) {
- $object->setExternalServices($this->denormalizer->denormalize($data->{'externalServices'}, 'Starweb\\Api\\Generated\\Model\\OrderExternalServiceModelCollection', 'json', $context));
+ elseif (\array_key_exists('stockLocationId', $data) && $data['stockLocationId'] === null) {
+ $object->setStockLocationId(null);
}
- if (property_exists($data, 'customer')) {
- $object->setCustomer($this->denormalizer->denormalize($data->{'customer'}, 'Starweb\\Api\\Generated\\Model\\CustomerModelItem', 'json', $context));
+ if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) {
+ $object->setShippingMethodId($data['shippingMethodId']);
+ unset($data['shippingMethodId']);
}
- if (property_exists($data, 'status')) {
- $object->setStatus($this->denormalizer->denormalize($data->{'status'}, 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem', 'json', $context));
+ elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) {
+ $object->setShippingMethodId(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getOrderId()) {
- $data->{'orderId'} = $object->getOrderId();
+ if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) {
+ $object->setPaymentMethodId($data['paymentMethodId']);
+ unset($data['paymentMethodId']);
+ }
+ elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) {
+ $object->setPaymentMethodId(null);
+ }
+ if (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] !== null) {
+ $object->setPaymentMethodIdCode($data['paymentMethodIdCode']);
+ unset($data['paymentMethodIdCode']);
+ }
+ elseif (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] === null) {
+ $object->setPaymentMethodIdCode(null);
+ }
+ if (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] !== null) {
+ $object->setPaymentMethodName($data['paymentMethodName']);
+ unset($data['paymentMethodName']);
+ }
+ elseif (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] === null) {
+ $object->setPaymentMethodName(null);
+ }
+ if (\array_key_exists('paymentFee', $data) && $data['paymentFee'] !== null) {
+ $object->setPaymentFee($data['paymentFee']);
+ unset($data['paymentFee']);
+ }
+ elseif (\array_key_exists('paymentFee', $data) && $data['paymentFee'] === null) {
+ $object->setPaymentFee(null);
+ }
+ if (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] !== null) {
+ $object->setPaymentVatRate($data['paymentVatRate']);
+ unset($data['paymentVatRate']);
+ }
+ elseif (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] === null) {
+ $object->setPaymentVatRate(null);
+ }
+ if (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] !== null) {
+ $object->setShippingMethodName($data['shippingMethodName']);
+ unset($data['shippingMethodName']);
+ }
+ elseif (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] === null) {
+ $object->setShippingMethodName(null);
+ }
+ if (\array_key_exists('shippingCost', $data) && $data['shippingCost'] !== null) {
+ $object->setShippingCost($data['shippingCost']);
+ unset($data['shippingCost']);
+ }
+ elseif (\array_key_exists('shippingCost', $data) && $data['shippingCost'] === null) {
+ $object->setShippingCost(null);
+ }
+ if (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] !== null) {
+ $object->setShippingVatRate($data['shippingVatRate']);
+ unset($data['shippingVatRate']);
+ }
+ elseif (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] === null) {
+ $object->setShippingVatRate(null);
+ }
+ if (\array_key_exists('totalWeight', $data) && $data['totalWeight'] !== null) {
+ $object->setTotalWeight($data['totalWeight']);
+ unset($data['totalWeight']);
+ }
+ elseif (\array_key_exists('totalWeight', $data) && $data['totalWeight'] === null) {
+ $object->setTotalWeight(null);
+ }
+ if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) {
+ $object->setCustomInfo1($data['customInfo1']);
+ unset($data['customInfo1']);
+ }
+ elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) {
+ $object->setCustomInfo1(null);
+ }
+ if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) {
+ $object->setCustomInfo2($data['customInfo2']);
+ unset($data['customInfo2']);
+ }
+ elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) {
+ $object->setCustomInfo2(null);
+ }
+ if (\array_key_exists('customInfo3', $data) && $data['customInfo3'] !== null) {
+ $object->setCustomInfo3($data['customInfo3']);
+ unset($data['customInfo3']);
+ }
+ elseif (\array_key_exists('customInfo3', $data) && $data['customInfo3'] === null) {
+ $object->setCustomInfo3(null);
+ }
+ if (\array_key_exists('customInfo4', $data) && $data['customInfo4'] !== null) {
+ $object->setCustomInfo4($data['customInfo4']);
+ unset($data['customInfo4']);
+ }
+ elseif (\array_key_exists('customInfo4', $data) && $data['customInfo4'] === null) {
+ $object->setCustomInfo4(null);
+ }
+ if (\array_key_exists('discountCode', $data) && $data['discountCode'] !== null) {
+ $object->setDiscountCode($data['discountCode']);
+ unset($data['discountCode']);
+ }
+ elseif (\array_key_exists('discountCode', $data) && $data['discountCode'] === null) {
+ $object->setDiscountCode(null);
+ }
+ if (\array_key_exists('amountPaid', $data) && $data['amountPaid'] !== null) {
+ $object->setAmountPaid($data['amountPaid']);
+ unset($data['amountPaid']);
+ }
+ elseif (\array_key_exists('amountPaid', $data) && $data['amountPaid'] === null) {
+ $object->setAmountPaid(null);
+ }
+ if (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] !== null) {
+ $object->setAmountPaidInBaseCurrency($data['amountPaidInBaseCurrency']);
+ unset($data['amountPaidInBaseCurrency']);
+ }
+ elseif (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] === null) {
+ $object->setAmountPaidInBaseCurrency(null);
+ }
+ if (\array_key_exists('isComplete', $data) && $data['isComplete'] !== null) {
+ $object->setIsComplete($data['isComplete']);
+ unset($data['isComplete']);
+ }
+ elseif (\array_key_exists('isComplete', $data) && $data['isComplete'] === null) {
+ $object->setIsComplete(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 (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] !== null) {
+ $object->setCurrencyExchangeRate($data['currencyExchangeRate']);
+ unset($data['currencyExchangeRate']);
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ elseif (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] === null) {
+ $object->setCurrencyExchangeRate(null);
}
- if (null !== $object->getBaseCurrencyCode()) {
- $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode();
+ if (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] !== null) {
+ $object->setCurrencyPrecision($data['currencyPrecision']);
+ unset($data['currencyPrecision']);
}
- if (null !== $object->getShopCountryCode()) {
- $data->{'shopCountryCode'} = $object->getShopCountryCode();
+ elseif (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] === null) {
+ $object->setCurrencyPrecision(null);
}
- if (null !== $object->getTotalAmount()) {
- $data->{'totalAmount'} = $object->getTotalAmount();
+ if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) {
+ $object->setLangCode($data['langCode']);
+ unset($data['langCode']);
}
- if (null !== $object->getTotalVat()) {
- $data->{'totalVat'} = $object->getTotalVat();
+ elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) {
+ $object->setLangCode(null);
}
- if (null !== $object->getAmountToPay()) {
- $data->{'amountToPay'} = $object->getAmountToPay();
+ if (\array_key_exists('paymentReference', $data) && $data['paymentReference'] !== null) {
+ $object->setPaymentReference($data['paymentReference']);
+ unset($data['paymentReference']);
}
- if (null !== $object->getTotalAmountInBaseCurrency()) {
- $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency();
+ elseif (\array_key_exists('paymentReference', $data) && $data['paymentReference'] === null) {
+ $object->setPaymentReference(null);
}
- if (null !== $object->getTotalVatInBaseCurrency()) {
- $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency();
+ if (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] !== null) {
+ $object->setPaymentStatus($data['paymentStatus']);
+ unset($data['paymentStatus']);
}
- if (null !== $object->getAmountToPayInBaseCurrency()) {
- $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency();
+ elseif (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] === null) {
+ $object->setPaymentStatus(null);
}
- if (null !== $object->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ if (\array_key_exists('isRead', $data) && $data['isRead'] !== null) {
+ $object->setIsRead($data['isRead']);
+ unset($data['isRead']);
}
- if (null !== $object->getCustomerId()) {
- $data->{'customerId'} = $object->getCustomerId();
+ elseif (\array_key_exists('isRead', $data) && $data['isRead'] === null) {
+ $object->setIsRead(null);
}
- if (null !== $object->getStatusId()) {
- $data->{'statusId'} = $object->getStatusId();
+ if (\array_key_exists('hasComments', $data) && $data['hasComments'] !== null) {
+ $object->setHasComments($data['hasComments']);
+ unset($data['hasComments']);
}
- if (null !== $object->getOnOrderStatusChangeSendEmail()) {
- $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail();
+ elseif (\array_key_exists('hasComments', $data) && $data['hasComments'] === null) {
+ $object->setHasComments(null);
}
- if (null !== $object->getOnOrderStatusChangeProcessPayment()) {
- $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment();
+ if (\array_key_exists('internalComment', $data) && $data['internalComment'] !== null) {
+ $object->setInternalComment($data['internalComment']);
+ unset($data['internalComment']);
}
- if (null !== $object->getSendEmailsOnStatusChange()) {
- $data->{'sendEmailsOnStatusChange'} = $object->getSendEmailsOnStatusChange();
+ elseif (\array_key_exists('internalComment', $data) && $data['internalComment'] === null) {
+ $object->setInternalComment(null);
}
- if (null !== $object->getShippingMethodId()) {
- $data->{'shippingMethodId'} = $object->getShippingMethodId();
+ if (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] !== null) {
+ $object->setShippingTrackerType($data['shippingTrackerType']);
+ unset($data['shippingTrackerType']);
}
- if (null !== $object->getPaymentMethodId()) {
- $data->{'paymentMethodId'} = $object->getPaymentMethodId();
+ elseif (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] === null) {
+ $object->setShippingTrackerType(null);
}
- if (null !== $object->getPaymentMethodIdCode()) {
- $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode();
+ if (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] !== null) {
+ $object->setShippingTrackingNo($data['shippingTrackingNo']);
+ unset($data['shippingTrackingNo']);
}
- if (null !== $object->getPaymentMethodName()) {
- $data->{'paymentMethodName'} = $object->getPaymentMethodName();
+ elseif (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] === null) {
+ $object->setShippingTrackingNo(null);
}
- if (null !== $object->getPaymentFee()) {
- $data->{'paymentFee'} = $object->getPaymentFee();
+ if (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] !== null) {
+ $object->setOriginalCustomerEmail($data['originalCustomerEmail']);
+ unset($data['originalCustomerEmail']);
}
- if (null !== $object->getPaymentVatRate()) {
- $data->{'paymentVatRate'} = $object->getPaymentVatRate();
+ elseif (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] === null) {
+ $object->setOriginalCustomerEmail(null);
}
- if (null !== $object->getShippingMethodName()) {
- $data->{'shippingMethodName'} = $object->getShippingMethodName();
+ if (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] !== null) {
+ $object->setOriginalCustomerNationalIdNo($data['originalCustomerNationalIdNo']);
+ unset($data['originalCustomerNationalIdNo']);
}
- if (null !== $object->getShippingCost()) {
- $data->{'shippingCost'} = $object->getShippingCost();
+ elseif (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] === null) {
+ $object->setOriginalCustomerNationalIdNo(null);
}
- if (null !== $object->getShippingVatRate()) {
- $data->{'shippingVatRate'} = $object->getShippingVatRate();
+ if (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] !== null) {
+ $object->setOriginalCustomerVatNo($data['originalCustomerVatNo']);
+ unset($data['originalCustomerVatNo']);
}
- if (null !== $object->getTotalWeight()) {
- $data->{'totalWeight'} = $object->getTotalWeight();
+ elseif (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] === null) {
+ $object->setOriginalCustomerVatNo(null);
}
- if (null !== $object->getCustomInfo1()) {
- $data->{'customInfo1'} = $object->getCustomInfo1();
+ if (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] !== null) {
+ $object->setOriginalCustomerCustomInfo1($data['originalCustomerCustomInfo1']);
+ unset($data['originalCustomerCustomInfo1']);
}
- if (null !== $object->getCustomInfo2()) {
- $data->{'customInfo2'} = $object->getCustomInfo2();
+ elseif (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] === null) {
+ $object->setOriginalCustomerCustomInfo1(null);
}
- if (null !== $object->getCustomInfo3()) {
- $data->{'customInfo3'} = $object->getCustomInfo3();
+ if (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] !== null) {
+ $object->setOriginalCustomerCustomInfo2($data['originalCustomerCustomInfo2']);
+ unset($data['originalCustomerCustomInfo2']);
}
- if (null !== $object->getCustomInfo4()) {
- $data->{'customInfo4'} = $object->getCustomInfo4();
+ elseif (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] === null) {
+ $object->setOriginalCustomerCustomInfo2(null);
}
- if (null !== $object->getDiscountCode()) {
- $data->{'discountCode'} = $object->getDiscountCode();
+ if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) {
+ $object->setExternalId($data['externalId']);
+ unset($data['externalId']);
}
- if (null !== $object->getAmountPaid()) {
- $data->{'amountPaid'} = $object->getAmountPaid();
+ elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) {
+ $object->setExternalId(null);
}
- if (null !== $object->getAmountPaidInBaseCurrency()) {
- $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency();
+ if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) {
+ $object->setExternalIdType($data['externalIdType']);
+ unset($data['externalIdType']);
}
- if (null !== $object->getIsComplete()) {
- $data->{'isComplete'} = $object->getIsComplete();
+ elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) {
+ $object->setExternalIdType(null);
}
- if (null !== $object->getCurrencyCode()) {
- $data->{'currencyCode'} = $object->getCurrencyCode();
+ 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']);
}
- if (null !== $object->getCurrencyExchangeRate()) {
- $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate();
+ elseif (\array_key_exists('items', $data) && $data['items'] === null) {
+ $object->setItems(null);
}
- if (null !== $object->getCurrencyPrecision()) {
- $data->{'currencyPrecision'} = $object->getCurrencyPrecision();
+ 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']);
}
- if (null !== $object->getLangCode()) {
- $data->{'langCode'} = $object->getLangCode();
+ elseif (\array_key_exists('addresses', $data) && $data['addresses'] === null) {
+ $object->setAddresses(null);
}
- if (null !== $object->getPaymentReference()) {
- $data->{'paymentReference'} = $object->getPaymentReference();
+ 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']);
}
- if (null !== $object->getPaymentStatus()) {
- $data->{'paymentStatus'} = $object->getPaymentStatus();
+ elseif (\array_key_exists('externalServices', $data) && $data['externalServices'] === null) {
+ $object->setExternalServices(null);
}
- if (null !== $object->getIsRead()) {
- $data->{'isRead'} = $object->getIsRead();
+ 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']);
}
- if (null !== $object->getHasComments()) {
- $data->{'hasComments'} = $object->getHasComments();
+ elseif (\array_key_exists('customer', $data) && $data['customer'] === null) {
+ $object->setCustomer(null);
}
- if (null !== $object->getInternalComment()) {
- $data->{'internalComment'} = $object->getInternalComment();
+ 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']);
}
- if (null !== $object->getShippingTrackerType()) {
- $data->{'shippingTrackerType'} = $object->getShippingTrackerType();
+ elseif (\array_key_exists('status', $data) && $data['status'] === null) {
+ $object->setStatus(null);
}
- if (null !== $object->getShippingTrackingNo()) {
- $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo();
+ foreach ($data as $key => $value) {
+ if (preg_match('/.*/', (string) $key)) {
+ $object[$key] = $value;
+ }
}
- if (null !== $object->getOriginalCustomerEmail()) {
- $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail();
+ return $object;
+ }
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = array())
+ {
+ $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 ($object->isInitialized('statusId') && null !== $object->getStatusId()) {
+ $data['statusId'] = $object->getStatusId();
+ }
+ if ($object->isInitialized('onOrderStatusChangeSendEmail') && null !== $object->getOnOrderStatusChangeSendEmail()) {
+ $data['onOrderStatusChangeSendEmail'] = $object->getOnOrderStatusChangeSendEmail();
+ }
+ if ($object->isInitialized('onOrderStatusChangeProcessPayment') && null !== $object->getOnOrderStatusChangeProcessPayment()) {
+ $data['onOrderStatusChangeProcessPayment'] = $object->getOnOrderStatusChangeProcessPayment();
+ }
+ if ($object->isInitialized('sendEmailsOnStatusChange') && null !== $object->getSendEmailsOnStatusChange()) {
+ $data['sendEmailsOnStatusChange'] = $object->getSendEmailsOnStatusChange();
+ }
+ if ($object->isInitialized('stockLocationId') && null !== $object->getStockLocationId()) {
+ $data['stockLocationId'] = $object->getStockLocationId();
+ }
+ if ($object->isInitialized('shippingMethodId') && null !== $object->getShippingMethodId()) {
+ $data['shippingMethodId'] = $object->getShippingMethodId();
+ }
+ if ($object->isInitialized('paymentMethodId') && null !== $object->getPaymentMethodId()) {
+ $data['paymentMethodId'] = $object->getPaymentMethodId();
+ }
+ if ($object->isInitialized('paymentMethodName') && null !== $object->getPaymentMethodName()) {
+ $data['paymentMethodName'] = $object->getPaymentMethodName();
+ }
+ if ($object->isInitialized('paymentFee') && null !== $object->getPaymentFee()) {
+ $data['paymentFee'] = $object->getPaymentFee();
+ }
+ if ($object->isInitialized('paymentVatRate') && null !== $object->getPaymentVatRate()) {
+ $data['paymentVatRate'] = $object->getPaymentVatRate();
+ }
+ if ($object->isInitialized('shippingMethodName') && null !== $object->getShippingMethodName()) {
+ $data['shippingMethodName'] = $object->getShippingMethodName();
+ }
+ if ($object->isInitialized('shippingCost') && null !== $object->getShippingCost()) {
+ $data['shippingCost'] = $object->getShippingCost();
+ }
+ if ($object->isInitialized('shippingVatRate') && null !== $object->getShippingVatRate()) {
+ $data['shippingVatRate'] = $object->getShippingVatRate();
+ }
+ if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) {
+ $data['customInfo1'] = $object->getCustomInfo1();
+ }
+ if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) {
+ $data['customInfo2'] = $object->getCustomInfo2();
+ }
+ if ($object->isInitialized('customInfo3') && null !== $object->getCustomInfo3()) {
+ $data['customInfo3'] = $object->getCustomInfo3();
}
- if (null !== $object->getOriginalCustomerNationalIdNo()) {
- $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo();
+ if ($object->isInitialized('customInfo4') && null !== $object->getCustomInfo4()) {
+ $data['customInfo4'] = $object->getCustomInfo4();
}
- if (null !== $object->getOriginalCustomerVatNo()) {
- $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo();
+ if ($object->isInitialized('discountCode') && null !== $object->getDiscountCode()) {
+ $data['discountCode'] = $object->getDiscountCode();
}
- if (null !== $object->getOriginalCustomerCustomInfo1()) {
- $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1();
+ if ($object->isInitialized('amountPaid') && null !== $object->getAmountPaid()) {
+ $data['amountPaid'] = $object->getAmountPaid();
}
- if (null !== $object->getOriginalCustomerCustomInfo2()) {
- $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2();
+ if ($object->isInitialized('isComplete') && null !== $object->getIsComplete()) {
+ $data['isComplete'] = $object->getIsComplete();
}
- if (null !== $object->getItems()) {
- $data->{'items'} = $this->normalizer->normalize($object->getItems(), 'json', $context);
+ if ($object->isInitialized('currencyCode') && null !== $object->getCurrencyCode()) {
+ $data['currencyCode'] = $object->getCurrencyCode();
}
- if (null !== $object->getAddresses()) {
- $data->{'addresses'} = $this->normalizer->normalize($object->getAddresses(), 'json', $context);
+ if ($object->isInitialized('currencyExchangeRate') && null !== $object->getCurrencyExchangeRate()) {
+ $data['currencyExchangeRate'] = $object->getCurrencyExchangeRate();
}
- if (null !== $object->getExternalServices()) {
- $data->{'externalServices'} = $this->normalizer->normalize($object->getExternalServices(), 'json', $context);
+ if ($object->isInitialized('currencyPrecision') && null !== $object->getCurrencyPrecision()) {
+ $data['currencyPrecision'] = $object->getCurrencyPrecision();
}
- if (null !== $object->getCustomer()) {
- $data->{'customer'} = $this->normalizer->normalize($object->getCustomer(), 'json', $context);
+ if ($object->isInitialized('langCode') && null !== $object->getLangCode()) {
+ $data['langCode'] = $object->getLangCode();
}
- if (null !== $object->getStatus()) {
- $data->{'status'} = $this->normalizer->normalize($object->getStatus(), 'json', $context);
+ if ($object->isInitialized('paymentReference') && null !== $object->getPaymentReference()) {
+ $data['paymentReference'] = $object->getPaymentReference();
+ }
+ if ($object->isInitialized('paymentStatus') && null !== $object->getPaymentStatus()) {
+ $data['paymentStatus'] = $object->getPaymentStatus();
+ }
+ if ($object->isInitialized('isRead') && null !== $object->getIsRead()) {
+ $data['isRead'] = $object->getIsRead();
+ }
+ if ($object->isInitialized('internalComment') && null !== $object->getInternalComment()) {
+ $data['internalComment'] = $object->getInternalComment();
+ }
+ if ($object->isInitialized('shippingTrackerType') && null !== $object->getShippingTrackerType()) {
+ $data['shippingTrackerType'] = $object->getShippingTrackerType();
+ }
+ if ($object->isInitialized('shippingTrackingNo') && null !== $object->getShippingTrackingNo()) {
+ $data['shippingTrackingNo'] = $object->getShippingTrackingNo();
+ }
+ if ($object->isInitialized('originalCustomerEmail') && null !== $object->getOriginalCustomerEmail()) {
+ $data['originalCustomerEmail'] = $object->getOriginalCustomerEmail();
+ }
+ if ($object->isInitialized('originalCustomerNationalIdNo') && null !== $object->getOriginalCustomerNationalIdNo()) {
+ $data['originalCustomerNationalIdNo'] = $object->getOriginalCustomerNationalIdNo();
+ }
+ if ($object->isInitialized('originalCustomerVatNo') && null !== $object->getOriginalCustomerVatNo()) {
+ $data['originalCustomerVatNo'] = $object->getOriginalCustomerVatNo();
+ }
+ if ($object->isInitialized('originalCustomerCustomInfo1') && null !== $object->getOriginalCustomerCustomInfo1()) {
+ $data['originalCustomerCustomInfo1'] = $object->getOriginalCustomerCustomInfo1();
+ }
+ if ($object->isInitialized('originalCustomerCustomInfo2') && null !== $object->getOriginalCustomerCustomInfo2()) {
+ $data['originalCustomerCustomInfo2'] = $object->getOriginalCustomerCustomInfo2();
+ }
+ 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('items') && 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 ($object->isInitialized('externalServices') && 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 ($object->isInitialized('status') && 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 cfd5a6b5..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,339 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderPutModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setOrderId($data->{'orderId'});
+ if (\array_key_exists('totalAmount', $data) && \is_int($data['totalAmount'])) {
+ $data['totalAmount'] = (double) $data['totalAmount'];
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ if (\array_key_exists('totalVat', $data) && \is_int($data['totalVat'])) {
+ $data['totalVat'] = (double) $data['totalVat'];
}
- if (property_exists($data, 'baseCurrencyCode')) {
- $object->setBaseCurrencyCode($data->{'baseCurrencyCode'});
+ if (\array_key_exists('amountToPay', $data) && \is_int($data['amountToPay'])) {
+ $data['amountToPay'] = (double) $data['amountToPay'];
}
- if (property_exists($data, 'shopCountryCode')) {
- $object->setShopCountryCode($data->{'shopCountryCode'});
+ if (\array_key_exists('totalAmountInBaseCurrency', $data) && \is_int($data['totalAmountInBaseCurrency'])) {
+ $data['totalAmountInBaseCurrency'] = (double) $data['totalAmountInBaseCurrency'];
}
- if (property_exists($data, 'totalAmount')) {
- $object->setTotalAmount($data->{'totalAmount'});
+ if (\array_key_exists('totalVatInBaseCurrency', $data) && \is_int($data['totalVatInBaseCurrency'])) {
+ $data['totalVatInBaseCurrency'] = (double) $data['totalVatInBaseCurrency'];
}
- if (property_exists($data, 'totalVat')) {
- $object->setTotalVat($data->{'totalVat'});
+ if (\array_key_exists('amountToPayInBaseCurrency', $data) && \is_int($data['amountToPayInBaseCurrency'])) {
+ $data['amountToPayInBaseCurrency'] = (double) $data['amountToPayInBaseCurrency'];
}
- if (property_exists($data, 'amountToPay')) {
- $object->setAmountToPay($data->{'amountToPay'});
+ if (\array_key_exists('paymentFee', $data) && \is_int($data['paymentFee'])) {
+ $data['paymentFee'] = (double) $data['paymentFee'];
}
- if (property_exists($data, 'totalAmountInBaseCurrency')) {
- $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'});
+ if (\array_key_exists('paymentVatRate', $data) && \is_int($data['paymentVatRate'])) {
+ $data['paymentVatRate'] = (double) $data['paymentVatRate'];
}
- if (property_exists($data, 'totalVatInBaseCurrency')) {
- $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'});
+ if (\array_key_exists('shippingCost', $data) && \is_int($data['shippingCost'])) {
+ $data['shippingCost'] = (double) $data['shippingCost'];
}
- if (property_exists($data, 'amountToPayInBaseCurrency')) {
- $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'});
+ if (\array_key_exists('shippingVatRate', $data) && \is_int($data['shippingVatRate'])) {
+ $data['shippingVatRate'] = (double) $data['shippingVatRate'];
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ if (\array_key_exists('totalWeight', $data) && \is_int($data['totalWeight'])) {
+ $data['totalWeight'] = (double) $data['totalWeight'];
}
- if (property_exists($data, 'customerId')) {
- $object->setCustomerId($data->{'customerId'});
+ if (\array_key_exists('amountPaid', $data) && \is_int($data['amountPaid'])) {
+ $data['amountPaid'] = (double) $data['amountPaid'];
}
- if (property_exists($data, 'statusId')) {
- $object->setStatusId($data->{'statusId'});
+ if (\array_key_exists('amountPaidInBaseCurrency', $data) && \is_int($data['amountPaidInBaseCurrency'])) {
+ $data['amountPaidInBaseCurrency'] = (double) $data['amountPaidInBaseCurrency'];
}
- if (property_exists($data, 'onOrderStatusChangeSendEmail')) {
- $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'});
+ if (\array_key_exists('currencyExchangeRate', $data) && \is_int($data['currencyExchangeRate'])) {
+ $data['currencyExchangeRate'] = (double) $data['currencyExchangeRate'];
}
- if (property_exists($data, 'onOrderStatusChangeProcessPayment')) {
- $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'});
+ if (null === $data || false === \is_array($data)) {
+ return $object;
}
- if (property_exists($data, 'shippingMethodId')) {
- $object->setShippingMethodId($data->{'shippingMethodId'});
+ if (\array_key_exists('orderId', $data) && $data['orderId'] !== null) {
+ $object->setOrderId($data['orderId']);
+ unset($data['orderId']);
}
- if (property_exists($data, 'paymentMethodId')) {
- $object->setPaymentMethodId($data->{'paymentMethodId'});
+ elseif (\array_key_exists('orderId', $data) && $data['orderId'] === null) {
+ $object->setOrderId(null);
}
- if (property_exists($data, 'paymentMethodIdCode')) {
- $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'});
+ if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) {
+ $object->setModifiedAt($data['modifiedAt']);
+ unset($data['modifiedAt']);
}
- if (property_exists($data, 'paymentMethodName')) {
- $object->setPaymentMethodName($data->{'paymentMethodName'});
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- if (property_exists($data, 'paymentFee')) {
- $object->setPaymentFee($data->{'paymentFee'});
+ if (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] !== null) {
+ $object->setBaseCurrencyCode($data['baseCurrencyCode']);
+ unset($data['baseCurrencyCode']);
}
- if (property_exists($data, 'paymentVatRate')) {
- $object->setPaymentVatRate($data->{'paymentVatRate'});
+ elseif (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] === null) {
+ $object->setBaseCurrencyCode(null);
}
- if (property_exists($data, 'shippingMethodName')) {
- $object->setShippingMethodName($data->{'shippingMethodName'});
+ if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) {
+ $object->setShopCountryCode($data['shopCountryCode']);
+ unset($data['shopCountryCode']);
}
- if (property_exists($data, 'shippingCost')) {
- $object->setShippingCost($data->{'shippingCost'});
+ elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) {
+ $object->setShopCountryCode(null);
}
- if (property_exists($data, 'shippingVatRate')) {
- $object->setShippingVatRate($data->{'shippingVatRate'});
+ if (\array_key_exists('totalAmount', $data) && $data['totalAmount'] !== null) {
+ $object->setTotalAmount($data['totalAmount']);
+ unset($data['totalAmount']);
}
- if (property_exists($data, 'totalWeight')) {
- $object->setTotalWeight($data->{'totalWeight'});
+ elseif (\array_key_exists('totalAmount', $data) && $data['totalAmount'] === null) {
+ $object->setTotalAmount(null);
}
- if (property_exists($data, 'customInfo1')) {
- $object->setCustomInfo1($data->{'customInfo1'});
+ if (\array_key_exists('totalVat', $data) && $data['totalVat'] !== null) {
+ $object->setTotalVat($data['totalVat']);
+ unset($data['totalVat']);
}
- if (property_exists($data, 'customInfo2')) {
- $object->setCustomInfo2($data->{'customInfo2'});
+ elseif (\array_key_exists('totalVat', $data) && $data['totalVat'] === null) {
+ $object->setTotalVat(null);
}
- if (property_exists($data, 'customInfo3')) {
- $object->setCustomInfo3($data->{'customInfo3'});
+ if (\array_key_exists('amountToPay', $data) && $data['amountToPay'] !== null) {
+ $object->setAmountToPay($data['amountToPay']);
+ unset($data['amountToPay']);
}
- if (property_exists($data, 'customInfo4')) {
- $object->setCustomInfo4($data->{'customInfo4'});
+ elseif (\array_key_exists('amountToPay', $data) && $data['amountToPay'] === null) {
+ $object->setAmountToPay(null);
}
- if (property_exists($data, 'discountCode')) {
- $object->setDiscountCode($data->{'discountCode'});
+ if (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] !== null) {
+ $object->setTotalAmountInBaseCurrency($data['totalAmountInBaseCurrency']);
+ unset($data['totalAmountInBaseCurrency']);
}
- if (property_exists($data, 'amountPaid')) {
- $object->setAmountPaid($data->{'amountPaid'});
+ elseif (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] === null) {
+ $object->setTotalAmountInBaseCurrency(null);
}
- if (property_exists($data, 'amountPaidInBaseCurrency')) {
- $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'});
+ if (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] !== null) {
+ $object->setTotalVatInBaseCurrency($data['totalVatInBaseCurrency']);
+ unset($data['totalVatInBaseCurrency']);
}
- if (property_exists($data, 'isComplete')) {
- $object->setIsComplete($data->{'isComplete'});
+ elseif (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] === null) {
+ $object->setTotalVatInBaseCurrency(null);
}
- if (property_exists($data, 'currencyCode')) {
- $object->setCurrencyCode($data->{'currencyCode'});
+ if (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] !== null) {
+ $object->setAmountToPayInBaseCurrency($data['amountToPayInBaseCurrency']);
+ unset($data['amountToPayInBaseCurrency']);
}
- if (property_exists($data, 'currencyExchangeRate')) {
- $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'});
+ elseif (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] === null) {
+ $object->setAmountToPayInBaseCurrency(null);
}
- if (property_exists($data, 'currencyPrecision')) {
- $object->setCurrencyPrecision($data->{'currencyPrecision'});
+ if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) {
+ $object->setCreatedAt($data['createdAt']);
+ unset($data['createdAt']);
}
- if (property_exists($data, 'langCode')) {
- $object->setLangCode($data->{'langCode'});
+ elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) {
+ $object->setCreatedAt(null);
}
- if (property_exists($data, 'paymentReference')) {
- $object->setPaymentReference($data->{'paymentReference'});
+ if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) {
+ $object->setCustomerId($data['customerId']);
+ unset($data['customerId']);
}
- if (property_exists($data, 'paymentStatus')) {
- $object->setPaymentStatus($data->{'paymentStatus'});
+ elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) {
+ $object->setCustomerId(null);
}
- if (property_exists($data, 'isRead')) {
- $object->setIsRead($data->{'isRead'});
+ if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) {
+ $object->setStatusId($data['statusId']);
+ unset($data['statusId']);
}
- if (property_exists($data, 'hasComment')) {
- $object->setHasComment($data->{'hasComment'});
+ elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) {
+ $object->setStatusId(null);
}
- if (property_exists($data, 'internalComment')) {
- $object->setInternalComment($data->{'internalComment'});
+ if (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] !== null) {
+ $object->setOnOrderStatusChangeSendEmail($data['onOrderStatusChangeSendEmail']);
+ unset($data['onOrderStatusChangeSendEmail']);
}
- if (property_exists($data, 'shippingTrackerType')) {
- $object->setShippingTrackerType($data->{'shippingTrackerType'});
+ elseif (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] === null) {
+ $object->setOnOrderStatusChangeSendEmail(null);
}
- if (property_exists($data, 'shippingTrackingNo')) {
- $object->setShippingTrackingNo($data->{'shippingTrackingNo'});
+ if (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] !== null) {
+ $object->setOnOrderStatusChangeProcessPayment($data['onOrderStatusChangeProcessPayment']);
+ unset($data['onOrderStatusChangeProcessPayment']);
}
- if (property_exists($data, 'originalCustomerEmail')) {
- $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'});
+ elseif (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] === null) {
+ $object->setOnOrderStatusChangeProcessPayment(null);
}
- if (property_exists($data, 'originalCustomerNationalIdNo')) {
- $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'});
+ if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) {
+ $object->setShippingMethodId($data['shippingMethodId']);
+ unset($data['shippingMethodId']);
}
- if (property_exists($data, 'originalCustomerVatNo')) {
- $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'});
+ elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) {
+ $object->setShippingMethodId(null);
}
- if (property_exists($data, 'originalCustomerCustomInfo1')) {
- $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'});
+ if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) {
+ $object->setPaymentMethodId($data['paymentMethodId']);
+ unset($data['paymentMethodId']);
}
- if (property_exists($data, 'originalCustomerCustomInfo2')) {
- $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'});
+ elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) {
+ $object->setPaymentMethodId(null);
}
- if (property_exists($data, 'items')) {
- $values = array();
- foreach ($data->{'items'} as $value) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context);
- }
- $object->setItems($values);
+ if (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] !== null) {
+ $object->setPaymentMethodIdCode($data['paymentMethodIdCode']);
+ unset($data['paymentMethodIdCode']);
}
- if (property_exists($data, 'addresses')) {
- $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context));
+ elseif (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] === null) {
+ $object->setPaymentMethodIdCode(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getOrderId()) {
- $data->{'orderId'} = $object->getOrderId();
+ if (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] !== null) {
+ $object->setPaymentMethodName($data['paymentMethodName']);
+ unset($data['paymentMethodName']);
+ }
+ elseif (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] === null) {
+ $object->setPaymentMethodName(null);
+ }
+ if (\array_key_exists('paymentFee', $data) && $data['paymentFee'] !== null) {
+ $object->setPaymentFee($data['paymentFee']);
+ unset($data['paymentFee']);
+ }
+ elseif (\array_key_exists('paymentFee', $data) && $data['paymentFee'] === null) {
+ $object->setPaymentFee(null);
+ }
+ if (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] !== null) {
+ $object->setPaymentVatRate($data['paymentVatRate']);
+ unset($data['paymentVatRate']);
+ }
+ elseif (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] === null) {
+ $object->setPaymentVatRate(null);
+ }
+ if (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] !== null) {
+ $object->setShippingMethodName($data['shippingMethodName']);
+ unset($data['shippingMethodName']);
+ }
+ elseif (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] === null) {
+ $object->setShippingMethodName(null);
+ }
+ if (\array_key_exists('shippingCost', $data) && $data['shippingCost'] !== null) {
+ $object->setShippingCost($data['shippingCost']);
+ unset($data['shippingCost']);
+ }
+ elseif (\array_key_exists('shippingCost', $data) && $data['shippingCost'] === null) {
+ $object->setShippingCost(null);
+ }
+ if (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] !== null) {
+ $object->setShippingVatRate($data['shippingVatRate']);
+ unset($data['shippingVatRate']);
+ }
+ elseif (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] === null) {
+ $object->setShippingVatRate(null);
+ }
+ if (\array_key_exists('totalWeight', $data) && $data['totalWeight'] !== null) {
+ $object->setTotalWeight($data['totalWeight']);
+ unset($data['totalWeight']);
+ }
+ elseif (\array_key_exists('totalWeight', $data) && $data['totalWeight'] === null) {
+ $object->setTotalWeight(null);
+ }
+ if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) {
+ $object->setCustomInfo1($data['customInfo1']);
+ unset($data['customInfo1']);
+ }
+ elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) {
+ $object->setCustomInfo1(null);
+ }
+ if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) {
+ $object->setCustomInfo2($data['customInfo2']);
+ unset($data['customInfo2']);
+ }
+ elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) {
+ $object->setCustomInfo2(null);
+ }
+ if (\array_key_exists('customInfo3', $data) && $data['customInfo3'] !== null) {
+ $object->setCustomInfo3($data['customInfo3']);
+ unset($data['customInfo3']);
+ }
+ elseif (\array_key_exists('customInfo3', $data) && $data['customInfo3'] === null) {
+ $object->setCustomInfo3(null);
+ }
+ if (\array_key_exists('customInfo4', $data) && $data['customInfo4'] !== null) {
+ $object->setCustomInfo4($data['customInfo4']);
+ unset($data['customInfo4']);
+ }
+ elseif (\array_key_exists('customInfo4', $data) && $data['customInfo4'] === null) {
+ $object->setCustomInfo4(null);
+ }
+ if (\array_key_exists('discountCode', $data) && $data['discountCode'] !== null) {
+ $object->setDiscountCode($data['discountCode']);
+ unset($data['discountCode']);
+ }
+ elseif (\array_key_exists('discountCode', $data) && $data['discountCode'] === null) {
+ $object->setDiscountCode(null);
+ }
+ if (\array_key_exists('amountPaid', $data) && $data['amountPaid'] !== null) {
+ $object->setAmountPaid($data['amountPaid']);
+ unset($data['amountPaid']);
+ }
+ elseif (\array_key_exists('amountPaid', $data) && $data['amountPaid'] === null) {
+ $object->setAmountPaid(null);
+ }
+ if (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] !== null) {
+ $object->setAmountPaidInBaseCurrency($data['amountPaidInBaseCurrency']);
+ unset($data['amountPaidInBaseCurrency']);
+ }
+ elseif (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] === null) {
+ $object->setAmountPaidInBaseCurrency(null);
+ }
+ if (\array_key_exists('isComplete', $data) && $data['isComplete'] !== null) {
+ $object->setIsComplete($data['isComplete']);
+ unset($data['isComplete']);
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ elseif (\array_key_exists('isComplete', $data) && $data['isComplete'] === null) {
+ $object->setIsComplete(null);
}
- if (null !== $object->getBaseCurrencyCode()) {
- $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode();
+ if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) {
+ $object->setCurrencyCode($data['currencyCode']);
+ unset($data['currencyCode']);
}
- if (null !== $object->getShopCountryCode()) {
- $data->{'shopCountryCode'} = $object->getShopCountryCode();
+ elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) {
+ $object->setCurrencyCode(null);
}
- if (null !== $object->getTotalAmount()) {
- $data->{'totalAmount'} = $object->getTotalAmount();
+ if (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] !== null) {
+ $object->setCurrencyExchangeRate($data['currencyExchangeRate']);
+ unset($data['currencyExchangeRate']);
}
- if (null !== $object->getTotalVat()) {
- $data->{'totalVat'} = $object->getTotalVat();
+ elseif (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] === null) {
+ $object->setCurrencyExchangeRate(null);
}
- if (null !== $object->getAmountToPay()) {
- $data->{'amountToPay'} = $object->getAmountToPay();
+ if (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] !== null) {
+ $object->setCurrencyPrecision($data['currencyPrecision']);
+ unset($data['currencyPrecision']);
}
- if (null !== $object->getTotalAmountInBaseCurrency()) {
- $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency();
+ elseif (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] === null) {
+ $object->setCurrencyPrecision(null);
}
- if (null !== $object->getTotalVatInBaseCurrency()) {
- $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency();
+ if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) {
+ $object->setLangCode($data['langCode']);
+ unset($data['langCode']);
}
- if (null !== $object->getAmountToPayInBaseCurrency()) {
- $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency();
+ elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) {
+ $object->setLangCode(null);
}
- if (null !== $object->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ if (\array_key_exists('paymentReference', $data) && $data['paymentReference'] !== null) {
+ $object->setPaymentReference($data['paymentReference']);
+ unset($data['paymentReference']);
}
- if (null !== $object->getCustomerId()) {
- $data->{'customerId'} = $object->getCustomerId();
+ elseif (\array_key_exists('paymentReference', $data) && $data['paymentReference'] === null) {
+ $object->setPaymentReference(null);
}
- if (null !== $object->getStatusId()) {
- $data->{'statusId'} = $object->getStatusId();
+ if (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] !== null) {
+ $object->setPaymentStatus($data['paymentStatus']);
+ unset($data['paymentStatus']);
}
- if (null !== $object->getOnOrderStatusChangeSendEmail()) {
- $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail();
+ elseif (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] === null) {
+ $object->setPaymentStatus(null);
}
- if (null !== $object->getOnOrderStatusChangeProcessPayment()) {
- $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment();
+ if (\array_key_exists('isRead', $data) && $data['isRead'] !== null) {
+ $object->setIsRead($data['isRead']);
+ unset($data['isRead']);
}
- if (null !== $object->getShippingMethodId()) {
- $data->{'shippingMethodId'} = $object->getShippingMethodId();
+ elseif (\array_key_exists('isRead', $data) && $data['isRead'] === null) {
+ $object->setIsRead(null);
}
- if (null !== $object->getPaymentMethodId()) {
- $data->{'paymentMethodId'} = $object->getPaymentMethodId();
+ if (\array_key_exists('hasComment', $data) && $data['hasComment'] !== null) {
+ $object->setHasComment($data['hasComment']);
+ unset($data['hasComment']);
}
- if (null !== $object->getPaymentMethodIdCode()) {
- $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode();
+ elseif (\array_key_exists('hasComment', $data) && $data['hasComment'] === null) {
+ $object->setHasComment(null);
}
- if (null !== $object->getPaymentMethodName()) {
- $data->{'paymentMethodName'} = $object->getPaymentMethodName();
+ if (\array_key_exists('internalComment', $data) && $data['internalComment'] !== null) {
+ $object->setInternalComment($data['internalComment']);
+ unset($data['internalComment']);
}
- if (null !== $object->getPaymentFee()) {
- $data->{'paymentFee'} = $object->getPaymentFee();
+ elseif (\array_key_exists('internalComment', $data) && $data['internalComment'] === null) {
+ $object->setInternalComment(null);
}
- if (null !== $object->getPaymentVatRate()) {
- $data->{'paymentVatRate'} = $object->getPaymentVatRate();
+ if (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] !== null) {
+ $object->setShippingTrackerType($data['shippingTrackerType']);
+ unset($data['shippingTrackerType']);
}
- if (null !== $object->getShippingMethodName()) {
- $data->{'shippingMethodName'} = $object->getShippingMethodName();
+ elseif (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] === null) {
+ $object->setShippingTrackerType(null);
}
- if (null !== $object->getShippingCost()) {
- $data->{'shippingCost'} = $object->getShippingCost();
+ if (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] !== null) {
+ $object->setShippingTrackingNo($data['shippingTrackingNo']);
+ unset($data['shippingTrackingNo']);
}
- if (null !== $object->getShippingVatRate()) {
- $data->{'shippingVatRate'} = $object->getShippingVatRate();
+ elseif (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] === null) {
+ $object->setShippingTrackingNo(null);
}
- if (null !== $object->getTotalWeight()) {
- $data->{'totalWeight'} = $object->getTotalWeight();
+ if (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] !== null) {
+ $object->setOriginalCustomerEmail($data['originalCustomerEmail']);
+ unset($data['originalCustomerEmail']);
}
- if (null !== $object->getCustomInfo1()) {
- $data->{'customInfo1'} = $object->getCustomInfo1();
+ elseif (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] === null) {
+ $object->setOriginalCustomerEmail(null);
}
- if (null !== $object->getCustomInfo2()) {
- $data->{'customInfo2'} = $object->getCustomInfo2();
+ if (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] !== null) {
+ $object->setOriginalCustomerNationalIdNo($data['originalCustomerNationalIdNo']);
+ unset($data['originalCustomerNationalIdNo']);
}
- if (null !== $object->getCustomInfo3()) {
- $data->{'customInfo3'} = $object->getCustomInfo3();
+ elseif (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] === null) {
+ $object->setOriginalCustomerNationalIdNo(null);
}
- if (null !== $object->getCustomInfo4()) {
- $data->{'customInfo4'} = $object->getCustomInfo4();
+ if (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] !== null) {
+ $object->setOriginalCustomerVatNo($data['originalCustomerVatNo']);
+ unset($data['originalCustomerVatNo']);
}
- if (null !== $object->getDiscountCode()) {
- $data->{'discountCode'} = $object->getDiscountCode();
+ elseif (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] === null) {
+ $object->setOriginalCustomerVatNo(null);
}
- if (null !== $object->getAmountPaid()) {
- $data->{'amountPaid'} = $object->getAmountPaid();
+ if (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] !== null) {
+ $object->setOriginalCustomerCustomInfo1($data['originalCustomerCustomInfo1']);
+ unset($data['originalCustomerCustomInfo1']);
}
- if (null !== $object->getAmountPaidInBaseCurrency()) {
- $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency();
+ elseif (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] === null) {
+ $object->setOriginalCustomerCustomInfo1(null);
}
- if (null !== $object->getIsComplete()) {
- $data->{'isComplete'} = $object->getIsComplete();
+ if (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] !== null) {
+ $object->setOriginalCustomerCustomInfo2($data['originalCustomerCustomInfo2']);
+ unset($data['originalCustomerCustomInfo2']);
}
- if (null !== $object->getCurrencyCode()) {
- $data->{'currencyCode'} = $object->getCurrencyCode();
+ elseif (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] === null) {
+ $object->setOriginalCustomerCustomInfo2(null);
}
- if (null !== $object->getCurrencyExchangeRate()) {
- $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate();
+ if (\array_key_exists('items', $data) && $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);
+ 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']);
+ }
+ 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 = array();
+ if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
+ $data['createdAt'] = $object->getCreatedAt();
+ }
+ if ($object->isInitialized('customerId') && null !== $object->getCustomerId()) {
+ $data['customerId'] = $object->getCustomerId();
+ }
+ $data['statusId'] = $object->getStatusId();
+ if ($object->isInitialized('onOrderStatusChangeSendEmail') && null !== $object->getOnOrderStatusChangeSendEmail()) {
+ $data['onOrderStatusChangeSendEmail'] = $object->getOnOrderStatusChangeSendEmail();
+ }
+ if ($object->isInitialized('onOrderStatusChangeProcessPayment') && null !== $object->getOnOrderStatusChangeProcessPayment()) {
+ $data['onOrderStatusChangeProcessPayment'] = $object->getOnOrderStatusChangeProcessPayment();
+ }
+ if ($object->isInitialized('shippingMethodId') && null !== $object->getShippingMethodId()) {
+ $data['shippingMethodId'] = $object->getShippingMethodId();
+ }
+ if ($object->isInitialized('paymentMethodId') && null !== $object->getPaymentMethodId()) {
+ $data['paymentMethodId'] = $object->getPaymentMethodId();
}
- if (null !== $object->getCurrencyPrecision()) {
- $data->{'currencyPrecision'} = $object->getCurrencyPrecision();
+ if ($object->isInitialized('paymentMethodName') && null !== $object->getPaymentMethodName()) {
+ $data['paymentMethodName'] = $object->getPaymentMethodName();
}
- if (null !== $object->getLangCode()) {
- $data->{'langCode'} = $object->getLangCode();
+ if ($object->isInitialized('paymentFee') && null !== $object->getPaymentFee()) {
+ $data['paymentFee'] = $object->getPaymentFee();
}
- if (null !== $object->getPaymentReference()) {
- $data->{'paymentReference'} = $object->getPaymentReference();
+ if ($object->isInitialized('paymentVatRate') && null !== $object->getPaymentVatRate()) {
+ $data['paymentVatRate'] = $object->getPaymentVatRate();
}
- if (null !== $object->getPaymentStatus()) {
- $data->{'paymentStatus'} = $object->getPaymentStatus();
+ if ($object->isInitialized('shippingMethodName') && null !== $object->getShippingMethodName()) {
+ $data['shippingMethodName'] = $object->getShippingMethodName();
}
- if (null !== $object->getIsRead()) {
- $data->{'isRead'} = $object->getIsRead();
+ if ($object->isInitialized('shippingCost') && null !== $object->getShippingCost()) {
+ $data['shippingCost'] = $object->getShippingCost();
}
- if (null !== $object->getHasComment()) {
- $data->{'hasComment'} = $object->getHasComment();
+ if ($object->isInitialized('shippingVatRate') && null !== $object->getShippingVatRate()) {
+ $data['shippingVatRate'] = $object->getShippingVatRate();
}
- if (null !== $object->getInternalComment()) {
- $data->{'internalComment'} = $object->getInternalComment();
+ if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) {
+ $data['customInfo1'] = $object->getCustomInfo1();
}
- if (null !== $object->getShippingTrackerType()) {
- $data->{'shippingTrackerType'} = $object->getShippingTrackerType();
+ if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) {
+ $data['customInfo2'] = $object->getCustomInfo2();
}
- if (null !== $object->getShippingTrackingNo()) {
- $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo();
+ if ($object->isInitialized('customInfo3') && null !== $object->getCustomInfo3()) {
+ $data['customInfo3'] = $object->getCustomInfo3();
}
- if (null !== $object->getOriginalCustomerEmail()) {
- $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail();
+ if ($object->isInitialized('customInfo4') && null !== $object->getCustomInfo4()) {
+ $data['customInfo4'] = $object->getCustomInfo4();
}
- if (null !== $object->getOriginalCustomerNationalIdNo()) {
- $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo();
+ if ($object->isInitialized('discountCode') && null !== $object->getDiscountCode()) {
+ $data['discountCode'] = $object->getDiscountCode();
}
- if (null !== $object->getOriginalCustomerVatNo()) {
- $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo();
+ if ($object->isInitialized('amountPaid') && null !== $object->getAmountPaid()) {
+ $data['amountPaid'] = $object->getAmountPaid();
}
- if (null !== $object->getOriginalCustomerCustomInfo1()) {
- $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1();
+ if ($object->isInitialized('isComplete') && null !== $object->getIsComplete()) {
+ $data['isComplete'] = $object->getIsComplete();
}
- if (null !== $object->getOriginalCustomerCustomInfo2()) {
- $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2();
+ if ($object->isInitialized('currencyCode') && null !== $object->getCurrencyCode()) {
+ $data['currencyCode'] = $object->getCurrencyCode();
}
- if (null !== $object->getItems()) {
+ if ($object->isInitialized('currencyExchangeRate') && null !== $object->getCurrencyExchangeRate()) {
+ $data['currencyExchangeRate'] = $object->getCurrencyExchangeRate();
+ }
+ if ($object->isInitialized('currencyPrecision') && null !== $object->getCurrencyPrecision()) {
+ $data['currencyPrecision'] = $object->getCurrencyPrecision();
+ }
+ if ($object->isInitialized('langCode') && null !== $object->getLangCode()) {
+ $data['langCode'] = $object->getLangCode();
+ }
+ if ($object->isInitialized('paymentReference') && null !== $object->getPaymentReference()) {
+ $data['paymentReference'] = $object->getPaymentReference();
+ }
+ if ($object->isInitialized('paymentStatus') && null !== $object->getPaymentStatus()) {
+ $data['paymentStatus'] = $object->getPaymentStatus();
+ }
+ if ($object->isInitialized('isRead') && null !== $object->getIsRead()) {
+ $data['isRead'] = $object->getIsRead();
+ }
+ if ($object->isInitialized('internalComment') && null !== $object->getInternalComment()) {
+ $data['internalComment'] = $object->getInternalComment();
+ }
+ if ($object->isInitialized('shippingTrackerType') && null !== $object->getShippingTrackerType()) {
+ $data['shippingTrackerType'] = $object->getShippingTrackerType();
+ }
+ if ($object->isInitialized('shippingTrackingNo') && null !== $object->getShippingTrackingNo()) {
+ $data['shippingTrackingNo'] = $object->getShippingTrackingNo();
+ }
+ if ($object->isInitialized('originalCustomerEmail') && null !== $object->getOriginalCustomerEmail()) {
+ $data['originalCustomerEmail'] = $object->getOriginalCustomerEmail();
+ }
+ if ($object->isInitialized('originalCustomerNationalIdNo') && null !== $object->getOriginalCustomerNationalIdNo()) {
+ $data['originalCustomerNationalIdNo'] = $object->getOriginalCustomerNationalIdNo();
+ }
+ if ($object->isInitialized('originalCustomerVatNo') && null !== $object->getOriginalCustomerVatNo()) {
+ $data['originalCustomerVatNo'] = $object->getOriginalCustomerVatNo();
+ }
+ if ($object->isInitialized('originalCustomerCustomInfo1') && null !== $object->getOriginalCustomerCustomInfo1()) {
+ $data['originalCustomerCustomInfo1'] = $object->getOriginalCustomerCustomInfo1();
+ }
+ if ($object->isInitialized('originalCustomerCustomInfo2') && null !== $object->getOriginalCustomerCustomInfo2()) {
+ $data['originalCustomerCustomInfo2'] = $object->getOriginalCustomerCustomInfo2();
+ }
+ 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
new file mode 100644
index 00000000..9e88e8b5
--- /dev/null
+++ b/src/Api/Generated/Normalizer/OrderStatusLanguageModelCollectionNormalizer.php
@@ -0,0 +1,86 @@
+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 = 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;
+ }
+ 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 1cf3864a..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 aca9be5b..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 eb34d7d9..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 a08745a7..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,57 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderStatusModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setIdCode($data->{'idCode'});
+ elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) {
+ $object->setIdCode(null);
}
- if (property_exists($data, 'languages')) {
- $values = array();
- foreach ($data->{'languages'} as $value) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderStatusLanguageModel', '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;
}
- $object->setLanguages($values);
}
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->getStatusId()) {
- $data->{'statusId'} = $object->getStatusId();
- }
- if (null !== $object->getShouldSendEmail()) {
- $data->{'shouldSendEmail'} = $object->getShouldSendEmail();
+ $data = array();
+ if ($object->isInitialized('shouldSendEmail') && null !== $object->getShouldSendEmail()) {
+ $data['shouldSendEmail'] = $object->getShouldSendEmail();
}
- if (null !== $object->getIdCode()) {
- $data->{'idCode'} = $object->getIdCode();
+ if ($object->isInitialized('languages') && null !== $object->getLanguages()) {
+ $data['languages'] = $this->normalizer->normalize($object->getLanguages(), 'json', $context);
}
- if (null !== $object->getLanguages()) {
- $values = array();
- foreach ($object->getLanguages() as $value) {
- $values[] = $this->normalizer->normalize($value, 'json', $context);
+ foreach ($object as $key => $value) {
+ if (preg_match('/.*/', (string) $key)) {
+ $data[$key] = $value;
}
- $data->{'languages'} = $values;
}
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 47ef7afc..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,339 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\OrderUpdateModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setOrderId($data->{'orderId'});
+ if (\array_key_exists('totalAmount', $data) && \is_int($data['totalAmount'])) {
+ $data['totalAmount'] = (double) $data['totalAmount'];
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ if (\array_key_exists('totalVat', $data) && \is_int($data['totalVat'])) {
+ $data['totalVat'] = (double) $data['totalVat'];
}
- if (property_exists($data, 'baseCurrencyCode')) {
- $object->setBaseCurrencyCode($data->{'baseCurrencyCode'});
+ if (\array_key_exists('amountToPay', $data) && \is_int($data['amountToPay'])) {
+ $data['amountToPay'] = (double) $data['amountToPay'];
}
- if (property_exists($data, 'shopCountryCode')) {
- $object->setShopCountryCode($data->{'shopCountryCode'});
+ if (\array_key_exists('totalAmountInBaseCurrency', $data) && \is_int($data['totalAmountInBaseCurrency'])) {
+ $data['totalAmountInBaseCurrency'] = (double) $data['totalAmountInBaseCurrency'];
}
- if (property_exists($data, 'totalAmount')) {
- $object->setTotalAmount($data->{'totalAmount'});
+ if (\array_key_exists('totalVatInBaseCurrency', $data) && \is_int($data['totalVatInBaseCurrency'])) {
+ $data['totalVatInBaseCurrency'] = (double) $data['totalVatInBaseCurrency'];
}
- if (property_exists($data, 'totalVat')) {
- $object->setTotalVat($data->{'totalVat'});
+ if (\array_key_exists('amountToPayInBaseCurrency', $data) && \is_int($data['amountToPayInBaseCurrency'])) {
+ $data['amountToPayInBaseCurrency'] = (double) $data['amountToPayInBaseCurrency'];
}
- if (property_exists($data, 'amountToPay')) {
- $object->setAmountToPay($data->{'amountToPay'});
+ if (\array_key_exists('paymentFee', $data) && \is_int($data['paymentFee'])) {
+ $data['paymentFee'] = (double) $data['paymentFee'];
}
- if (property_exists($data, 'totalAmountInBaseCurrency')) {
- $object->setTotalAmountInBaseCurrency($data->{'totalAmountInBaseCurrency'});
+ if (\array_key_exists('paymentVatRate', $data) && \is_int($data['paymentVatRate'])) {
+ $data['paymentVatRate'] = (double) $data['paymentVatRate'];
}
- if (property_exists($data, 'totalVatInBaseCurrency')) {
- $object->setTotalVatInBaseCurrency($data->{'totalVatInBaseCurrency'});
+ if (\array_key_exists('shippingCost', $data) && \is_int($data['shippingCost'])) {
+ $data['shippingCost'] = (double) $data['shippingCost'];
}
- if (property_exists($data, 'amountToPayInBaseCurrency')) {
- $object->setAmountToPayInBaseCurrency($data->{'amountToPayInBaseCurrency'});
+ if (\array_key_exists('shippingVatRate', $data) && \is_int($data['shippingVatRate'])) {
+ $data['shippingVatRate'] = (double) $data['shippingVatRate'];
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ if (\array_key_exists('totalWeight', $data) && \is_int($data['totalWeight'])) {
+ $data['totalWeight'] = (double) $data['totalWeight'];
}
- if (property_exists($data, 'customerId')) {
- $object->setCustomerId($data->{'customerId'});
+ if (\array_key_exists('amountPaid', $data) && \is_int($data['amountPaid'])) {
+ $data['amountPaid'] = (double) $data['amountPaid'];
}
- if (property_exists($data, 'statusId')) {
- $object->setStatusId($data->{'statusId'});
+ if (\array_key_exists('amountPaidInBaseCurrency', $data) && \is_int($data['amountPaidInBaseCurrency'])) {
+ $data['amountPaidInBaseCurrency'] = (double) $data['amountPaidInBaseCurrency'];
}
- if (property_exists($data, 'onOrderStatusChangeSendEmail')) {
- $object->setOnOrderStatusChangeSendEmail($data->{'onOrderStatusChangeSendEmail'});
+ if (\array_key_exists('currencyExchangeRate', $data) && \is_int($data['currencyExchangeRate'])) {
+ $data['currencyExchangeRate'] = (double) $data['currencyExchangeRate'];
}
- if (property_exists($data, 'onOrderStatusChangeProcessPayment')) {
- $object->setOnOrderStatusChangeProcessPayment($data->{'onOrderStatusChangeProcessPayment'});
+ if (null === $data || false === \is_array($data)) {
+ return $object;
}
- if (property_exists($data, 'shippingMethodId')) {
- $object->setShippingMethodId($data->{'shippingMethodId'});
+ if (\array_key_exists('orderId', $data) && $data['orderId'] !== null) {
+ $object->setOrderId($data['orderId']);
+ unset($data['orderId']);
}
- if (property_exists($data, 'paymentMethodId')) {
- $object->setPaymentMethodId($data->{'paymentMethodId'});
+ elseif (\array_key_exists('orderId', $data) && $data['orderId'] === null) {
+ $object->setOrderId(null);
}
- if (property_exists($data, 'paymentMethodIdCode')) {
- $object->setPaymentMethodIdCode($data->{'paymentMethodIdCode'});
+ if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) {
+ $object->setModifiedAt($data['modifiedAt']);
+ unset($data['modifiedAt']);
}
- if (property_exists($data, 'paymentMethodName')) {
- $object->setPaymentMethodName($data->{'paymentMethodName'});
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- if (property_exists($data, 'paymentFee')) {
- $object->setPaymentFee($data->{'paymentFee'});
+ if (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] !== null) {
+ $object->setBaseCurrencyCode($data['baseCurrencyCode']);
+ unset($data['baseCurrencyCode']);
}
- if (property_exists($data, 'paymentVatRate')) {
- $object->setPaymentVatRate($data->{'paymentVatRate'});
+ elseif (\array_key_exists('baseCurrencyCode', $data) && $data['baseCurrencyCode'] === null) {
+ $object->setBaseCurrencyCode(null);
}
- if (property_exists($data, 'shippingMethodName')) {
- $object->setShippingMethodName($data->{'shippingMethodName'});
+ if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) {
+ $object->setShopCountryCode($data['shopCountryCode']);
+ unset($data['shopCountryCode']);
}
- if (property_exists($data, 'shippingCost')) {
- $object->setShippingCost($data->{'shippingCost'});
+ elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) {
+ $object->setShopCountryCode(null);
}
- if (property_exists($data, 'shippingVatRate')) {
- $object->setShippingVatRate($data->{'shippingVatRate'});
+ if (\array_key_exists('totalAmount', $data) && $data['totalAmount'] !== null) {
+ $object->setTotalAmount($data['totalAmount']);
+ unset($data['totalAmount']);
}
- if (property_exists($data, 'totalWeight')) {
- $object->setTotalWeight($data->{'totalWeight'});
+ elseif (\array_key_exists('totalAmount', $data) && $data['totalAmount'] === null) {
+ $object->setTotalAmount(null);
}
- if (property_exists($data, 'customInfo1')) {
- $object->setCustomInfo1($data->{'customInfo1'});
+ if (\array_key_exists('totalVat', $data) && $data['totalVat'] !== null) {
+ $object->setTotalVat($data['totalVat']);
+ unset($data['totalVat']);
}
- if (property_exists($data, 'customInfo2')) {
- $object->setCustomInfo2($data->{'customInfo2'});
+ elseif (\array_key_exists('totalVat', $data) && $data['totalVat'] === null) {
+ $object->setTotalVat(null);
}
- if (property_exists($data, 'customInfo3')) {
- $object->setCustomInfo3($data->{'customInfo3'});
+ if (\array_key_exists('amountToPay', $data) && $data['amountToPay'] !== null) {
+ $object->setAmountToPay($data['amountToPay']);
+ unset($data['amountToPay']);
}
- if (property_exists($data, 'customInfo4')) {
- $object->setCustomInfo4($data->{'customInfo4'});
+ elseif (\array_key_exists('amountToPay', $data) && $data['amountToPay'] === null) {
+ $object->setAmountToPay(null);
}
- if (property_exists($data, 'discountCode')) {
- $object->setDiscountCode($data->{'discountCode'});
+ if (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] !== null) {
+ $object->setTotalAmountInBaseCurrency($data['totalAmountInBaseCurrency']);
+ unset($data['totalAmountInBaseCurrency']);
}
- if (property_exists($data, 'amountPaid')) {
- $object->setAmountPaid($data->{'amountPaid'});
+ elseif (\array_key_exists('totalAmountInBaseCurrency', $data) && $data['totalAmountInBaseCurrency'] === null) {
+ $object->setTotalAmountInBaseCurrency(null);
}
- if (property_exists($data, 'amountPaidInBaseCurrency')) {
- $object->setAmountPaidInBaseCurrency($data->{'amountPaidInBaseCurrency'});
+ if (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] !== null) {
+ $object->setTotalVatInBaseCurrency($data['totalVatInBaseCurrency']);
+ unset($data['totalVatInBaseCurrency']);
}
- if (property_exists($data, 'isComplete')) {
- $object->setIsComplete($data->{'isComplete'});
+ elseif (\array_key_exists('totalVatInBaseCurrency', $data) && $data['totalVatInBaseCurrency'] === null) {
+ $object->setTotalVatInBaseCurrency(null);
}
- if (property_exists($data, 'currencyCode')) {
- $object->setCurrencyCode($data->{'currencyCode'});
+ if (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] !== null) {
+ $object->setAmountToPayInBaseCurrency($data['amountToPayInBaseCurrency']);
+ unset($data['amountToPayInBaseCurrency']);
}
- if (property_exists($data, 'currencyExchangeRate')) {
- $object->setCurrencyExchangeRate($data->{'currencyExchangeRate'});
+ elseif (\array_key_exists('amountToPayInBaseCurrency', $data) && $data['amountToPayInBaseCurrency'] === null) {
+ $object->setAmountToPayInBaseCurrency(null);
}
- if (property_exists($data, 'currencyPrecision')) {
- $object->setCurrencyPrecision($data->{'currencyPrecision'});
+ if (\array_key_exists('createdAt', $data) && $data['createdAt'] !== null) {
+ $object->setCreatedAt($data['createdAt']);
+ unset($data['createdAt']);
}
- if (property_exists($data, 'langCode')) {
- $object->setLangCode($data->{'langCode'});
+ elseif (\array_key_exists('createdAt', $data) && $data['createdAt'] === null) {
+ $object->setCreatedAt(null);
}
- if (property_exists($data, 'paymentReference')) {
- $object->setPaymentReference($data->{'paymentReference'});
+ if (\array_key_exists('customerId', $data) && $data['customerId'] !== null) {
+ $object->setCustomerId($data['customerId']);
+ unset($data['customerId']);
}
- if (property_exists($data, 'paymentStatus')) {
- $object->setPaymentStatus($data->{'paymentStatus'});
+ elseif (\array_key_exists('customerId', $data) && $data['customerId'] === null) {
+ $object->setCustomerId(null);
}
- if (property_exists($data, 'isRead')) {
- $object->setIsRead($data->{'isRead'});
+ if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) {
+ $object->setStatusId($data['statusId']);
+ unset($data['statusId']);
}
- if (property_exists($data, 'hasComment')) {
- $object->setHasComment($data->{'hasComment'});
+ elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) {
+ $object->setStatusId(null);
}
- if (property_exists($data, 'internalComment')) {
- $object->setInternalComment($data->{'internalComment'});
+ if (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] !== null) {
+ $object->setOnOrderStatusChangeSendEmail($data['onOrderStatusChangeSendEmail']);
+ unset($data['onOrderStatusChangeSendEmail']);
}
- if (property_exists($data, 'shippingTrackerType')) {
- $object->setShippingTrackerType($data->{'shippingTrackerType'});
+ elseif (\array_key_exists('onOrderStatusChangeSendEmail', $data) && $data['onOrderStatusChangeSendEmail'] === null) {
+ $object->setOnOrderStatusChangeSendEmail(null);
}
- if (property_exists($data, 'shippingTrackingNo')) {
- $object->setShippingTrackingNo($data->{'shippingTrackingNo'});
+ if (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] !== null) {
+ $object->setOnOrderStatusChangeProcessPayment($data['onOrderStatusChangeProcessPayment']);
+ unset($data['onOrderStatusChangeProcessPayment']);
}
- if (property_exists($data, 'originalCustomerEmail')) {
- $object->setOriginalCustomerEmail($data->{'originalCustomerEmail'});
+ elseif (\array_key_exists('onOrderStatusChangeProcessPayment', $data) && $data['onOrderStatusChangeProcessPayment'] === null) {
+ $object->setOnOrderStatusChangeProcessPayment(null);
}
- if (property_exists($data, 'originalCustomerNationalIdNo')) {
- $object->setOriginalCustomerNationalIdNo($data->{'originalCustomerNationalIdNo'});
+ if (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) {
+ $object->setShippingMethodId($data['shippingMethodId']);
+ unset($data['shippingMethodId']);
}
- if (property_exists($data, 'originalCustomerVatNo')) {
- $object->setOriginalCustomerVatNo($data->{'originalCustomerVatNo'});
+ elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) {
+ $object->setShippingMethodId(null);
}
- if (property_exists($data, 'originalCustomerCustomInfo1')) {
- $object->setOriginalCustomerCustomInfo1($data->{'originalCustomerCustomInfo1'});
+ if (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] !== null) {
+ $object->setPaymentMethodId($data['paymentMethodId']);
+ unset($data['paymentMethodId']);
}
- if (property_exists($data, 'originalCustomerCustomInfo2')) {
- $object->setOriginalCustomerCustomInfo2($data->{'originalCustomerCustomInfo2'});
+ elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) {
+ $object->setPaymentMethodId(null);
}
- if (property_exists($data, 'items')) {
- $values = array();
- foreach ($data->{'items'} as $value) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\OrderItemModel', 'json', $context);
- }
- $object->setItems($values);
+ if (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] !== null) {
+ $object->setPaymentMethodIdCode($data['paymentMethodIdCode']);
+ unset($data['paymentMethodIdCode']);
}
- if (property_exists($data, 'addresses')) {
- $object->setAddresses($this->denormalizer->denormalize($data->{'addresses'}, 'Starweb\\Api\\Generated\\Model\\OrderAddressModel', 'json', $context));
+ elseif (\array_key_exists('paymentMethodIdCode', $data) && $data['paymentMethodIdCode'] === null) {
+ $object->setPaymentMethodIdCode(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getOrderId()) {
- $data->{'orderId'} = $object->getOrderId();
+ if (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] !== null) {
+ $object->setPaymentMethodName($data['paymentMethodName']);
+ unset($data['paymentMethodName']);
+ }
+ elseif (\array_key_exists('paymentMethodName', $data) && $data['paymentMethodName'] === null) {
+ $object->setPaymentMethodName(null);
+ }
+ if (\array_key_exists('paymentFee', $data) && $data['paymentFee'] !== null) {
+ $object->setPaymentFee($data['paymentFee']);
+ unset($data['paymentFee']);
+ }
+ elseif (\array_key_exists('paymentFee', $data) && $data['paymentFee'] === null) {
+ $object->setPaymentFee(null);
+ }
+ if (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] !== null) {
+ $object->setPaymentVatRate($data['paymentVatRate']);
+ unset($data['paymentVatRate']);
+ }
+ elseif (\array_key_exists('paymentVatRate', $data) && $data['paymentVatRate'] === null) {
+ $object->setPaymentVatRate(null);
+ }
+ if (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] !== null) {
+ $object->setShippingMethodName($data['shippingMethodName']);
+ unset($data['shippingMethodName']);
+ }
+ elseif (\array_key_exists('shippingMethodName', $data) && $data['shippingMethodName'] === null) {
+ $object->setShippingMethodName(null);
+ }
+ if (\array_key_exists('shippingCost', $data) && $data['shippingCost'] !== null) {
+ $object->setShippingCost($data['shippingCost']);
+ unset($data['shippingCost']);
+ }
+ elseif (\array_key_exists('shippingCost', $data) && $data['shippingCost'] === null) {
+ $object->setShippingCost(null);
+ }
+ if (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] !== null) {
+ $object->setShippingVatRate($data['shippingVatRate']);
+ unset($data['shippingVatRate']);
+ }
+ elseif (\array_key_exists('shippingVatRate', $data) && $data['shippingVatRate'] === null) {
+ $object->setShippingVatRate(null);
+ }
+ if (\array_key_exists('totalWeight', $data) && $data['totalWeight'] !== null) {
+ $object->setTotalWeight($data['totalWeight']);
+ unset($data['totalWeight']);
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ elseif (\array_key_exists('totalWeight', $data) && $data['totalWeight'] === null) {
+ $object->setTotalWeight(null);
}
- if (null !== $object->getBaseCurrencyCode()) {
- $data->{'baseCurrencyCode'} = $object->getBaseCurrencyCode();
+ if (\array_key_exists('customInfo1', $data) && $data['customInfo1'] !== null) {
+ $object->setCustomInfo1($data['customInfo1']);
+ unset($data['customInfo1']);
}
- if (null !== $object->getShopCountryCode()) {
- $data->{'shopCountryCode'} = $object->getShopCountryCode();
+ elseif (\array_key_exists('customInfo1', $data) && $data['customInfo1'] === null) {
+ $object->setCustomInfo1(null);
}
- if (null !== $object->getTotalAmount()) {
- $data->{'totalAmount'} = $object->getTotalAmount();
+ if (\array_key_exists('customInfo2', $data) && $data['customInfo2'] !== null) {
+ $object->setCustomInfo2($data['customInfo2']);
+ unset($data['customInfo2']);
}
- if (null !== $object->getTotalVat()) {
- $data->{'totalVat'} = $object->getTotalVat();
+ elseif (\array_key_exists('customInfo2', $data) && $data['customInfo2'] === null) {
+ $object->setCustomInfo2(null);
}
- if (null !== $object->getAmountToPay()) {
- $data->{'amountToPay'} = $object->getAmountToPay();
+ if (\array_key_exists('customInfo3', $data) && $data['customInfo3'] !== null) {
+ $object->setCustomInfo3($data['customInfo3']);
+ unset($data['customInfo3']);
}
- if (null !== $object->getTotalAmountInBaseCurrency()) {
- $data->{'totalAmountInBaseCurrency'} = $object->getTotalAmountInBaseCurrency();
+ elseif (\array_key_exists('customInfo3', $data) && $data['customInfo3'] === null) {
+ $object->setCustomInfo3(null);
}
- if (null !== $object->getTotalVatInBaseCurrency()) {
- $data->{'totalVatInBaseCurrency'} = $object->getTotalVatInBaseCurrency();
+ if (\array_key_exists('customInfo4', $data) && $data['customInfo4'] !== null) {
+ $object->setCustomInfo4($data['customInfo4']);
+ unset($data['customInfo4']);
}
- if (null !== $object->getAmountToPayInBaseCurrency()) {
- $data->{'amountToPayInBaseCurrency'} = $object->getAmountToPayInBaseCurrency();
+ elseif (\array_key_exists('customInfo4', $data) && $data['customInfo4'] === null) {
+ $object->setCustomInfo4(null);
}
- if (null !== $object->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ if (\array_key_exists('discountCode', $data) && $data['discountCode'] !== null) {
+ $object->setDiscountCode($data['discountCode']);
+ unset($data['discountCode']);
}
- if (null !== $object->getCustomerId()) {
- $data->{'customerId'} = $object->getCustomerId();
+ elseif (\array_key_exists('discountCode', $data) && $data['discountCode'] === null) {
+ $object->setDiscountCode(null);
}
- if (null !== $object->getStatusId()) {
- $data->{'statusId'} = $object->getStatusId();
+ if (\array_key_exists('amountPaid', $data) && $data['amountPaid'] !== null) {
+ $object->setAmountPaid($data['amountPaid']);
+ unset($data['amountPaid']);
}
- if (null !== $object->getOnOrderStatusChangeSendEmail()) {
- $data->{'onOrderStatusChangeSendEmail'} = $object->getOnOrderStatusChangeSendEmail();
+ elseif (\array_key_exists('amountPaid', $data) && $data['amountPaid'] === null) {
+ $object->setAmountPaid(null);
}
- if (null !== $object->getOnOrderStatusChangeProcessPayment()) {
- $data->{'onOrderStatusChangeProcessPayment'} = $object->getOnOrderStatusChangeProcessPayment();
+ if (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] !== null) {
+ $object->setAmountPaidInBaseCurrency($data['amountPaidInBaseCurrency']);
+ unset($data['amountPaidInBaseCurrency']);
}
- if (null !== $object->getShippingMethodId()) {
- $data->{'shippingMethodId'} = $object->getShippingMethodId();
+ elseif (\array_key_exists('amountPaidInBaseCurrency', $data) && $data['amountPaidInBaseCurrency'] === null) {
+ $object->setAmountPaidInBaseCurrency(null);
}
- if (null !== $object->getPaymentMethodId()) {
- $data->{'paymentMethodId'} = $object->getPaymentMethodId();
+ if (\array_key_exists('isComplete', $data) && $data['isComplete'] !== null) {
+ $object->setIsComplete($data['isComplete']);
+ unset($data['isComplete']);
}
- if (null !== $object->getPaymentMethodIdCode()) {
- $data->{'paymentMethodIdCode'} = $object->getPaymentMethodIdCode();
+ elseif (\array_key_exists('isComplete', $data) && $data['isComplete'] === null) {
+ $object->setIsComplete(null);
}
- if (null !== $object->getPaymentMethodName()) {
- $data->{'paymentMethodName'} = $object->getPaymentMethodName();
+ if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) {
+ $object->setCurrencyCode($data['currencyCode']);
+ unset($data['currencyCode']);
}
- if (null !== $object->getPaymentFee()) {
- $data->{'paymentFee'} = $object->getPaymentFee();
+ elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) {
+ $object->setCurrencyCode(null);
}
- if (null !== $object->getPaymentVatRate()) {
- $data->{'paymentVatRate'} = $object->getPaymentVatRate();
+ if (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] !== null) {
+ $object->setCurrencyExchangeRate($data['currencyExchangeRate']);
+ unset($data['currencyExchangeRate']);
}
- if (null !== $object->getShippingMethodName()) {
- $data->{'shippingMethodName'} = $object->getShippingMethodName();
+ elseif (\array_key_exists('currencyExchangeRate', $data) && $data['currencyExchangeRate'] === null) {
+ $object->setCurrencyExchangeRate(null);
}
- if (null !== $object->getShippingCost()) {
- $data->{'shippingCost'} = $object->getShippingCost();
+ if (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] !== null) {
+ $object->setCurrencyPrecision($data['currencyPrecision']);
+ unset($data['currencyPrecision']);
}
- if (null !== $object->getShippingVatRate()) {
- $data->{'shippingVatRate'} = $object->getShippingVatRate();
+ elseif (\array_key_exists('currencyPrecision', $data) && $data['currencyPrecision'] === null) {
+ $object->setCurrencyPrecision(null);
}
- if (null !== $object->getTotalWeight()) {
- $data->{'totalWeight'} = $object->getTotalWeight();
+ if (\array_key_exists('langCode', $data) && $data['langCode'] !== null) {
+ $object->setLangCode($data['langCode']);
+ unset($data['langCode']);
}
- if (null !== $object->getCustomInfo1()) {
- $data->{'customInfo1'} = $object->getCustomInfo1();
+ elseif (\array_key_exists('langCode', $data) && $data['langCode'] === null) {
+ $object->setLangCode(null);
}
- if (null !== $object->getCustomInfo2()) {
- $data->{'customInfo2'} = $object->getCustomInfo2();
+ if (\array_key_exists('paymentReference', $data) && $data['paymentReference'] !== null) {
+ $object->setPaymentReference($data['paymentReference']);
+ unset($data['paymentReference']);
}
- if (null !== $object->getCustomInfo3()) {
- $data->{'customInfo3'} = $object->getCustomInfo3();
+ elseif (\array_key_exists('paymentReference', $data) && $data['paymentReference'] === null) {
+ $object->setPaymentReference(null);
}
- if (null !== $object->getCustomInfo4()) {
- $data->{'customInfo4'} = $object->getCustomInfo4();
+ if (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] !== null) {
+ $object->setPaymentStatus($data['paymentStatus']);
+ unset($data['paymentStatus']);
}
- if (null !== $object->getDiscountCode()) {
- $data->{'discountCode'} = $object->getDiscountCode();
+ elseif (\array_key_exists('paymentStatus', $data) && $data['paymentStatus'] === null) {
+ $object->setPaymentStatus(null);
}
- if (null !== $object->getAmountPaid()) {
- $data->{'amountPaid'} = $object->getAmountPaid();
+ if (\array_key_exists('isRead', $data) && $data['isRead'] !== null) {
+ $object->setIsRead($data['isRead']);
+ unset($data['isRead']);
}
- if (null !== $object->getAmountPaidInBaseCurrency()) {
- $data->{'amountPaidInBaseCurrency'} = $object->getAmountPaidInBaseCurrency();
+ elseif (\array_key_exists('isRead', $data) && $data['isRead'] === null) {
+ $object->setIsRead(null);
}
- if (null !== $object->getIsComplete()) {
- $data->{'isComplete'} = $object->getIsComplete();
+ if (\array_key_exists('hasComment', $data) && $data['hasComment'] !== null) {
+ $object->setHasComment($data['hasComment']);
+ unset($data['hasComment']);
}
- if (null !== $object->getCurrencyCode()) {
- $data->{'currencyCode'} = $object->getCurrencyCode();
+ elseif (\array_key_exists('hasComment', $data) && $data['hasComment'] === null) {
+ $object->setHasComment(null);
}
- if (null !== $object->getCurrencyExchangeRate()) {
- $data->{'currencyExchangeRate'} = $object->getCurrencyExchangeRate();
+ if (\array_key_exists('internalComment', $data) && $data['internalComment'] !== null) {
+ $object->setInternalComment($data['internalComment']);
+ unset($data['internalComment']);
}
- if (null !== $object->getCurrencyPrecision()) {
- $data->{'currencyPrecision'} = $object->getCurrencyPrecision();
+ elseif (\array_key_exists('internalComment', $data) && $data['internalComment'] === null) {
+ $object->setInternalComment(null);
}
- if (null !== $object->getLangCode()) {
- $data->{'langCode'} = $object->getLangCode();
+ if (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] !== null) {
+ $object->setShippingTrackerType($data['shippingTrackerType']);
+ unset($data['shippingTrackerType']);
}
- if (null !== $object->getPaymentReference()) {
- $data->{'paymentReference'} = $object->getPaymentReference();
+ elseif (\array_key_exists('shippingTrackerType', $data) && $data['shippingTrackerType'] === null) {
+ $object->setShippingTrackerType(null);
}
- if (null !== $object->getPaymentStatus()) {
- $data->{'paymentStatus'} = $object->getPaymentStatus();
+ if (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] !== null) {
+ $object->setShippingTrackingNo($data['shippingTrackingNo']);
+ unset($data['shippingTrackingNo']);
}
- if (null !== $object->getIsRead()) {
- $data->{'isRead'} = $object->getIsRead();
+ elseif (\array_key_exists('shippingTrackingNo', $data) && $data['shippingTrackingNo'] === null) {
+ $object->setShippingTrackingNo(null);
}
- if (null !== $object->getHasComment()) {
- $data->{'hasComment'} = $object->getHasComment();
+ if (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] !== null) {
+ $object->setOriginalCustomerEmail($data['originalCustomerEmail']);
+ unset($data['originalCustomerEmail']);
}
- if (null !== $object->getInternalComment()) {
- $data->{'internalComment'} = $object->getInternalComment();
+ elseif (\array_key_exists('originalCustomerEmail', $data) && $data['originalCustomerEmail'] === null) {
+ $object->setOriginalCustomerEmail(null);
}
- if (null !== $object->getShippingTrackerType()) {
- $data->{'shippingTrackerType'} = $object->getShippingTrackerType();
+ if (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] !== null) {
+ $object->setOriginalCustomerNationalIdNo($data['originalCustomerNationalIdNo']);
+ unset($data['originalCustomerNationalIdNo']);
}
- if (null !== $object->getShippingTrackingNo()) {
- $data->{'shippingTrackingNo'} = $object->getShippingTrackingNo();
+ elseif (\array_key_exists('originalCustomerNationalIdNo', $data) && $data['originalCustomerNationalIdNo'] === null) {
+ $object->setOriginalCustomerNationalIdNo(null);
}
- if (null !== $object->getOriginalCustomerEmail()) {
- $data->{'originalCustomerEmail'} = $object->getOriginalCustomerEmail();
+ if (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] !== null) {
+ $object->setOriginalCustomerVatNo($data['originalCustomerVatNo']);
+ unset($data['originalCustomerVatNo']);
}
- if (null !== $object->getOriginalCustomerNationalIdNo()) {
- $data->{'originalCustomerNationalIdNo'} = $object->getOriginalCustomerNationalIdNo();
+ elseif (\array_key_exists('originalCustomerVatNo', $data) && $data['originalCustomerVatNo'] === null) {
+ $object->setOriginalCustomerVatNo(null);
}
- if (null !== $object->getOriginalCustomerVatNo()) {
- $data->{'originalCustomerVatNo'} = $object->getOriginalCustomerVatNo();
+ if (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] !== null) {
+ $object->setOriginalCustomerCustomInfo1($data['originalCustomerCustomInfo1']);
+ unset($data['originalCustomerCustomInfo1']);
}
- if (null !== $object->getOriginalCustomerCustomInfo1()) {
- $data->{'originalCustomerCustomInfo1'} = $object->getOriginalCustomerCustomInfo1();
+ elseif (\array_key_exists('originalCustomerCustomInfo1', $data) && $data['originalCustomerCustomInfo1'] === null) {
+ $object->setOriginalCustomerCustomInfo1(null);
}
- if (null !== $object->getOriginalCustomerCustomInfo2()) {
- $data->{'originalCustomerCustomInfo2'} = $object->getOriginalCustomerCustomInfo2();
+ if (\array_key_exists('originalCustomerCustomInfo2', $data) && $data['originalCustomerCustomInfo2'] !== null) {
+ $object->setOriginalCustomerCustomInfo2($data['originalCustomerCustomInfo2']);
+ unset($data['originalCustomerCustomInfo2']);
}
- if (null !== $object->getItems()) {
+ 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) {
+ $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']);
+ }
+ 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 = array();
+ if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
+ $data['createdAt'] = $object->getCreatedAt();
+ }
+ if ($object->isInitialized('customerId') && null !== $object->getCustomerId()) {
+ $data['customerId'] = $object->getCustomerId();
+ }
+ if ($object->isInitialized('statusId') && null !== $object->getStatusId()) {
+ $data['statusId'] = $object->getStatusId();
+ }
+ if ($object->isInitialized('onOrderStatusChangeSendEmail') && null !== $object->getOnOrderStatusChangeSendEmail()) {
+ $data['onOrderStatusChangeSendEmail'] = $object->getOnOrderStatusChangeSendEmail();
+ }
+ if ($object->isInitialized('onOrderStatusChangeProcessPayment') && null !== $object->getOnOrderStatusChangeProcessPayment()) {
+ $data['onOrderStatusChangeProcessPayment'] = $object->getOnOrderStatusChangeProcessPayment();
+ }
+ if ($object->isInitialized('shippingMethodId') && null !== $object->getShippingMethodId()) {
+ $data['shippingMethodId'] = $object->getShippingMethodId();
+ }
+ if ($object->isInitialized('paymentMethodId') && null !== $object->getPaymentMethodId()) {
+ $data['paymentMethodId'] = $object->getPaymentMethodId();
+ }
+ if ($object->isInitialized('paymentMethodName') && null !== $object->getPaymentMethodName()) {
+ $data['paymentMethodName'] = $object->getPaymentMethodName();
+ }
+ if ($object->isInitialized('paymentFee') && null !== $object->getPaymentFee()) {
+ $data['paymentFee'] = $object->getPaymentFee();
+ }
+ if ($object->isInitialized('paymentVatRate') && null !== $object->getPaymentVatRate()) {
+ $data['paymentVatRate'] = $object->getPaymentVatRate();
+ }
+ if ($object->isInitialized('shippingMethodName') && null !== $object->getShippingMethodName()) {
+ $data['shippingMethodName'] = $object->getShippingMethodName();
+ }
+ if ($object->isInitialized('shippingCost') && null !== $object->getShippingCost()) {
+ $data['shippingCost'] = $object->getShippingCost();
+ }
+ if ($object->isInitialized('shippingVatRate') && null !== $object->getShippingVatRate()) {
+ $data['shippingVatRate'] = $object->getShippingVatRate();
+ }
+ if ($object->isInitialized('customInfo1') && null !== $object->getCustomInfo1()) {
+ $data['customInfo1'] = $object->getCustomInfo1();
+ }
+ if ($object->isInitialized('customInfo2') && null !== $object->getCustomInfo2()) {
+ $data['customInfo2'] = $object->getCustomInfo2();
+ }
+ if ($object->isInitialized('customInfo3') && null !== $object->getCustomInfo3()) {
+ $data['customInfo3'] = $object->getCustomInfo3();
+ }
+ if ($object->isInitialized('customInfo4') && null !== $object->getCustomInfo4()) {
+ $data['customInfo4'] = $object->getCustomInfo4();
+ }
+ if ($object->isInitialized('discountCode') && null !== $object->getDiscountCode()) {
+ $data['discountCode'] = $object->getDiscountCode();
+ }
+ if ($object->isInitialized('amountPaid') && null !== $object->getAmountPaid()) {
+ $data['amountPaid'] = $object->getAmountPaid();
+ }
+ if ($object->isInitialized('isComplete') && null !== $object->getIsComplete()) {
+ $data['isComplete'] = $object->getIsComplete();
+ }
+ if ($object->isInitialized('currencyCode') && null !== $object->getCurrencyCode()) {
+ $data['currencyCode'] = $object->getCurrencyCode();
+ }
+ if ($object->isInitialized('currencyExchangeRate') && null !== $object->getCurrencyExchangeRate()) {
+ $data['currencyExchangeRate'] = $object->getCurrencyExchangeRate();
+ }
+ if ($object->isInitialized('currencyPrecision') && null !== $object->getCurrencyPrecision()) {
+ $data['currencyPrecision'] = $object->getCurrencyPrecision();
+ }
+ if ($object->isInitialized('langCode') && null !== $object->getLangCode()) {
+ $data['langCode'] = $object->getLangCode();
+ }
+ if ($object->isInitialized('paymentReference') && null !== $object->getPaymentReference()) {
+ $data['paymentReference'] = $object->getPaymentReference();
+ }
+ if ($object->isInitialized('paymentStatus') && null !== $object->getPaymentStatus()) {
+ $data['paymentStatus'] = $object->getPaymentStatus();
+ }
+ if ($object->isInitialized('isRead') && null !== $object->getIsRead()) {
+ $data['isRead'] = $object->getIsRead();
+ }
+ if ($object->isInitialized('internalComment') && null !== $object->getInternalComment()) {
+ $data['internalComment'] = $object->getInternalComment();
+ }
+ if ($object->isInitialized('shippingTrackerType') && null !== $object->getShippingTrackerType()) {
+ $data['shippingTrackerType'] = $object->getShippingTrackerType();
+ }
+ if ($object->isInitialized('shippingTrackingNo') && null !== $object->getShippingTrackingNo()) {
+ $data['shippingTrackingNo'] = $object->getShippingTrackingNo();
+ }
+ if ($object->isInitialized('originalCustomerEmail') && null !== $object->getOriginalCustomerEmail()) {
+ $data['originalCustomerEmail'] = $object->getOriginalCustomerEmail();
+ }
+ if ($object->isInitialized('originalCustomerNationalIdNo') && null !== $object->getOriginalCustomerNationalIdNo()) {
+ $data['originalCustomerNationalIdNo'] = $object->getOriginalCustomerNationalIdNo();
+ }
+ if ($object->isInitialized('originalCustomerVatNo') && null !== $object->getOriginalCustomerVatNo()) {
+ $data['originalCustomerVatNo'] = $object->getOriginalCustomerVatNo();
+ }
+ if ($object->isInitialized('originalCustomerCustomInfo1') && null !== $object->getOriginalCustomerCustomInfo1()) {
+ $data['originalCustomerCustomInfo1'] = $object->getOriginalCustomerCustomInfo1();
+ }
+ if ($object->isInitialized('originalCustomerCustomInfo2') && null !== $object->getOriginalCustomerCustomInfo2()) {
+ $data['originalCustomerCustomInfo2'] = $object->getOriginalCustomerCustomInfo2();
+ }
+ 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('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 ($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);
+ 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 5e306c04..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,55 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaginationModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setCurrentPage($data->{'current_page'});
+ if (null === $data || false === \is_array($data)) {
+ return $object;
}
- if (property_exists($data, 'per_page')) {
- $object->setPerPage($data->{'per_page'});
+ if (\array_key_exists('current_page', $data) && $data['current_page'] !== null) {
+ $object->setCurrentPage($data['current_page']);
+ unset($data['current_page']);
}
- if (property_exists($data, 'total')) {
- $object->setTotal($data->{'total'});
+ elseif (\array_key_exists('current_page', $data) && $data['current_page'] === null) {
+ $object->setCurrentPage(null);
}
- if (property_exists($data, 'count')) {
- $object->setCount($data->{'count'});
+ if (\array_key_exists('per_page', $data) && $data['per_page'] !== null) {
+ $object->setPerPage($data['per_page']);
+ unset($data['per_page']);
}
- if (property_exists($data, 'total_pages')) {
- $object->setTotalPages($data->{'total_pages'});
+ elseif (\array_key_exists('per_page', $data) && $data['per_page'] === null) {
+ $object->setPerPage(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getCurrentPage()) {
- $data->{'current_page'} = $object->getCurrentPage();
+ if (\array_key_exists('total', $data) && $data['total'] !== null) {
+ $object->setTotal($data['total']);
+ unset($data['total']);
+ }
+ elseif (\array_key_exists('total', $data) && $data['total'] === null) {
+ $object->setTotal(null);
+ }
+ if (\array_key_exists('count', $data) && $data['count'] !== null) {
+ $object->setCount($data['count']);
+ unset($data['count']);
}
- if (null !== $object->getPerPage()) {
- $data->{'per_page'} = $object->getPerPage();
+ elseif (\array_key_exists('count', $data) && $data['count'] === null) {
+ $object->setCount(null);
}
- if (null !== $object->getTotal()) {
- $data->{'total'} = $object->getTotal();
+ if (\array_key_exists('total_pages', $data) && $data['total_pages'] !== null) {
+ $object->setTotalPages($data['total_pages']);
+ unset($data['total_pages']);
}
- if (null !== $object->getCount()) {
- $data->{'count'} = $object->getCount();
+ elseif (\array_key_exists('total_pages', $data) && $data['total_pages'] === null) {
+ $object->setTotalPages(null);
}
- if (null !== $object->getTotalPages()) {
- $data->{'total_pages'} = $object->getTotalPages();
+ 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 = 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 c4588c27..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 8f787a89..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,49 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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('title', $data) && $data['title'] !== null) {
+ $object->setTitle($data['title']);
+ unset($data['title']);
}
- if (property_exists($data, 'name')) {
- $object->setName($data->{'name'});
+ elseif (\array_key_exists('title', $data) && $data['title'] === null) {
+ $object->setTitle(null);
}
- if (property_exists($data, 'title')) {
- $object->setTitle($data->{'title'});
+ if (\array_key_exists('shortDescription', $data) && $data['shortDescription'] !== null) {
+ $object->setShortDescription($data['shortDescription']);
+ unset($data['shortDescription']);
}
- if (property_exists($data, 'shortDescription')) {
- $object->setShortDescription($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();
- 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();
+ $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 4a301483..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 f5bdd1d5..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 6a260cd5..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,107 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PaymentMethodModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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']);
+ }
+ elseif (\array_key_exists('paymentMethodId', $data) && $data['paymentMethodId'] === null) {
+ $object->setPaymentMethodId(null);
}
- if (property_exists($data, 'idCode')) {
- $object->setIdCode($data->{'idCode'});
+ if (\array_key_exists('idCode', $data) && $data['idCode'] !== null) {
+ $object->setIdCode($data['idCode']);
+ unset($data['idCode']);
}
- if (property_exists($data, 'active')) {
- $object->setActive($data->{'active'});
+ elseif (\array_key_exists('idCode', $data) && $data['idCode'] === null) {
+ $object->setIdCode(null);
}
- if (property_exists($data, 'fee')) {
- $object->setFee($data->{'fee'});
+ if (\array_key_exists('active', $data) && $data['active'] !== null) {
+ $object->setActive($data['active']);
+ unset($data['active']);
}
- if (property_exists($data, 'validForCountries')) {
- $object->setValidForCountries($data->{'validForCountries'});
+ elseif (\array_key_exists('active', $data) && $data['active'] === null) {
+ $object->setActive(null);
}
- if (property_exists($data, 'validCountriesSelected')) {
+ 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']);
}
- if (property_exists($data, 'validForMinItemsSubtotal')) {
- $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'});
+ elseif (\array_key_exists('validCountriesSelected', $data) && $data['validCountriesSelected'] === null) {
+ $object->setValidCountriesSelected(null);
}
- if (property_exists($data, 'validForMaxItemsSubtotal')) {
- $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'});
+ if (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] !== null) {
+ $object->setValidForMinItemsSubtotal($data['validForMinItemsSubtotal']);
+ unset($data['validForMinItemsSubtotal']);
}
- if (property_exists($data, 'validForMinWeight')) {
- $object->setValidForMinWeight($data->{'validForMinWeight'});
+ elseif (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] === null) {
+ $object->setValidForMinItemsSubtotal(null);
}
- if (property_exists($data, 'validForMaxWeight')) {
- $object->setValidForMaxWeight($data->{'validForMaxWeight'});
+ if (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] !== null) {
+ $object->setValidForMaxItemsSubtotal($data['validForMaxItemsSubtotal']);
+ unset($data['validForMaxItemsSubtotal']);
}
- if (property_exists($data, 'validForShippingMethods')) {
- $object->setValidForShippingMethods($data->{'validForShippingMethods'});
+ elseif (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] === null) {
+ $object->setValidForMaxItemsSubtotal(null);
}
- if (property_exists($data, 'validForCustomerType')) {
- $object->setValidForCustomerType($data->{'validForCustomerType'});
+ if (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] !== null) {
+ $object->setValidForMinWeight($data['validForMinWeight']);
+ unset($data['validForMinWeight']);
}
- if (property_exists($data, 'isClickAndCollect')) {
- $object->setIsClickAndCollect($data->{'isClickAndCollect'});
+ elseif (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] === null) {
+ $object->setValidForMinWeight(null);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\PaymentMethodLanguageModelCollection', 'json', $context));
+ if (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] !== null) {
+ $object->setValidForMaxWeight($data['validForMaxWeight']);
+ unset($data['validForMaxWeight']);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getPaymentMethodId()) {
- $data->{'paymentMethodId'} = $object->getPaymentMethodId();
+ elseif (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] === null) {
+ $object->setValidForMaxWeight(null);
}
- if (null !== $object->getIdCode()) {
- $data->{'idCode'} = $object->getIdCode();
+ if (\array_key_exists('validForShippingMethods', $data) && $data['validForShippingMethods'] !== null) {
+ $object->setValidForShippingMethods($data['validForShippingMethods']);
+ unset($data['validForShippingMethods']);
}
- if (null !== $object->getActive()) {
- $data->{'active'} = $object->getActive();
+ elseif (\array_key_exists('validForShippingMethods', $data) && $data['validForShippingMethods'] === null) {
+ $object->setValidForShippingMethods(null);
}
- if (null !== $object->getFee()) {
- $data->{'fee'} = $object->getFee();
+ if (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] !== null) {
+ $object->setValidForCustomerType($data['validForCustomerType']);
+ unset($data['validForCustomerType']);
}
- if (null !== $object->getValidForCountries()) {
- $data->{'validForCountries'} = $object->getValidForCountries();
+ elseif (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] === null) {
+ $object->setValidForCustomerType(null);
}
- if (null !== $object->getValidCountriesSelected()) {
- $values = array();
- foreach ($object->getValidCountriesSelected() as $value) {
- $values[] = $value;
- }
- $data->{'validCountriesSelected'} = $values;
+ 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);
}
- $data->{'validForMinItemsSubtotal'} = $object->getValidForMinItemsSubtotal();
- $data->{'validForMaxItemsSubtotal'} = $object->getValidForMaxItemsSubtotal();
- $data->{'validForMinWeight'} = $object->getValidForMinWeight();
- $data->{'validForMaxWeight'} = $object->getValidForMaxWeight();
- if (null !== $object->getValidForShippingMethods()) {
- $data->{'validForShippingMethods'} = $object->getValidForShippingMethods();
+ foreach ($data as $key => $value_1) {
+ if (preg_match('/.*/', (string) $key)) {
+ $object[$key] = $value_1;
+ }
}
- $data->{'validForCustomerType'} = $object->getValidForCustomerType();
- if (null !== $object->getIsClickAndCollect()) {
- $data->{'isClickAndCollect'} = $object->getIsClickAndCollect();
+ return $object;
+ }
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = array())
+ {
+ $data = array();
+ 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\\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 5707df38..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 108f0412..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 c1f0130b..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,93 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\PricelistModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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']);
+ }
+ elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) {
+ $object->setExternalIdType(null);
}
- if (property_exists($data, 'name')) {
- $object->setName($data->{'name'});
+ if (\array_key_exists('name', $data) && $data['name'] !== null) {
+ $object->setName($data['name']);
+ unset($data['name']);
}
- if (property_exists($data, 'isMaster')) {
- $object->setIsMaster($data->{'isMaster'});
+ elseif (\array_key_exists('name', $data) && $data['name'] === null) {
+ $object->setName(null);
}
- if (property_exists($data, 'isActive')) {
- $object->setIsActive($data->{'isActive'});
+ if (\array_key_exists('isMaster', $data) && $data['isMaster'] !== null) {
+ $object->setIsMaster($data['isMaster']);
+ unset($data['isMaster']);
}
- if (property_exists($data, 'region')) {
- $object->setRegion($data->{'region'});
+ elseif (\array_key_exists('isMaster', $data) && $data['isMaster'] === null) {
+ $object->setIsMaster(null);
}
- if (property_exists($data, 'countryCodes')) {
+ 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('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']);
}
- if (property_exists($data, 'currencyCode')) {
- $object->setCurrencyCode($data->{'currencyCode'});
+ elseif (\array_key_exists('countryCodes', $data) && $data['countryCodes'] === null) {
+ $object->setCountryCodes(null);
}
- if (property_exists($data, 'parentPricelistId')) {
- $object->setParentPricelistId($data->{'parentPricelistId'});
+ if (\array_key_exists('currencyCode', $data) && $data['currencyCode'] !== null) {
+ $object->setCurrencyCode($data['currencyCode']);
+ unset($data['currencyCode']);
}
- if (property_exists($data, 'isCustomerPricelist')) {
- $object->setIsCustomerPricelist($data->{'isCustomerPricelist'});
+ elseif (\array_key_exists('currencyCode', $data) && $data['currencyCode'] === null) {
+ $object->setCurrencyCode(null);
}
- if (property_exists($data, 'isCountryPricelist')) {
- $object->setIsCountryPricelist($data->{'isCountryPricelist'});
+ if (\array_key_exists('parentPricelistId', $data) && $data['parentPricelistId'] !== null) {
+ $object->setParentPricelistId($data['parentPricelistId']);
+ unset($data['parentPricelistId']);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getPricelistId()) {
- $data->{'pricelistId'} = $object->getPricelistId();
+ elseif (\array_key_exists('parentPricelistId', $data) && $data['parentPricelistId'] === null) {
+ $object->setParentPricelistId(null);
}
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ if (\array_key_exists('isCustomerPricelist', $data) && $data['isCustomerPricelist'] !== null) {
+ $object->setIsCustomerPricelist($data['isCustomerPricelist']);
+ unset($data['isCustomerPricelist']);
}
- if (null !== $object->getIsMaster()) {
- $data->{'isMaster'} = $object->getIsMaster();
+ elseif (\array_key_exists('isCustomerPricelist', $data) && $data['isCustomerPricelist'] === null) {
+ $object->setIsCustomerPricelist(null);
}
- if (null !== $object->getIsActive()) {
- $data->{'isActive'} = $object->getIsActive();
+ if (\array_key_exists('isCountryPricelist', $data) && $data['isCountryPricelist'] !== null) {
+ $object->setIsCountryPricelist($data['isCountryPricelist']);
+ unset($data['isCountryPricelist']);
}
- if (null !== $object->getRegion()) {
- $data->{'region'} = $object->getRegion();
+ elseif (\array_key_exists('isCountryPricelist', $data) && $data['isCountryPricelist'] === null) {
+ $object->setIsCountryPricelist(null);
}
- if (null !== $object->getCountryCodes()) {
- $values = array();
- foreach ($object->getCountryCodes() as $value) {
- $values[] = $value;
+ foreach ($data as $key => $value_1) {
+ if (preg_match('/.*/', (string) $key)) {
+ $object[$key] = $value_1;
}
- $data->{'countryCodes'} = $values;
}
- if (null !== $object->getCurrencyCode()) {
- $data->{'currencyCode'} = $object->getCurrencyCode();
+ return $object;
+ }
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = array())
+ {
+ $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->getParentPricelistId()) {
- $data->{'parentPricelistId'} = $object->getParentPricelistId();
+ if ($object->isInitialized('isCustomerPricelist') && null !== $object->getIsCustomerPricelist()) {
+ $data['isCustomerPricelist'] = $object->getIsCustomerPricelist();
}
- if (null !== $object->getIsCustomerPricelist()) {
- $data->{'isCustomerPricelist'} = $object->getIsCustomerPricelist();
+ if ($object->isInitialized('isCountryPricelist') && null !== $object->getIsCountryPricelist()) {
+ $data['isCountryPricelist'] = $object->getIsCountryPricelist();
}
- if (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 32e9add7..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 a17082ff..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 acf0f868..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductBundleProductPriceModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 c2d75783..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 0f1d905b..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,67 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (property_exists($data, 'name')) {
- $object->setName($data->{'name'});
+ if (\array_key_exists('description', $data) && $data['description'] !== null) {
+ $object->setDescription($data['description']);
+ unset($data['description']);
}
- if (property_exists($data, 'pageTitle')) {
- $object->setPageTitle($data->{'pageTitle'});
+ elseif (\array_key_exists('description', $data) && $data['description'] === null) {
+ $object->setDescription(null);
}
- if (property_exists($data, 'description')) {
- $object->setDescription($data->{'description'});
+ if (\array_key_exists('bottomDescription', $data) && $data['bottomDescription'] !== null) {
+ $object->setBottomDescription($data['bottomDescription']);
+ unset($data['bottomDescription']);
}
- if (property_exists($data, 'bottomDescription')) {
- $object->setBottomDescription($data->{'bottomDescription'});
+ elseif (\array_key_exists('bottomDescription', $data) && $data['bottomDescription'] === null) {
+ $object->setBottomDescription(null);
}
- if (property_exists($data, 'pageMetaDescription')) {
- $object->setPageMetaDescription($data->{'pageMetaDescription'});
+ if (\array_key_exists('pageMetaDescription', $data) && $data['pageMetaDescription'] !== null) {
+ $object->setPageMetaDescription($data['pageMetaDescription']);
+ unset($data['pageMetaDescription']);
}
- if (property_exists($data, 'permalink')) {
- $object->setPermalink($data->{'permalink'});
+ elseif (\array_key_exists('pageMetaDescription', $data) && $data['pageMetaDescription'] === null) {
+ $object->setPageMetaDescription(null);
+ }
+ 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();
+ $data = array();
+ if ($object->isInitialized('langCode') && null !== $object->getLangCode()) {
+ $data['langCode'] = $object->getLangCode();
}
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ if ($object->isInitialized('name') && null !== $object->getName()) {
+ $data['name'] = $object->getName();
}
- if (null !== $object->getPageTitle()) {
- $data->{'pageTitle'} = $object->getPageTitle();
+ if ($object->isInitialized('pageTitle') && null !== $object->getPageTitle()) {
+ $data['pageTitle'] = $object->getPageTitle();
}
- if (null !== $object->getDescription()) {
- $data->{'description'} = $object->getDescription();
+ if ($object->isInitialized('description') && null !== $object->getDescription()) {
+ $data['description'] = $object->getDescription();
}
- if (null !== $object->getBottomDescription()) {
- $data->{'bottomDescription'} = $object->getBottomDescription();
+ if ($object->isInitialized('bottomDescription') && null !== $object->getBottomDescription()) {
+ $data['bottomDescription'] = $object->getBottomDescription();
}
- if (null !== $object->getPageMetaDescription()) {
- $data->{'pageMetaDescription'} = $object->getPageMetaDescription();
+ if ($object->isInitialized('pageMetaDescription') && null !== $object->getPageMetaDescription()) {
+ $data['pageMetaDescription'] = $object->getPageMetaDescription();
}
- if (null !== $object->getPermalink()) {
- $data->{'permalink'} = $object->getPermalink();
+ 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 0df07325..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 1c2c35e7..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 07f9bcd4..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 c5837ff6..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollectionMeta';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 447513a8..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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')) {
- $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 141196d8..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 db80be90..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,85 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (property_exists($data, 'parentId')) {
- $object->setParentId($data->{'parentId'});
+ if (\array_key_exists('openPage', $data) && $data['openPage'] !== null) {
+ $object->setOpenPage($data['openPage']);
+ unset($data['openPage']);
}
- if (property_exists($data, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ elseif (\array_key_exists('openPage', $data) && $data['openPage'] === null) {
+ $object->setOpenPage(null);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('imageFileId', $data) && $data['imageFileId'] !== null) {
+ $object->setImageFileId($data['imageFileId']);
+ unset($data['imageFileId']);
}
- if (property_exists($data, 'openPage')) {
- $object->setOpenPage($data->{'openPage'});
+ elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) {
+ $object->setImageFileId(null);
}
- if (property_exists($data, 'imageFileId')) {
- $object->setImageFileId($data->{'imageFileId'});
+ if (\array_key_exists('externalId', $data) && $data['externalId'] !== null) {
+ $object->setExternalId($data['externalId']);
+ unset($data['externalId']);
}
- if (property_exists($data, 'externalType')) {
- $object->setExternalType($data->{'externalType'});
+ elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) {
+ $object->setExternalId(null);
}
- if (property_exists($data, 'externalId')) {
- $object->setExternalId($data->{'externalId'});
+ if (\array_key_exists('externalType', $data) && $data['externalType'] !== null) {
+ $object->setExternalType($data['externalType']);
+ unset($data['externalType']);
}
- if (property_exists($data, 'hasChildren')) {
- $object->setHasChildren($data->{'hasChildren'});
+ elseif (\array_key_exists('externalType', $data) && $data['externalType'] === null) {
+ $object->setExternalType(null);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLanguagesModelCollection', 'json', $context));
+ 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) {
+ $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();
- if (null !== $object->getCategoryId()) {
- $data->{'categoryId'} = $object->getCategoryId();
+ $data = array();
+ if ($object->isInitialized('parentId') && null !== $object->getParentId()) {
+ $data['parentId'] = $object->getParentId();
}
- if (null !== $object->getParentId()) {
- $data->{'parentId'} = $object->getParentId();
+ if ($object->isInitialized('visibility') && null !== $object->getVisibility()) {
+ $data['visibility'] = $object->getVisibility();
}
- if (null !== $object->getVisibility()) {
- $data->{'visibility'} = $object->getVisibility();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (null !== $object->getSortIndex()) {
- $data->{'sortIndex'} = $object->getSortIndex();
+ if ($object->isInitialized('openPage') && null !== $object->getOpenPage()) {
+ $data['openPage'] = $object->getOpenPage();
}
- if (null !== $object->getOpenPage()) {
- $data->{'openPage'} = $object->getOpenPage();
+ if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) {
+ $data['imageFileId'] = $object->getImageFileId();
}
- if (null !== $object->getImageFileId()) {
- $data->{'imageFileId'} = $object->getImageFileId();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getExternalType()) {
- $data->{'externalType'} = $object->getExternalType();
+ if ($object->isInitialized('externalType') && null !== $object->getExternalType()) {
+ $data['externalType'] = $object->getExternalType();
}
- if (null !== $object->getExternalId()) {
- $data->{'externalId'} = $object->getExternalId();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- if (null !== $object->getHasChildren()) {
- $data->{'hasChildren'} = $object->getHasChildren();
+ 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\\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 92dce4a5..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,93 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductCategoryModelUpdatable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setVisibility($data->{'visibility'});
+ elseif (\array_key_exists('imageFileId', $data) && $data['imageFileId'] === null) {
+ $object->setImageFileId(null);
}
- if (property_exists($data, 'sortIndex')) {
- $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')) {
- $object->setOpenPage($data->{'openPage'});
+ elseif (\array_key_exists('externalId', $data) && $data['externalId'] === null) {
+ $object->setExternalId(null);
}
- if (property_exists($data, 'imageFileId')) {
- $object->setImageFileId($data->{'imageFileId'});
+ if (\array_key_exists('externalType', $data) && $data['externalType'] !== null) {
+ $object->setExternalType($data['externalType']);
+ unset($data['externalType']);
}
- if (property_exists($data, 'externalType')) {
- $object->setExternalType($data->{'externalType'});
+ elseif (\array_key_exists('externalType', $data) && $data['externalType'] === null) {
+ $object->setExternalType(null);
}
- if (property_exists($data, 'externalId')) {
- $object->setExternalId($data->{'externalId'});
+ if (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) {
+ $object->setExternalIdType($data['externalIdType']);
+ unset($data['externalIdType']);
}
- if (property_exists($data, 'hasChildren')) {
- $object->setHasChildren($data->{'hasChildren'});
+ elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) {
+ $object->setExternalIdType(null);
}
- if (property_exists($data, 'languages')) {
+ 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();
- if (null !== $object->getCategoryId()) {
- $data->{'categoryId'} = $object->getCategoryId();
+ $data = array();
+ if ($object->isInitialized('parentId') && null !== $object->getParentId()) {
+ $data['parentId'] = $object->getParentId();
}
- if (null !== $object->getParentId()) {
- $data->{'parentId'} = $object->getParentId();
+ if ($object->isInitialized('visibility') && null !== $object->getVisibility()) {
+ $data['visibility'] = $object->getVisibility();
}
- if (null !== $object->getVisibility()) {
- $data->{'visibility'} = $object->getVisibility();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (null !== $object->getSortIndex()) {
- $data->{'sortIndex'} = $object->getSortIndex();
+ if ($object->isInitialized('openPage') && null !== $object->getOpenPage()) {
+ $data['openPage'] = $object->getOpenPage();
}
- if (null !== $object->getOpenPage()) {
- $data->{'openPage'} = $object->getOpenPage();
+ if ($object->isInitialized('imageFileId') && null !== $object->getImageFileId()) {
+ $data['imageFileId'] = $object->getImageFileId();
}
- if (null !== $object->getImageFileId()) {
- $data->{'imageFileId'} = $object->getImageFileId();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getExternalType()) {
- $data->{'externalType'} = $object->getExternalType();
+ if ($object->isInitialized('externalType') && null !== $object->getExternalType()) {
+ $data['externalType'] = $object->getExternalType();
}
- if (null !== $object->getExternalId()) {
- $data->{'externalId'} = $object->getExternalId();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- if (null !== $object->getHasChildren()) {
- $data->{'hasChildren'} = $object->getHasChildren();
- }
- 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\\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 f5b84b9a..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 55436d49..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 ddad0cc4..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setShortDescription($data->{'shortDescription'});
+ elseif (\array_key_exists('longDescription', $data) && $data['longDescription'] === null) {
+ $object->setLongDescription(null);
}
- if (property_exists($data, 'longDescription')) {
- $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')) {
- $object->setPermalink($data->{'permalink'});
+ elseif (\array_key_exists('permalink', $data) && $data['permalink'] === null) {
+ $object->setPermalink(null);
}
- if (property_exists($data, 'pageTitle')) {
- $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')) {
- $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 f639dfb3..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductLanguageSlimModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setShortDescription($data->{'shortDescription'});
+ elseif (\array_key_exists('shortDescription', $data) && $data['shortDescription'] === null) {
+ $object->setShortDescription(null);
}
- if (property_exists($data, 'permalink')) {
- $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 a2d13755..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 6670e94c..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 03f11fe1..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,43 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductManufacturerModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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, 'name')) {
- $object->setName($data->{'name'});
+ if (\array_key_exists('name', $data) && $data['name'] !== null) {
+ $object->setName($data['name']);
+ unset($data['name']);
}
- if (property_exists($data, 'url')) {
- $object->setUrl($data->{'url'});
+ elseif (\array_key_exists('name', $data) && $data['name'] === null) {
+ $object->setName(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();
- if (null !== $object->getManufacturerId()) {
- $data->{'manufacturerId'} = $object->getManufacturerId();
+ $data = array();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- if (null !== $object->getUrl()) {
- $data->{'url'} = $object->getUrl();
+ $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;
+ }
}
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 27ee2080..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 8db97891..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 a46e6587..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,49 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) {
+ $object->setSortIndex($data['sortIndex']);
+ unset($data['sortIndex']);
}
- if (property_exists($data, 'mediaFileId')) {
- $object->setMediaFileId($data->{'mediaFileId'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('type', $data) && $data['type'] !== null) {
+ $object->setType($data['type']);
+ unset($data['type']);
}
- if (property_exists($data, 'type')) {
- $object->setType($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->getProductMediaFileId()) {
- $data->{'productMediaFileId'} = $object->getProductMediaFileId();
- }
- if (null !== $object->getMediaFileId()) {
- $data->{'mediaFileId'} = $object->getMediaFileId();
- }
- if (null !== $object->getSortIndex()) {
- $data->{'sortIndex'} = $object->getSortIndex();
+ $data = array();
+ $data['mediaFileId'] = $object->getMediaFileId();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (null !== $object->getType()) {
- $data->{'type'} = $object->getType();
+ 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 858ef76e..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 0bd54b86..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 2bda58b0..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $object->setSortIndex($data->{'sortIndex'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'languages')) {
- $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 af99e203..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,57 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelUpdatable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $object->setMetaDataTypeId($data->{'metaDataTypeId'});
+ elseif (\array_key_exists('metaDataTypeId', $data) && $data['metaDataTypeId'] === null) {
+ $object->setMetaDataTypeId(null);
}
- if (property_exists($data, 'sortIndex')) {
- $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')) {
+ 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->getMetaDataId()) {
- $data->{'metaDataId'} = $object->getMetaDataId();
- }
- if (null !== $object->getMetaDataTypeId()) {
- $data->{'metaDataTypeId'} = $object->getMetaDataTypeId();
+ $data = array();
+ $data['metaDataTypeId'] = $object->getMetaDataTypeId();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (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 5f2715ad..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 3c7c6fde..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 8ab29f35..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 1ff559b6..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 e2939b5f..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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->getMetaDataTypeId()) {
- $data->{'metaDataTypeId'} = $object->getMetaDataTypeId();
+ $data = array();
+ 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\\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 e7be3636..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaDataTypeModelUpdatable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 f618c2ce..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 7f6b97a8..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 c93c82fa..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductMetaLanguageDataModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 b8f098cc..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollectionMeta';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 29da32db..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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')) {
- $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 228f9237..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 1e916376..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 53db6282..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,161 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (\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('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('defaultVatRate', $data) && $data['defaultVatRate'] !== null) {
+ $object->setDefaultVatRate($data['defaultVatRate']);
+ unset($data['defaultVatRate']);
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) {
+ $object->setDefaultVatRate(null);
}
- if (property_exists($data, 'defaultVatRate')) {
- $object->setDefaultVatRate($data->{'defaultVatRate'});
+ if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) {
+ $object->setVisibility($data['visibility']);
+ unset($data['visibility']);
}
- if (property_exists($data, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) {
+ $object->setVisibility(null);
}
- if (property_exists($data, 'visibilityPricelistIds')) {
+ 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']);
}
- if (property_exists($data, 'moreInfoUrl')) {
- $object->setMoreInfoUrl($data->{'moreInfoUrl'});
+ elseif (\array_key_exists('type', $data) && $data['type'] === null) {
+ $object->setType(null);
}
- if (property_exists($data, 'manufacturerId')) {
- $object->setManufacturerId($data->{'manufacturerId'});
+ if (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] !== null) {
+ $object->setIsBackInStockWatchable($data['isBackInStockWatchable']);
+ unset($data['isBackInStockWatchable']);
}
- if (property_exists($data, 'unitId')) {
- $object->setUnitId($data->{'unitId'});
+ elseif (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] === null) {
+ $object->setIsBackInStockWatchable(null);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] !== null) {
+ $object->setBundleUseManualPrice($data['bundleUseManualPrice']);
+ unset($data['bundleUseManualPrice']);
}
- if (property_exists($data, 'type')) {
- $object->setType($data->{'type'});
+ elseif (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] === null) {
+ $object->setBundleUseManualPrice(null);
}
- if (property_exists($data, 'isBackInStockWatchable')) {
- $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'});
+ if (\array_key_exists('accounting', $data) && $data['accounting'] !== null) {
+ $object->setAccounting($data['accounting']);
+ unset($data['accounting']);
}
- if (property_exists($data, 'bundleUseManualPrice')) {
- $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'});
+ elseif (\array_key_exists('accounting', $data) && $data['accounting'] === null) {
+ $object->setAccounting(null);
}
- if (property_exists($data, 'accounting')) {
- $object->setAccounting($data->{'accounting'});
+ if (\array_key_exists('hasSeveralVariants', $data) && $data['hasSeveralVariants'] !== null) {
+ $object->setHasSeveralVariants($data['hasSeveralVariants']);
+ unset($data['hasSeveralVariants']);
}
- if (property_exists($data, 'hasSeveralVariants')) {
- $object->setHasSeveralVariants($data->{'hasSeveralVariants'});
+ elseif (\array_key_exists('hasSeveralVariants', $data) && $data['hasSeveralVariants'] === null) {
+ $object->setHasSeveralVariants(null);
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ if (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] !== null) {
+ $object->setModifiedAt($data['modifiedAt']);
+ unset($data['modifiedAt']);
}
- if (property_exists($data, 'variants')) {
- $object->setVariants($this->denormalizer->denormalize($data->{'variants'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection', 'json', $context));
+ elseif (\array_key_exists('modifiedAt', $data) && $data['modifiedAt'] === null) {
+ $object->setModifiedAt(null);
}
- if (property_exists($data, 'bundledProducts')) {
- $object->setBundledProducts($this->denormalizer->denormalize($data->{'bundledProducts'}, 'Starweb\\Api\\Generated\\Model\\BundledProductsModelCollection', 'json', $context));
+ 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, 'mediaFiles')) {
- $object->setMediaFiles($this->denormalizer->denormalize($data->{'mediaFiles'}, 'Starweb\\Api\\Generated\\Model\\ProductMediaFileLinkModelCollection', 'json', $context));
+ elseif (\array_key_exists('variants', $data) && $data['variants'] === null) {
+ $object->setVariants(null);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ProductModelLanguages', '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, 'vatRates')) {
- $object->setVatRates($this->denormalizer->denormalize($data->{'vatRates'}, 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection', 'json', $context));
+ elseif (\array_key_exists('bundledProducts', $data) && $data['bundledProducts'] === null) {
+ $object->setBundledProducts(null);
}
- if (property_exists($data, 'categories')) {
- $object->setCategories($this->denormalizer->denormalize($data->{'categories'}, 'Starweb\\Api\\Generated\\Model\\ProductCategoryLinkModelCollection', '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, 'unit')) {
- $object->setUnit($this->denormalizer->denormalize($data->{'unit'}, 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem', 'json', $context));
+ elseif (\array_key_exists('mediaFiles', $data) && $data['mediaFiles'] === null) {
+ $object->setMediaFiles(null);
}
- if (property_exists($data, 'metaData')) {
- $object->setMetaData($this->denormalizer->denormalize($data->{'metaData'}, 'Starweb\\Api\\Generated\\Model\\ProductMetaDataModelCollection', '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']);
+ }
+ elseif (\array_key_exists('languages', $data) && $data['languages'] === null) {
+ $object->setLanguages(null);
+ }
+ 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();
- if (null !== $object->getProductId()) {
- $data->{'productId'} = $object->getProductId();
+ $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 (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;
+ }
+ if ($object->isInitialized('moreInfoUrl') && null !== $object->getMoreInfoUrl()) {
+ $data['moreInfoUrl'] = $object->getMoreInfoUrl();
+ }
+ if ($object->isInitialized('manufacturerId') && null !== $object->getManufacturerId()) {
+ $data['manufacturerId'] = $object->getManufacturerId();
}
- if (null !== $object->getMoreInfoUrl()) {
- $data->{'moreInfoUrl'} = $object->getMoreInfoUrl();
+ if ($object->isInitialized('unitId') && null !== $object->getUnitId()) {
+ $data['unitId'] = $object->getUnitId();
}
- $data->{'manufacturerId'} = $object->getManufacturerId();
- $data->{'unitId'} = $object->getUnitId();
- $data->{'sortIndex'} = $object->getSortIndex();
- if (null !== $object->getType()) {
- $data->{'type'} = $object->getType();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (null !== $object->getIsBackInStockWatchable()) {
- $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable();
+ if ($object->isInitialized('type') && null !== $object->getType()) {
+ $data['type'] = $object->getType();
}
- if (null !== $object->getBundleUseManualPrice()) {
- $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice();
+ if ($object->isInitialized('isBackInStockWatchable') && null !== $object->getIsBackInStockWatchable()) {
+ $data['isBackInStockWatchable'] = $object->getIsBackInStockWatchable();
}
- $data->{'accounting'} = $object->getAccounting();
- if (null !== $object->getHasSeveralVariants()) {
- $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants();
+ if ($object->isInitialized('bundleUseManualPrice') && null !== $object->getBundleUseManualPrice()) {
+ $data['bundleUseManualPrice'] = $object->getBundleUseManualPrice();
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ if ($object->isInitialized('accounting') && null !== $object->getAccounting()) {
+ $data['accounting'] = $object->getAccounting();
}
- if (null !== $object->getVariants()) {
- $data->{'variants'} = $this->normalizer->normalize($object->getVariants(), 'json', $context);
+ if ($object->isInitialized('variants') && 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 ($object->isInitialized('bundledProducts') && 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 ($object->isInitialized('mediaFiles') && 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 ($object->isInitialized('languages') && 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 ($object->isInitialized('vatRates') && 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 ($object->isInitialized('categories') && 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 ($object->isInitialized('unit') && 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);
+ 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 253025ba..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,183 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelPatchable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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, 'productId')) {
- $object->setProductId($data->{'productId'});
+ 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('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('defaultVatRate', $data) && $data['defaultVatRate'] !== null) {
+ $object->setDefaultVatRate($data['defaultVatRate']);
+ unset($data['defaultVatRate']);
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) {
+ $object->setDefaultVatRate(null);
}
- if (property_exists($data, 'defaultVatRate')) {
- $object->setDefaultVatRate($data->{'defaultVatRate'});
+ if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) {
+ $object->setVisibility($data['visibility']);
+ unset($data['visibility']);
}
- if (property_exists($data, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) {
+ $object->setVisibility(null);
}
- if (property_exists($data, 'visibilityPricelistIds')) {
+ 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 (property_exists($data, 'moreInfoUrl')) {
- $object->setMoreInfoUrl($data->{'moreInfoUrl'});
+ if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) {
+ $object->setSortIndex($data['sortIndex']);
+ unset($data['sortIndex']);
}
- if (property_exists($data, 'manufacturerId')) {
- $object->setManufacturerId($data->{'manufacturerId'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'unitId')) {
- $object->setUnitId($data->{'unitId'});
+ if (\array_key_exists('type', $data) && $data['type'] !== null) {
+ $object->setType($data['type']);
+ unset($data['type']);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ elseif (\array_key_exists('type', $data) && $data['type'] === null) {
+ $object->setType(null);
}
- if (property_exists($data, 'type')) {
- $object->setType($data->{'type'});
+ if (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] !== null) {
+ $object->setIsBackInStockWatchable($data['isBackInStockWatchable']);
+ unset($data['isBackInStockWatchable']);
}
- if (property_exists($data, 'isBackInStockWatchable')) {
- $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'});
+ elseif (\array_key_exists('isBackInStockWatchable', $data) && $data['isBackInStockWatchable'] === null) {
+ $object->setIsBackInStockWatchable(null);
}
- if (property_exists($data, 'bundleUseManualPrice')) {
- $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'});
+ if (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] !== null) {
+ $object->setBundleUseManualPrice($data['bundleUseManualPrice']);
+ unset($data['bundleUseManualPrice']);
}
- if (property_exists($data, 'accounting')) {
- $object->setAccounting($data->{'accounting'});
+ elseif (\array_key_exists('bundleUseManualPrice', $data) && $data['bundleUseManualPrice'] === null) {
+ $object->setBundleUseManualPrice(null);
}
- if (property_exists($data, 'hasSeveralVariants')) {
- $object->setHasSeveralVariants($data->{'hasSeveralVariants'});
+ if (\array_key_exists('accounting', $data) && $data['accounting'] !== null) {
+ $object->setAccounting($data['accounting']);
+ unset($data['accounting']);
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ elseif (\array_key_exists('accounting', $data) && $data['accounting'] === null) {
+ $object->setAccounting(null);
}
- if (property_exists($data, 'mediaFiles')) {
+ 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')) {
+ 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')) {
+ 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')) {
+ 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')) {
+ 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();
- if (null !== $object->getProductId()) {
- $data->{'productId'} = $object->getProductId();
+ $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->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) {
+ $data['createdAt'] = $object->getCreatedAt();
}
- $data->{'defaultVatRate'} = $object->getDefaultVatRate();
- if (null !== $object->getVisibility()) {
- $data->{'visibility'} = $object->getVisibility();
+ if ($object->isInitialized('defaultVatRate') && null !== $object->getDefaultVatRate()) {
+ $data['defaultVatRate'] = $object->getDefaultVatRate();
}
- if (null !== $object->getVisibilityPricelistIds()) {
+ 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 (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();
}
- if (null !== $object->getBundleUseManualPrice()) {
- $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice();
+ if ($object->isInitialized('type') && null !== $object->getType()) {
+ $data['type'] = $object->getType();
}
- $data->{'accounting'} = $object->getAccounting();
- if (null !== $object->getHasSeveralVariants()) {
- $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants();
+ if ($object->isInitialized('isBackInStockWatchable') && null !== $object->getIsBackInStockWatchable()) {
+ $data['isBackInStockWatchable'] = $object->getIsBackInStockWatchable();
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ if ($object->isInitialized('bundleUseManualPrice') && null !== $object->getBundleUseManualPrice()) {
+ $data['bundleUseManualPrice'] = $object->getBundleUseManualPrice();
}
- if (null !== $object->getMediaFiles()) {
+ 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 5c33fc23..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,211 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductModelUpdatable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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, 'productId')) {
- $object->setProductId($data->{'productId'});
+ 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('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('defaultVatRate', $data) && $data['defaultVatRate'] !== null) {
+ $object->setDefaultVatRate($data['defaultVatRate']);
+ unset($data['defaultVatRate']);
}
- if (property_exists($data, 'createdAt')) {
- $object->setCreatedAt($data->{'createdAt'});
+ elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) {
+ $object->setDefaultVatRate(null);
}
- if (property_exists($data, 'defaultVatRate')) {
- $object->setDefaultVatRate($data->{'defaultVatRate'});
+ if (\array_key_exists('visibility', $data) && $data['visibility'] !== null) {
+ $object->setVisibility($data['visibility']);
+ unset($data['visibility']);
}
- if (property_exists($data, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) {
+ $object->setVisibility(null);
}
- if (property_exists($data, 'visibilityPricelistIds')) {
+ 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']);
}
- if (property_exists($data, 'moreInfoUrl')) {
- $object->setMoreInfoUrl($data->{'moreInfoUrl'});
+ elseif (\array_key_exists('visibilityPricelistIds', $data) && $data['visibilityPricelistIds'] === null) {
+ $object->setVisibilityPricelistIds(null);
}
- if (property_exists($data, 'manufacturerId')) {
- $object->setManufacturerId($data->{'manufacturerId'});
+ if (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] !== null) {
+ $object->setMoreInfoUrl($data['moreInfoUrl']);
+ unset($data['moreInfoUrl']);
}
- if (property_exists($data, 'unitId')) {
- $object->setUnitId($data->{'unitId'});
+ elseif (\array_key_exists('moreInfoUrl', $data) && $data['moreInfoUrl'] === null) {
+ $object->setMoreInfoUrl(null);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] !== null) {
+ $object->setManufacturerId($data['manufacturerId']);
+ unset($data['manufacturerId']);
}
- if (property_exists($data, 'type')) {
- $object->setType($data->{'type'});
+ elseif (\array_key_exists('manufacturerId', $data) && $data['manufacturerId'] === null) {
+ $object->setManufacturerId(null);
}
- if (property_exists($data, 'isBackInStockWatchable')) {
- $object->setIsBackInStockWatchable($data->{'isBackInStockWatchable'});
+ if (\array_key_exists('unitId', $data) && $data['unitId'] !== null) {
+ $object->setUnitId($data['unitId']);
+ unset($data['unitId']);
}
- if (property_exists($data, 'bundleUseManualPrice')) {
- $object->setBundleUseManualPrice($data->{'bundleUseManualPrice'});
+ elseif (\array_key_exists('unitId', $data) && $data['unitId'] === null) {
+ $object->setUnitId(null);
}
- if (property_exists($data, 'accounting')) {
- $object->setAccounting($data->{'accounting'});
+ if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) {
+ $object->setSortIndex($data['sortIndex']);
+ unset($data['sortIndex']);
}
- if (property_exists($data, 'hasSeveralVariants')) {
- $object->setHasSeveralVariants($data->{'hasSeveralVariants'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'modifiedAt')) {
- $object->setModifiedAt($data->{'modifiedAt'});
+ if (\array_key_exists('type', $data) && $data['type'] !== null) {
+ $object->setType($data['type']);
+ unset($data['type']);
}
- if (property_exists($data, 'variants')) {
+ 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('variants', $data) && $data['variants'] !== null) {
$values_1 = array();
- foreach ($data->{'variants'} as $value_1) {
- $values_1[] = $this->denormalizer->denormalize($value_1, 'Starweb\\Api\\Generated\\Model\\ProductVariantModel', 'json', $context);
+ 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')) {
+ 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')) {
+ 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')) {
+ 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')) {
+ 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')) {
+ 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']);
}
- if (property_exists($data, 'metaData')) {
+ elseif (\array_key_exists('categories', $data) && $data['categories'] === null) {
+ $object->setCategories(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();
- if (null !== $object->getProductId()) {
- $data->{'productId'} = $object->getProductId();
+ $data = array();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getCreatedAt()) {
- $data->{'createdAt'} = $object->getCreatedAt();
+ 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 (null !== $object->getMoreInfoUrl()) {
- $data->{'moreInfoUrl'} = $object->getMoreInfoUrl();
+ if ($object->isInitialized('unitId') && null !== $object->getUnitId()) {
+ $data['unitId'] = $object->getUnitId();
}
- $data->{'manufacturerId'} = $object->getManufacturerId();
- $data->{'unitId'} = $object->getUnitId();
- $data->{'sortIndex'} = $object->getSortIndex();
- if (null !== $object->getType()) {
- $data->{'type'} = $object->getType();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (null !== $object->getIsBackInStockWatchable()) {
- $data->{'isBackInStockWatchable'} = $object->getIsBackInStockWatchable();
+ if ($object->isInitialized('type') && null !== $object->getType()) {
+ $data['type'] = $object->getType();
}
- if (null !== $object->getBundleUseManualPrice()) {
- $data->{'bundleUseManualPrice'} = $object->getBundleUseManualPrice();
+ if ($object->isInitialized('isBackInStockWatchable') && null !== $object->getIsBackInStockWatchable()) {
+ $data['isBackInStockWatchable'] = $object->getIsBackInStockWatchable();
}
- $data->{'accounting'} = $object->getAccounting();
- if (null !== $object->getHasSeveralVariants()) {
- $data->{'hasSeveralVariants'} = $object->getHasSeveralVariants();
+ if ($object->isInitialized('bundleUseManualPrice') && null !== $object->getBundleUseManualPrice()) {
+ $data['bundleUseManualPrice'] = $object->getBundleUseManualPrice();
}
- if (null !== $object->getModifiedAt()) {
- $data->{'modifiedAt'} = $object->getModifiedAt();
+ if ($object->isInitialized('accounting') && null !== $object->getAccounting()) {
+ $data['accounting'] = $object->getAccounting();
}
- if (null !== $object->getVariants()) {
+ 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;
+ $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 3e61de1b..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 cd118ac4..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel', 'json', $context);
+ 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 51190bde..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusModel', '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/ProductStockStatusModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php
deleted file mode 100644
index 9b96d99a..00000000
--- a/src/Api/Generated/Normalizer/ProductStockStatusModelNormalizer.php
+++ /dev/null
@@ -1,86 +0,0 @@
-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')) {
- $values = array();
- foreach ($data->{'languages'} as $value) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductStockStatusLanguageModel', 'json', $context);
- }
- $object->setLanguages($values);
- }
- 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->getIdCode()) {
- $data->{'idCode'} = $object->getIdCode();
- }
- 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()) {
- $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/ProductStockStatusRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php
new file mode 100644
index 00000000..0ffb0f07
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductStockStatusRequestModelNormalizer.php
@@ -0,0 +1,140 @@
+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']);
+ }
+ elseif (\array_key_exists('stockoutNewStatusId', $data) && $data['stockoutNewStatusId'] === null) {
+ $object->setStockoutNewStatusId(null);
+ }
+ if (\array_key_exists('productBuyable', $data) && $data['productBuyable'] !== null) {
+ $object->setProductBuyable($data['productBuyable']);
+ unset($data['productBuyable']);
+ }
+ elseif (\array_key_exists('productBuyable', $data) && $data['productBuyable'] === null) {
+ $object->setProductBuyable(null);
+ }
+ if (\array_key_exists('inStock', $data) && $data['inStock'] !== null) {
+ $object->setInStock($data['inStock']);
+ unset($data['inStock']);
+ }
+ elseif (\array_key_exists('inStock', $data) && $data['inStock'] === null) {
+ $object->setInStock(null);
+ }
+ if (\array_key_exists('languages', $data) && $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);
+ 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 = array();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
+ }
+ if ($object->isInitialized('stockoutNewStatusId') && null !== $object->getStockoutNewStatusId()) {
+ $data['stockoutNewStatusId'] = $object->getStockoutNewStatusId();
+ }
+ if ($object->isInitialized('productBuyable') && null !== $object->getProductBuyable()) {
+ $data['productBuyable'] = $object->getProductBuyable();
+ }
+ if ($object->isInitialized('inStock') && null !== $object->getInStock()) {
+ $data['inStock'] = $object->getInStock();
+ }
+ if ($object->isInitialized('languages') && 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;
+ }
+ }
+ 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
new file mode 100644
index 00000000..0cefe48d
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelLanguagesNormalizer.php
@@ -0,0 +1,86 @@
+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 = 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;
+ }
+ 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
new file mode 100644
index 00000000..9eea7841
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductStockStatusResponseModelNormalizer.php
@@ -0,0 +1,132 @@
+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']);
+ }
+ elseif (\array_key_exists('stockoutNewStatusId', $data) && $data['stockoutNewStatusId'] === null) {
+ $object->setStockoutNewStatusId(null);
+ }
+ if (\array_key_exists('productBuyable', $data) && $data['productBuyable'] !== null) {
+ $object->setProductBuyable($data['productBuyable']);
+ unset($data['productBuyable']);
+ }
+ elseif (\array_key_exists('productBuyable', $data) && $data['productBuyable'] === null) {
+ $object->setProductBuyable(null);
+ }
+ if (\array_key_exists('inStock', $data) && $data['inStock'] !== null) {
+ $object->setInStock($data['inStock']);
+ unset($data['inStock']);
+ }
+ 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 = array();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
+ }
+ if ($object->isInitialized('stockoutNewStatusId') && null !== $object->getStockoutNewStatusId()) {
+ $data['stockoutNewStatusId'] = $object->getStockoutNewStatusId();
+ }
+ if ($object->isInitialized('productBuyable') && null !== $object->getProductBuyable()) {
+ $data['productBuyable'] = $object->getProductBuyable();
+ }
+ if ($object->isInitialized('inStock') && null !== $object->getInStock()) {
+ $data['inStock'] = $object->getInStock();
+ }
+ 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 b762c28d..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 ced40998..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 91b1da2c..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 5e78089c..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 772c9b4f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagLinkPostRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 0f787d37..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 d6415033..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 5c68b5ca..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,51 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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('type', $data) && $data['type'] !== null) {
+ $object->setType($data['type']);
+ unset($data['type']);
}
- if (property_exists($data, 'type')) {
- $object->setType($data->{'type'});
+ elseif (\array_key_exists('type', $data) && $data['type'] === null) {
+ $object->setType(null);
}
- if (property_exists($data, 'languages')) {
+ 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->getTagId()) {
- $data->{'tagId'} = $object->getTagId();
- }
- if (null !== $object->getType()) {
- $data->{'type'} = $object->getType();
- }
- 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 4f3f9a5d..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 9a9436c5..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 36a4b262..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 058bb37b..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,57 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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('value', $data) && $data['value'] !== null) {
+ $object->setValue($data['value']);
+ unset($data['value']);
}
- if (property_exists($data, 'value')) {
- $object->setValue($data->{'value'});
+ elseif (\array_key_exists('value', $data) && $data['value'] === null) {
+ $object->setValue(null);
}
- if (property_exists($data, 'sortIndex')) {
- $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')) {
+ 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->getTagOptionId()) {
- $data->{'tagOptionId'} = $object->getTagOptionId();
- }
- if (null !== $object->getValue()) {
- $data->{'value'} = $object->getValue();
+ $data = array();
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
}
- if (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 939711cc..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPatchRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
+ 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 4b84300e..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPostRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
+ 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 4e2c2364..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagOptionPutRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
+ 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 76bec644..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPatchRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
+ 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 884d6428..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPostRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
+ 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 24f90a5f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductTagPutRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
+ 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 68d793ac..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 359d176e..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $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 4157525f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 7056bc2d..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 f7516b13..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductUnitModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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']);
+ }
+ elseif (\array_key_exists('externalIdType', $data) && $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));
+ 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']);
+ }
+ 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->getUnitId()) {
- $data->{'unitId'} = $object->getUnitId();
+ $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->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\\ProductUnitModel' => false);
+ }
}
\ 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..1588d3bb
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductUnitModelUpdatableNormalizer.php
@@ -0,0 +1,113 @@
+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']);
+ }
+ 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) {
+ $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 = 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;
+ }
+ 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 b0814b43..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 5014b9d3..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 066f2ad9..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 69e1d780..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelLanguages';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 c2e76f1c..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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']);
+ }
+ elseif (\array_key_exists('externalIdType', $data) && $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));
+ 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']);
+ }
+ 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();
}
- 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 a751b3c0..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,45 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeModelUpdatable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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, 'languages')) {
+ 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('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();
- if (null !== $object->getAttributeId()) {
- $data->{'attributeId'} = $object->getAttributeId();
+ $data = array();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getLanguages()) {
+ 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 4b870b75..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 97825f7e..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 25a677a7..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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
new file mode 100644
index 00000000..6f248dc5
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductVariantAttributeValueModelLanguagesNormalizer.php
@@ -0,0 +1,86 @@
+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 = 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;
+ }
+ 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 8f9784f7..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] !== null) {
+ $object->setSkuSuffix($data['skuSuffix']);
+ unset($data['skuSuffix']);
}
- if (property_exists($data, 'skuSuffix')) {
- $object->setSkuSuffix($data->{'skuSuffix'});
+ elseif (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] === null) {
+ $object->setSkuSuffix(null);
}
- if (property_exists($data, 'sortIndex')) {
- $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')) {
- $values = array();
- foreach ($data->{'languages'} as $value) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueLanguageModel', 'json', $context);
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
+ }
+ 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;
}
- $object->setLanguages($values);
}
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 (null !== $object->getSkuSuffix()) {
- $data->{'skuSuffix'} = $object->getSkuSuffix();
+ 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()) {
- $values = array();
- foreach ($object->getLanguages() as $value) {
- $values[] = $this->normalizer->normalize($value, 'json', $context);
+ if ($object->isInitialized('sortIndex') && null !== $object->getSortIndex()) {
+ $data['sortIndex'] = $object->getSortIndex();
+ }
+ 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;
}
- $data->{'languages'} = $values;
}
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 4403ed8f..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,39 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantAttributeValueModelUpdatable';
+ 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)) {
- throw new InvalidArgumentException();
+ 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, 'languages')) {
+ 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('skuSuffix', $data) && $data['skuSuffix'] !== null) {
+ $object->setSkuSuffix($data['skuSuffix']);
+ unset($data['skuSuffix']);
+ }
+ elseif (\array_key_exists('skuSuffix', $data) && $data['skuSuffix'] === null) {
+ $object->setSkuSuffix(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();
- 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('skuSuffix') && null !== $object->getSkuSuffix()) {
+ $data['skuSuffix'] = $object->getSkuSuffix();
+ }
+ 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 17897890..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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) {
- $values[] = $this->denormalizer->denormalize($value, 'Starweb\\Api\\Generated\\Model\\ProductVariantModel', 'json', $context);
+ 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 15cb6c96..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $object->setData($this->denormalizer->denormalize($data->{'data'}, 'Starweb\\Api\\Generated\\Model\\ProductVariantModel', '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/ProductVariantModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php
deleted file mode 100644
index 2b872ee5..00000000
--- a/src/Api/Generated/Normalizer/ProductVariantModelNormalizer.php
+++ /dev/null
@@ -1,144 +0,0 @@
-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);
- }
- if (property_exists($data, 'prices')) {
- $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')) {
- $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);
- }
- 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->getIsActive()) {
- $data->{'isActive'} = $object->getIsActive();
- }
- if (null !== $object->getSortIndex()) {
- $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->{'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;
- }
- if (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;
- }
- if (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;
- }
- return $data;
- }
-}
\ No newline at end of file
diff --git a/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php
new file mode 100644
index 00000000..1ecdb144
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductVariantPatchRequestModelNormalizer.php
@@ -0,0 +1,227 @@
+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 (\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']);
+ }
+ elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) {
+ $object->setStockQuantity(null);
+ }
+ if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) {
+ $object->setWeightInKg($data['weightInKg']);
+ unset($data['weightInKg']);
+ }
+ elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) {
+ $object->setWeightInKg(null);
+ }
+ if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) {
+ $object->setCostPrice($data['costPrice']);
+ unset($data['costPrice']);
+ }
+ elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) {
+ $object->setCostPrice(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) {
+ $values[] = $value;
+ }
+ $object->setAttributeValueLinks($values);
+ unset($data['attributeValueLinks']);
+ }
+ 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) {
+ $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 = array();
+ if ($object->isInitialized('sku') && null !== $object->getSku()) {
+ $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 ($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();
+ }
+ if ($object->isInitialized('attributeValueLinks') && null !== $object->getAttributeValueLinks()) {
+ $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;
+ }
+ 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 74269c1f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 e14984fd..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 7eb458b3..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,41 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantPriceModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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']);
+ }
+ elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) {
+ $object->setExternalIdType(null);
+ }
+ if (\array_key_exists('priceExVat', $data) && $data['priceExVat'] !== null) {
+ $object->setPriceExVat($data['priceExVat']);
+ unset($data['priceExVat']);
}
- if (property_exists($data, 'priceExVat')) {
- $object->setPriceExVat($data->{'priceExVat'});
+ elseif (\array_key_exists('priceExVat', $data) && $data['priceExVat'] === null) {
+ $object->setPriceExVat(null);
}
- if (property_exists($data, 'specialPriceExVat')) {
- $object->setSpecialPriceExVat($data->{'specialPriceExVat'});
+ if (\array_key_exists('specialPriceExVat', $data) && $data['specialPriceExVat'] !== null) {
+ $object->setSpecialPriceExVat($data['specialPriceExVat']);
+ unset($data['specialPriceExVat']);
+ }
+ 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();
}
- if (null !== $object->getPriceExVat()) {
- $data->{'priceExVat'} = $object->getPriceExVat();
+ if ($object->isInitialized('priceExVat') && null !== $object->getPriceExVat()) {
+ $data['priceExVat'] = $object->getPriceExVat();
+ }
+ 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;
+ }
}
- $data->{'specialPriceExVat'} = $object->getSpecialPriceExVat();
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
new file mode 100644
index 00000000..a54dbcc1
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductVariantPutRequestModelNormalizer.php
@@ -0,0 +1,223 @@
+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 (\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']);
+ }
+ elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) {
+ $object->setStockQuantity(null);
+ }
+ if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) {
+ $object->setWeightInKg($data['weightInKg']);
+ unset($data['weightInKg']);
+ }
+ elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) {
+ $object->setWeightInKg(null);
+ }
+ if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) {
+ $object->setCostPrice($data['costPrice']);
+ unset($data['costPrice']);
+ }
+ elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) {
+ $object->setCostPrice(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) {
+ $values[] = $value;
+ }
+ $object->setAttributeValueLinks($values);
+ unset($data['attributeValueLinks']);
+ }
+ 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) {
+ $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 = 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 ($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;
+ }
+ 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
new file mode 100644
index 00000000..832d4509
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductVariantRequestModelNormalizer.php
@@ -0,0 +1,223 @@
+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 (\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']);
+ }
+ elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) {
+ $object->setStockQuantity(null);
+ }
+ if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) {
+ $object->setWeightInKg($data['weightInKg']);
+ unset($data['weightInKg']);
+ }
+ elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) {
+ $object->setWeightInKg(null);
+ }
+ if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) {
+ $object->setCostPrice($data['costPrice']);
+ unset($data['costPrice']);
+ }
+ elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) {
+ $object->setCostPrice(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) {
+ $values[] = $value;
+ }
+ $object->setAttributeValueLinks($values);
+ unset($data['attributeValueLinks']);
+ }
+ 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) {
+ $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 = 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 ($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;
+ }
+ 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
new file mode 100644
index 00000000..4b6971ed
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductVariantResponseModelNormalizer.php
@@ -0,0 +1,266 @@
+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 (\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']);
+ }
+ elseif (\array_key_exists('stockQuantity', $data) && $data['stockQuantity'] === null) {
+ $object->setStockQuantity(null);
+ }
+ if (\array_key_exists('weightInKg', $data) && $data['weightInKg'] !== null) {
+ $object->setWeightInKg($data['weightInKg']);
+ unset($data['weightInKg']);
+ }
+ elseif (\array_key_exists('weightInKg', $data) && $data['weightInKg'] === null) {
+ $object->setWeightInKg(null);
+ }
+ if (\array_key_exists('costPrice', $data) && $data['costPrice'] !== null) {
+ $object->setCostPrice($data['costPrice']);
+ unset($data['costPrice']);
+ }
+ elseif (\array_key_exists('costPrice', $data) && $data['costPrice'] === null) {
+ $object->setCostPrice(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) {
+ $values[] = $value;
+ }
+ $object->setAttributeValueLinks($values);
+ unset($data['attributeValueLinks']);
+ }
+ 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) {
+ $values_1[] = $value_1;
+ }
+ $object->setVolumePricingInheritancePricelistIds($values_1);
+ unset($data['volumePricingInheritancePricelistIds']);
+ }
+ elseif (\array_key_exists('volumePricingInheritancePricelistIds', $data) && $data['volumePricingInheritancePricelistIds'] === null) {
+ $object->setVolumePricingInheritancePricelistIds(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) {
+ $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 (\array_key_exists('attributeValues', $data) && $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);
+ 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 = 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 ($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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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 61c4f323..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 725d0316..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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
new file mode 100644
index 00000000..1b221a59
--- /dev/null
+++ b/src/Api/Generated/Normalizer/ProductVariantStockPatchRequestModelNormalizer.php
@@ -0,0 +1,91 @@
+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']);
+ }
+ 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 = array();
+ if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) {
+ $data['stockStatusId'] = $object->getStockStatusId();
+ }
+ if ($object->isInitialized('stockQuantity') && 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 ca08bd21..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockPutRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 185b087f..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,43 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantStockResponseModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $object->setStockStatusId($data->{'stockStatusId'});
+ elseif (\array_key_exists('stockStatusId', $data) && $data['stockStatusId'] === null) {
+ $object->setStockStatusId(null);
}
- if (property_exists($data, 'stockQuantity')) {
- $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->getStockLocationId()) {
- $data->{'stockLocationId'} = $object->getStockLocationId();
+ $data = array();
+ if ($object->isInitialized('stockStatusId') && null !== $object->getStockStatusId()) {
+ $data['stockStatusId'] = $object->getStockStatusId();
}
- if (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 9192bfbc..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 7ed90c45..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 67c67993..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,43 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVariantVolumePriceModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (\array_key_exists('externalIdType', $data) && $data['externalIdType'] !== null) {
+ $object->setExternalIdType($data['externalIdType']);
+ unset($data['externalIdType']);
}
- if (property_exists($data, 'priceExVat')) {
- $object->setPriceExVat($data->{'priceExVat'});
+ elseif (\array_key_exists('externalIdType', $data) && $data['externalIdType'] === null) {
+ $object->setExternalIdType(null);
}
- if (property_exists($data, 'quantity')) {
- $object->setQuantity($data->{'quantity'});
+ if (\array_key_exists('priceExVat', $data) && $data['priceExVat'] !== null) {
+ $object->setPriceExVat($data['priceExVat']);
+ unset($data['priceExVat']);
+ }
+ 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 (null !== $object->getPriceExVat()) {
- $data->{'priceExVat'} = $object->getPriceExVat();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getQuantity()) {
- $data->{'quantity'} = $object->getQuantity();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
+ }
+ 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 d794a72c..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 1cf8724f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 32ea576f..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductVatRateModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 5cbd8a98..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ProductsAttributesModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 9f6d01f2..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 fb5110de..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,49 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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('title', $data) && $data['title'] !== null) {
+ $object->setTitle($data['title']);
+ unset($data['title']);
}
- if (property_exists($data, 'name')) {
- $object->setName($data->{'name'});
+ elseif (\array_key_exists('title', $data) && $data['title'] === null) {
+ $object->setTitle(null);
}
- if (property_exists($data, 'title')) {
- $object->setTitle($data->{'title'});
+ if (\array_key_exists('shortDescription', $data) && $data['shortDescription'] !== null) {
+ $object->setShortDescription($data['shortDescription']);
+ unset($data['shortDescription']);
}
- if (property_exists($data, 'shortDescription')) {
- $object->setShortDescription($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();
- 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();
+ $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 a2e72741..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 18ba63b1..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 1c91b5e5..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,97 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingMethodModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] !== null) {
+ $object->setShippingMethodId($data['shippingMethodId']);
+ unset($data['shippingMethodId']);
+ }
+ elseif (\array_key_exists('shippingMethodId', $data) && $data['shippingMethodId'] === null) {
+ $object->setShippingMethodId(null);
}
- if (property_exists($data, 'active')) {
- $object->setActive($data->{'active'});
+ if (\array_key_exists('active', $data) && $data['active'] !== null) {
+ $object->setActive($data['active']);
+ unset($data['active']);
}
- if (property_exists($data, 'validForCountries')) {
- $object->setValidForCountries($data->{'validForCountries'});
+ elseif (\array_key_exists('active', $data) && $data['active'] === null) {
+ $object->setActive(null);
}
- if (property_exists($data, 'validCountriesSelected')) {
+ 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']);
}
- if (property_exists($data, 'validForMinItemsSubtotal')) {
- $object->setValidForMinItemsSubtotal($data->{'validForMinItemsSubtotal'});
+ elseif (\array_key_exists('validCountriesSelected', $data) && $data['validCountriesSelected'] === null) {
+ $object->setValidCountriesSelected(null);
}
- if (property_exists($data, 'validForMaxItemsSubtotal')) {
- $object->setValidForMaxItemsSubtotal($data->{'validForMaxItemsSubtotal'});
+ if (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] !== null) {
+ $object->setValidForMinItemsSubtotal($data['validForMinItemsSubtotal']);
+ unset($data['validForMinItemsSubtotal']);
}
- if (property_exists($data, 'validForMinWeight')) {
- $object->setValidForMinWeight($data->{'validForMinWeight'});
+ elseif (\array_key_exists('validForMinItemsSubtotal', $data) && $data['validForMinItemsSubtotal'] === null) {
+ $object->setValidForMinItemsSubtotal(null);
}
- if (property_exists($data, 'validForMaxWeight')) {
- $object->setValidForMaxWeight($data->{'validForMaxWeight'});
+ if (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] !== null) {
+ $object->setValidForMaxItemsSubtotal($data['validForMaxItemsSubtotal']);
+ unset($data['validForMaxItemsSubtotal']);
}
- if (property_exists($data, 'validForCustomerType')) {
- $object->setValidForCustomerType($data->{'validForCustomerType'});
+ elseif (\array_key_exists('validForMaxItemsSubtotal', $data) && $data['validForMaxItemsSubtotal'] === null) {
+ $object->setValidForMaxItemsSubtotal(null);
}
- if (property_exists($data, 'freeShippingMinItemsSubtotal')) {
- $object->setFreeShippingMinItemsSubtotal($data->{'freeShippingMinItemsSubtotal'});
+ if (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] !== null) {
+ $object->setValidForMinWeight($data['validForMinWeight']);
+ unset($data['validForMinWeight']);
}
- if (property_exists($data, 'freeShippingMinWeight')) {
- $object->setFreeShippingMinWeight($data->{'freeShippingMinWeight'});
+ elseif (\array_key_exists('validForMinWeight', $data) && $data['validForMinWeight'] === null) {
+ $object->setValidForMinWeight(null);
}
- if (property_exists($data, 'isClickAndCollect')) {
- $object->setIsClickAndCollect($data->{'isClickAndCollect'});
+ if (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] !== null) {
+ $object->setValidForMaxWeight($data['validForMaxWeight']);
+ unset($data['validForMaxWeight']);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\ShippingMethodLanguageModelCollection', 'json', $context));
+ elseif (\array_key_exists('validForMaxWeight', $data) && $data['validForMaxWeight'] === null) {
+ $object->setValidForMaxWeight(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getShippingMethodId()) {
- $data->{'shippingMethodId'} = $object->getShippingMethodId();
+ if (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] !== null) {
+ $object->setValidForCustomerType($data['validForCustomerType']);
+ unset($data['validForCustomerType']);
}
- if (null !== $object->getActive()) {
- $data->{'active'} = $object->getActive();
+ elseif (\array_key_exists('validForCustomerType', $data) && $data['validForCustomerType'] === null) {
+ $object->setValidForCustomerType(null);
}
- if (null !== $object->getValidForCountries()) {
- $data->{'validForCountries'} = $object->getValidForCountries();
+ if (\array_key_exists('freeShippingMinItemsSubtotal', $data) && $data['freeShippingMinItemsSubtotal'] !== null) {
+ $object->setFreeShippingMinItemsSubtotal($data['freeShippingMinItemsSubtotal']);
+ unset($data['freeShippingMinItemsSubtotal']);
}
- if (null !== $object->getValidCountriesSelected()) {
- $values = array();
- foreach ($object->getValidCountriesSelected() as $value) {
- $values[] = $value;
+ 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;
}
- $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();
+ return $object;
+ }
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = array())
+ {
+ $data = array();
+ 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\\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 0134c92b..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 ea415e22..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,37 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShippingTrackingTypeModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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->getType()) {
- $data->{'type'} = $object->getType();
- }
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ $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 52b00a89..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 1039906f..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,129 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\ShopModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (property_exists($data, 'idCode')) {
- $object->setIdCode($data->{'idCode'});
+ if (\array_key_exists('status', $data) && $data['status'] !== null) {
+ $object->setStatus($data['status']);
+ unset($data['status']);
}
- if (property_exists($data, 'status')) {
- $object->setStatus($data->{'status'});
+ elseif (\array_key_exists('status', $data) && $data['status'] === null) {
+ $object->setStatus(null);
}
- if (property_exists($data, 'defaultLangCode')) {
- $object->setDefaultLangCode($data->{'defaultLangCode'});
+ if (\array_key_exists('defaultLangCode', $data) && $data['defaultLangCode'] !== null) {
+ $object->setDefaultLangCode($data['defaultLangCode']);
+ unset($data['defaultLangCode']);
}
- if (property_exists($data, 'activeLangCodes')) {
+ elseif (\array_key_exists('defaultLangCode', $data) && $data['defaultLangCode'] === null) {
+ $object->setDefaultLangCode(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']);
}
- if (property_exists($data, 'baseCurrency')) {
- $object->setBaseCurrency($data->{'baseCurrency'});
- }
- if (property_exists($data, 'defaultCustomerCountryCode')) {
- $object->setDefaultCustomerCountryCode($data->{'defaultCustomerCountryCode'});
- }
- if (property_exists($data, 'generalDefaultVatRate')) {
- $object->setGeneralDefaultVatRate($data->{'generalDefaultVatRate'});
+ elseif (\array_key_exists('activeLangCodes', $data) && $data['activeLangCodes'] === null) {
+ $object->setActiveLangCodes(null);
}
- if (property_exists($data, 'shopCompanyName')) {
- $object->setShopCompanyName($data->{'shopCompanyName'});
+ if (\array_key_exists('baseCurrency', $data) && $data['baseCurrency'] !== null) {
+ $object->setBaseCurrency($data['baseCurrency']);
+ unset($data['baseCurrency']);
}
- if (property_exists($data, 'shopAddress')) {
- $object->setShopAddress($data->{'shopAddress'});
+ elseif (\array_key_exists('baseCurrency', $data) && $data['baseCurrency'] === null) {
+ $object->setBaseCurrency(null);
}
- if (property_exists($data, 'shopPostalCode')) {
- $object->setShopPostalCode($data->{'shopPostalCode'});
+ if (\array_key_exists('defaultCustomerCountryCode', $data) && $data['defaultCustomerCountryCode'] !== null) {
+ $object->setDefaultCustomerCountryCode($data['defaultCustomerCountryCode']);
+ unset($data['defaultCustomerCountryCode']);
}
- if (property_exists($data, 'shopCity')) {
- $object->setShopCity($data->{'shopCity'});
+ elseif (\array_key_exists('defaultCustomerCountryCode', $data) && $data['defaultCustomerCountryCode'] === null) {
+ $object->setDefaultCustomerCountryCode(null);
}
- if (property_exists($data, 'shopOrgNo')) {
- $object->setShopOrgNo($data->{'shopOrgNo'});
+ if (\array_key_exists('generalDefaultVatRate', $data) && $data['generalDefaultVatRate'] !== null) {
+ $object->setGeneralDefaultVatRate($data['generalDefaultVatRate']);
+ unset($data['generalDefaultVatRate']);
}
- if (property_exists($data, 'shopPhoneNo')) {
- $object->setShopPhoneNo($data->{'shopPhoneNo'});
+ elseif (\array_key_exists('generalDefaultVatRate', $data) && $data['generalDefaultVatRate'] === null) {
+ $object->setGeneralDefaultVatRate(null);
}
- if (property_exists($data, 'shopVatNo')) {
- $object->setShopVatNo($data->{'shopVatNo'});
+ if (\array_key_exists('shopCompanyName', $data) && $data['shopCompanyName'] !== null) {
+ $object->setShopCompanyName($data['shopCompanyName']);
+ unset($data['shopCompanyName']);
}
- if (property_exists($data, 'shopCountryCode')) {
- $object->setShopCountryCode($data->{'shopCountryCode'});
+ elseif (\array_key_exists('shopCompanyName', $data) && $data['shopCompanyName'] === null) {
+ $object->setShopCompanyName(null);
}
- return $object;
- }
- public function normalize($object, $format = null, array $context = array())
- {
- $data = new \stdClass();
- if (null !== $object->getName()) {
- $data->{'name'} = $object->getName();
+ if (\array_key_exists('shopAddress', $data) && $data['shopAddress'] !== null) {
+ $object->setShopAddress($data['shopAddress']);
+ unset($data['shopAddress']);
}
- if (null !== $object->getIdCode()) {
- $data->{'idCode'} = $object->getIdCode();
+ elseif (\array_key_exists('shopAddress', $data) && $data['shopAddress'] === null) {
+ $object->setShopAddress(null);
}
- if (null !== $object->getStatus()) {
- $data->{'status'} = $object->getStatus();
+ if (\array_key_exists('shopPostalCode', $data) && $data['shopPostalCode'] !== null) {
+ $object->setShopPostalCode($data['shopPostalCode']);
+ unset($data['shopPostalCode']);
}
- if (null !== $object->getDefaultLangCode()) {
- $data->{'defaultLangCode'} = $object->getDefaultLangCode();
+ elseif (\array_key_exists('shopPostalCode', $data) && $data['shopPostalCode'] === null) {
+ $object->setShopPostalCode(null);
}
- if (null !== $object->getActiveLangCodes()) {
- $values = array();
- foreach ($object->getActiveLangCodes() as $value) {
- $values[] = $value;
- }
- $data->{'activeLangCodes'} = $values;
+ if (\array_key_exists('shopCity', $data) && $data['shopCity'] !== null) {
+ $object->setShopCity($data['shopCity']);
+ unset($data['shopCity']);
}
- if (null !== $object->getBaseCurrency()) {
- $data->{'baseCurrency'} = $object->getBaseCurrency();
+ elseif (\array_key_exists('shopCity', $data) && $data['shopCity'] === null) {
+ $object->setShopCity(null);
}
- if (null !== $object->getDefaultCustomerCountryCode()) {
- $data->{'defaultCustomerCountryCode'} = $object->getDefaultCustomerCountryCode();
+ if (\array_key_exists('shopOrgNo', $data) && $data['shopOrgNo'] !== null) {
+ $object->setShopOrgNo($data['shopOrgNo']);
+ unset($data['shopOrgNo']);
}
- if (null !== $object->getGeneralDefaultVatRate()) {
- $data->{'generalDefaultVatRate'} = $object->getGeneralDefaultVatRate();
+ elseif (\array_key_exists('shopOrgNo', $data) && $data['shopOrgNo'] === null) {
+ $object->setShopOrgNo(null);
}
- if (null !== $object->getShopCompanyName()) {
- $data->{'shopCompanyName'} = $object->getShopCompanyName();
+ if (\array_key_exists('shopPhoneNo', $data) && $data['shopPhoneNo'] !== null) {
+ $object->setShopPhoneNo($data['shopPhoneNo']);
+ unset($data['shopPhoneNo']);
}
- if (null !== $object->getShopAddress()) {
- $data->{'shopAddress'} = $object->getShopAddress();
+ elseif (\array_key_exists('shopPhoneNo', $data) && $data['shopPhoneNo'] === null) {
+ $object->setShopPhoneNo(null);
}
- if (null !== $object->getShopPostalCode()) {
- $data->{'shopPostalCode'} = $object->getShopPostalCode();
+ if (\array_key_exists('shopVatNo', $data) && $data['shopVatNo'] !== null) {
+ $object->setShopVatNo($data['shopVatNo']);
+ unset($data['shopVatNo']);
}
- if (null !== $object->getShopCity()) {
- $data->{'shopCity'} = $object->getShopCity();
+ elseif (\array_key_exists('shopVatNo', $data) && $data['shopVatNo'] === null) {
+ $object->setShopVatNo(null);
}
- if (null !== $object->getShopOrgNo()) {
- $data->{'shopOrgNo'} = $object->getShopOrgNo();
+ if (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] !== null) {
+ $object->setShopCountryCode($data['shopCountryCode']);
+ unset($data['shopCountryCode']);
}
- if (null !== $object->getShopPhoneNo()) {
- $data->{'shopPhoneNo'} = $object->getShopPhoneNo();
+ elseif (\array_key_exists('shopCountryCode', $data) && $data['shopCountryCode'] === null) {
+ $object->setShopCountryCode(null);
}
- if (null !== $object->getShopVatNo()) {
- $data->{'shopVatNo'} = $object->getShopVatNo();
+ foreach ($data as $key => $value_1) {
+ if (preg_match('/.*/', (string) $key)) {
+ $object[$key] = $value_1;
+ }
}
- if (null !== $object->getShopCountryCode()) {
- $data->{'shopCountryCode'} = $object->getShopCountryCode();
+ return $object;
+ }
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = array())
+ {
+ $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 951483c8..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 e504f378..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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 23fa2489..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 fc4b39c5..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 d931ed8e..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,55 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ elseif (\array_key_exists('visibility', $data) && $data['visibility'] === null) {
+ $object->setVisibility(null);
}
- if (property_exists($data, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) {
+ $object->setSortIndex($data['sortIndex']);
+ unset($data['sortIndex']);
}
- if (property_exists($data, 'ecommerceStockLocation')) {
- $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context));
+ if (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] !== null) {
+ $object->setEcommerceStockLocation($data['ecommerceStockLocation']);
+ unset($data['ecommerceStockLocation']);
+ }
+ elseif (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] === null) {
+ $object->setEcommerceStockLocation(null);
+ }
+ 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();
- if (null !== $object->getStockLocationId()) {
- $data->{'stockLocationId'} = $object->getStockLocationId();
+ $data = array();
+ if ($object->isInitialized('externalId') && null !== $object->getExternalId()) {
+ $data['externalId'] = $object->getExternalId();
}
- if (null !== $object->getVisibility()) {
- $data->{'visibility'} = $object->getVisibility();
+ if ($object->isInitialized('externalIdType') && null !== $object->getExternalIdType()) {
+ $data['externalIdType'] = $object->getExternalIdType();
}
- if (null !== $object->getSortIndex()) {
- $data->{'sortIndex'} = $object->getSortIndex();
+ if ($object->isInitialized('visibility') && null !== $object->getVisibility()) {
+ $data['visibility'] = $object->getVisibility();
}
- if (null !== $object->getEcommerceStockLocation()) {
- $data->{'ecommerceStockLocation'} = $object->getEcommerceStockLocation();
+ 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('ecommerceStockLocation') && null !== $object->getEcommerceStockLocation()) {
+ $data['ecommerceStockLocation'] = $object->getEcommerceStockLocation();
+ }
+ 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 d3c4079d..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,49 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPostRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ 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, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) {
+ $object->setSortIndex($data['sortIndex']);
+ unset($data['sortIndex']);
}
- if (property_exists($data, 'ecommerceStockLocation')) {
- $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context));
+ if (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] !== null) {
+ $object->setEcommerceStockLocation($data['ecommerceStockLocation']);
+ unset($data['ecommerceStockLocation']);
+ }
+ elseif (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] === null) {
+ $object->setEcommerceStockLocation(null);
+ }
+ if (\array_key_exists('languages', $data) && $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);
+ 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->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()) {
- $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), '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;
+ }
}
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 bb11432f..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,49 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\StockLocationPutRequestModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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, 'visibility')) {
- $object->setVisibility($data->{'visibility'});
+ 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, 'sortIndex')) {
- $object->setSortIndex($data->{'sortIndex'});
+ if (\array_key_exists('sortIndex', $data) && $data['sortIndex'] !== null) {
+ $object->setSortIndex($data['sortIndex']);
+ unset($data['sortIndex']);
}
- if (property_exists($data, 'ecommerceStockLocation')) {
- $object->setEcommerceStockLocation($data->{'ecommerceStockLocation'});
+ elseif (\array_key_exists('sortIndex', $data) && $data['sortIndex'] === null) {
+ $object->setSortIndex(null);
}
- if (property_exists($data, 'languages')) {
- $object->setLanguages($this->denormalizer->denormalize($data->{'languages'}, 'Starweb\\Api\\Generated\\Model\\StockLocationLanguagesModelCollection', 'json', $context));
+ if (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] !== null) {
+ $object->setEcommerceStockLocation($data['ecommerceStockLocation']);
+ unset($data['ecommerceStockLocation']);
+ }
+ elseif (\array_key_exists('ecommerceStockLocation', $data) && $data['ecommerceStockLocation'] === null) {
+ $object->setEcommerceStockLocation(null);
+ }
+ if (\array_key_exists('languages', $data) && $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);
+ 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->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()) {
- $data->{'languages'} = $this->normalizer->normalize($object->getLanguages(), '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;
+ }
}
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 f01894e3..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,43 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\TokenModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $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')) {
- $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();
- 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();
+ $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 bde62f00..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 681c9890..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 11c256c1..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\VatRateModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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')) {
- $object->setDefaultVatRate($data->{'defaultVatRate'});
+ elseif (\array_key_exists('defaultVatRate', $data) && $data['defaultVatRate'] === null) {
+ $object->setDefaultVatRate(null);
}
- if (property_exists($data, 'fixedOrderPaymentVatRate')) {
- $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')) {
- $object->setFixedOrderShippingVatRate($data->{'fixedOrderShippingVatRate'});
+ elseif (\array_key_exists('fixedOrderPaymentVatRate', $data) && $data['fixedOrderPaymentVatRate'] === null) {
+ $object->setFixedOrderPaymentVatRate(null);
}
- if (property_exists($data, 'fixedOrderDiscountVatRate')) {
- $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 0ff8a288..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelCollection';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
+ 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 811c78ad..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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModelItem';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 f73706be..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,55 +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 get_class($data) === 'Starweb\\Api\\Generated\\Model\\WebHookModel';
+ 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)) {
- throw new InvalidArgumentException();
+ 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')) {
- $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 (property_exists($data, 'name')) {
- $object->setName($data->{'name'});
+ if (\array_key_exists('event', $data) && $data['event'] !== null) {
+ $object->setEvent($data['event']);
+ unset($data['event']);
}
- if (property_exists($data, 'event')) {
- $object->setEvent($data->{'event'});
+ elseif (\array_key_exists('event', $data) && $data['event'] === null) {
+ $object->setEvent(null);
}
- if (property_exists($data, 'statusId')) {
- $object->setStatusId($data->{'statusId'});
+ if (\array_key_exists('statusId', $data) && $data['statusId'] !== null) {
+ $object->setStatusId($data['statusId']);
+ unset($data['statusId']);
}
- if (property_exists($data, 'url')) {
- $object->setUrl($data->{'url'});
+ elseif (\array_key_exists('statusId', $data) && $data['statusId'] === null) {
+ $object->setStatusId(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();
- if (null !== $object->getWebHookId()) {
- $data->{'webHookId'} = $object->getWebHookId();
+ $data = array();
+ if ($object->isInitialized('name') && null !== $object->getName()) {
+ $data['name'] = $object->getName();
}
- if (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();
}
- if (null !== $object->getStatusId()) {
- $data->{'statusId'} = $object->getStatusId();
+ if ($object->isInitialized('url') && null !== $object->getUrl()) {
+ $data['url'] = $object->getUrl();
}
- if (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/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;
}
}
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 dd1ca068..46a96d50 100644
--- a/src/HttpClient/Plugin/ErrorPlugin.php
+++ b/src/HttpClient/Plugin/ErrorPlugin.php
@@ -42,15 +42,17 @@
*/
final class ErrorPlugin implements Plugin
{
+ public const SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR = 5;
+
/**
* {@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);
- 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 (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
+ sleep(self::SECONDS_TO_SLEEP_ON_MAX_REQUEST_PER_MINUTE_ERROR);
+ $first($request);
+ } else {
+ throw new ClientErrorException($content['error_description'] ?? 'Malformed resposne from server.', $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';
+ }
}
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;