From 1e563ade4b9fac76bd3436c03648793058300d79 Mon Sep 17 00:00:00 2001 From: Jesse Evers Date: Fri, 20 Jan 2023 13:18:26 -0500 Subject: [PATCH] Fix ShippingV2 schema, update ObjectSerializer array deserialization (#432) --- docs/Model/ShippingV2/ErrorList.md | 9 + lib/Api/ShippingV2Api.php | 378 +++++++++--------- lib/Model/ShippingV2/Address.php | 2 +- lib/Model/ShippingV2/AmazonOrderDetails.php | 2 +- .../ShippingV2/AmazonShipmentDetails.php | 2 +- .../AvailableValueAddedServiceGroup.php | 2 +- lib/Model/ShippingV2/ChannelDetails.php | 2 +- lib/Model/ShippingV2/ChargeComponent.php | 2 +- lib/Model/ShippingV2/CollectOnDelivery.php | 2 +- lib/Model/ShippingV2/Currency.php | 2 +- lib/Model/ShippingV2/Dimensions.php | 2 +- .../DirectFulfillmentItemIdentifiers.php | 2 +- .../ShippingV2/DirectPurchaseRequest.php | 2 +- lib/Model/ShippingV2/DirectPurchaseResult.php | 2 +- lib/Model/ShippingV2/DocumentSize.php | 2 +- lib/Model/ShippingV2/Error.php | 2 +- lib/Model/ShippingV2/ErrorList.php | 188 +++++++++ lib/Model/ShippingV2/Event.php | 2 +- lib/Model/ShippingV2/GetRatesRequest.php | 2 +- lib/Model/ShippingV2/GetRatesResult.php | 2 +- .../ShippingV2/GetShipmentDocumentsResult.php | 2 +- lib/Model/ShippingV2/GetTrackingResult.php | 2 +- lib/Model/ShippingV2/IneligibilityReason.php | 2 +- lib/Model/ShippingV2/IneligibleRate.php | 2 +- lib/Model/ShippingV2/InvoiceDetails.php | 2 +- lib/Model/ShippingV2/Item.php | 2 +- lib/Model/ShippingV2/Location.php | 2 +- lib/Model/ShippingV2/Package.php | 2 +- lib/Model/ShippingV2/PackageDocument.php | 2 +- .../ShippingV2/PackageDocumentDetail.php | 2 +- lib/Model/ShippingV2/PrintOption.php | 2 +- lib/Model/ShippingV2/Promise.php | 2 +- .../ShippingV2/PurchaseShipmentRequest.php | 2 +- .../ShippingV2/PurchaseShipmentResult.php | 2 +- lib/Model/ShippingV2/Rate.php | 2 +- .../RequestedDocumentSpecification.php | 2 +- .../ShippingV2/RequestedValueAddedService.php | 2 +- .../ShippingV2/SupportedDocumentDetail.php | 2 +- .../SupportedDocumentSpecification.php | 2 +- lib/Model/ShippingV2/TaxDetail.php | 2 +- lib/Model/ShippingV2/TimeWindow.php | 2 +- lib/Model/ShippingV2/TrackingSummary.php | 2 +- lib/Model/ShippingV2/ValueAddedService.php | 2 +- .../ShippingV2/ValueAddedServiceDetails.php | 2 +- lib/Model/ShippingV2/Weight.php | 2 +- lib/ObjectSerializer.php | 4 +- 46 files changed, 430 insertions(+), 233 deletions(-) create mode 100644 docs/Model/ShippingV2/ErrorList.md create mode 100644 lib/Model/ShippingV2/ErrorList.php diff --git a/docs/Model/ShippingV2/ErrorList.md b/docs/Model/ShippingV2/ErrorList.md new file mode 100644 index 000000000..0c248cd59 --- /dev/null +++ b/docs/Model/ShippingV2/ErrorList.md @@ -0,0 +1,9 @@ +## ErrorList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**\SellingPartnerApi\Model\ShippingV2\Error[]**](Error.md) | A list of error responses returned when a request is unsuccessful. | [optional] + +[[ShippingV2 Models]](../) [[API list]](../../Api) [[README]](../../../README.md) diff --git a/lib/Api/ShippingV2Api.php b/lib/Api/ShippingV2Api.php index 8b8bf47df..4c54380db 100644 --- a/lib/Api/ShippingV2Api.php +++ b/lib/Api/ShippingV2Api.php @@ -121,77 +121,77 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\CancelShipmentResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\CancelShipmentResponse'; @@ -217,7 +217,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -225,7 +225,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -233,7 +233,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -241,7 +241,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -249,7 +249,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -257,7 +257,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -265,7 +265,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -273,7 +273,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -281,7 +281,7 @@ public function cancelShipmentWithHttpInfo($shipment_id, $x_amzn_shipping_busine case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -544,77 +544,77 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\DirectPurchaseResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\DirectPurchaseResponse'; @@ -640,7 +640,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -648,7 +648,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -656,7 +656,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -664,7 +664,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -672,7 +672,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -680,7 +680,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -688,7 +688,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -696,7 +696,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -704,7 +704,7 @@ public function directPurchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_ke case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -978,77 +978,77 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\GetAdditionalInputsResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\GetAdditionalInputsResponse'; @@ -1074,7 +1074,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1082,7 +1082,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1090,7 +1090,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1098,7 +1098,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1106,7 +1106,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1114,7 +1114,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1122,7 +1122,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1130,7 +1130,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1138,7 +1138,7 @@ public function getAdditionalInputsWithHttpInfo($request_token, $rate_id, $x_amz case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1413,77 +1413,77 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\GetRatesResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\GetRatesResponse'; @@ -1509,7 +1509,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1517,7 +1517,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1525,7 +1525,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1533,7 +1533,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1541,7 +1541,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1549,7 +1549,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1557,7 +1557,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1565,7 +1565,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1573,7 +1573,7 @@ public function getRatesWithHttpInfo($body, $x_amzn_shipping_business_id = null) case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1835,77 +1835,77 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\GetShipmentDocumentsResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\GetShipmentDocumentsResponse'; @@ -1931,7 +1931,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1939,7 +1939,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1947,7 +1947,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1955,7 +1955,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1963,7 +1963,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1971,7 +1971,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1979,7 +1979,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1987,7 +1987,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1995,7 +1995,7 @@ public function getShipmentDocumentsWithHttpInfo($shipment_id, $package_client_r case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2295,77 +2295,77 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\GetTrackingResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\GetTrackingResponse'; @@ -2391,7 +2391,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2399,7 +2399,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2407,7 +2407,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2415,7 +2415,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2423,7 +2423,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2431,7 +2431,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2439,7 +2439,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2447,7 +2447,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2455,7 +2455,7 @@ public function getTrackingWithHttpInfo($tracking_id, $carrier_id, $x_amzn_shipp case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2732,77 +2732,77 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\PurchaseShipmentResponse', $response->getHeaders()); case 400: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 401: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 403: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 404: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 413: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 415: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 429: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 500: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); case 503: - if ('\SellingPartnerApi\Model\ShippingV2\Error[]' === '\SplFileObject') { + if ('\SellingPartnerApi\Model\ShippingV2\ErrorList' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } - return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\Error[]', $response->getHeaders()); + return ObjectSerializer::deserialize($content, '\SellingPartnerApi\Model\ShippingV2\ErrorList', $response->getHeaders()); } $returnType = '\SellingPartnerApi\Model\ShippingV2\PurchaseShipmentResponse'; @@ -2828,7 +2828,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2836,7 +2836,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2844,7 +2844,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2852,7 +2852,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2860,7 +2860,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 413: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2868,7 +2868,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2876,7 +2876,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2884,7 +2884,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2892,7 +2892,7 @@ public function purchaseShipmentWithHttpInfo($body, $x_amzn_idempotency_key = nu case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SellingPartnerApi\Model\ShippingV2\Error[]', + '\SellingPartnerApi\Model\ShippingV2\ErrorList', $e->getResponseHeaders() ); $e->setResponseObject($data); diff --git a/lib/Model/ShippingV2/Address.php b/lib/Model/ShippingV2/Address.php index 315f6d6ed..f045351de 100644 --- a/lib/Model/ShippingV2/Address.php +++ b/lib/Model/ShippingV2/Address.php @@ -121,7 +121,7 @@ class Address extends BaseModel implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $setters = [ - 'name' => 'setName', + 'name' => 'setName', 'address_line1' => 'setAddressLine1', 'address_line2' => 'setAddressLine2', 'address_line3' => 'setAddressLine3', diff --git a/lib/Model/ShippingV2/AmazonOrderDetails.php b/lib/Model/ShippingV2/AmazonOrderDetails.php index 26104fa32..3e9047e10 100644 --- a/lib/Model/ShippingV2/AmazonOrderDetails.php +++ b/lib/Model/ShippingV2/AmazonOrderDetails.php @@ -91,7 +91,7 @@ class AmazonOrderDetails extends BaseModel implements ModelInterface, ArrayAcces * @var string[] */ protected static $setters = [ - 'order_id' => 'setOrderId' + 'order_id' => 'setOrderId' ]; /** diff --git a/lib/Model/ShippingV2/AmazonShipmentDetails.php b/lib/Model/ShippingV2/AmazonShipmentDetails.php index d3b050cd4..d4d6c318d 100644 --- a/lib/Model/ShippingV2/AmazonShipmentDetails.php +++ b/lib/Model/ShippingV2/AmazonShipmentDetails.php @@ -91,7 +91,7 @@ class AmazonShipmentDetails extends BaseModel implements ModelInterface, ArrayAc * @var string[] */ protected static $setters = [ - 'shipment_id' => 'setShipmentId' + 'shipment_id' => 'setShipmentId' ]; /** diff --git a/lib/Model/ShippingV2/AvailableValueAddedServiceGroup.php b/lib/Model/ShippingV2/AvailableValueAddedServiceGroup.php index ccbdb3e6d..42be00d2d 100644 --- a/lib/Model/ShippingV2/AvailableValueAddedServiceGroup.php +++ b/lib/Model/ShippingV2/AvailableValueAddedServiceGroup.php @@ -100,7 +100,7 @@ class AvailableValueAddedServiceGroup extends BaseModel implements ModelInterfac * @var string[] */ protected static $setters = [ - 'group_id' => 'setGroupId', + 'group_id' => 'setGroupId', 'group_description' => 'setGroupDescription', 'is_required' => 'setIsRequired', 'value_added_services' => 'setValueAddedServices' diff --git a/lib/Model/ShippingV2/ChannelDetails.php b/lib/Model/ShippingV2/ChannelDetails.php index 5c622641a..bade7e3e6 100644 --- a/lib/Model/ShippingV2/ChannelDetails.php +++ b/lib/Model/ShippingV2/ChannelDetails.php @@ -97,7 +97,7 @@ class ChannelDetails extends BaseModel implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $setters = [ - 'channel_type' => 'setChannelType', + 'channel_type' => 'setChannelType', 'amazon_order_details' => 'setAmazonOrderDetails', 'amazon_shipment_details' => 'setAmazonShipmentDetails' ]; diff --git a/lib/Model/ShippingV2/ChargeComponent.php b/lib/Model/ShippingV2/ChargeComponent.php index 4f8d1f879..f9d83cdc9 100644 --- a/lib/Model/ShippingV2/ChargeComponent.php +++ b/lib/Model/ShippingV2/ChargeComponent.php @@ -94,7 +94,7 @@ class ChargeComponent extends BaseModel implements ModelInterface, ArrayAccess, * @var string[] */ protected static $setters = [ - 'amount' => 'setAmount', + 'amount' => 'setAmount', 'charge_type' => 'setChargeType' ]; diff --git a/lib/Model/ShippingV2/CollectOnDelivery.php b/lib/Model/ShippingV2/CollectOnDelivery.php index 475fbbd3e..d2208bc97 100644 --- a/lib/Model/ShippingV2/CollectOnDelivery.php +++ b/lib/Model/ShippingV2/CollectOnDelivery.php @@ -91,7 +91,7 @@ class CollectOnDelivery extends BaseModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $setters = [ - 'amount' => 'setAmount' + 'amount' => 'setAmount' ]; /** diff --git a/lib/Model/ShippingV2/Currency.php b/lib/Model/ShippingV2/Currency.php index 6087242c5..b6ab0c51d 100644 --- a/lib/Model/ShippingV2/Currency.php +++ b/lib/Model/ShippingV2/Currency.php @@ -94,7 +94,7 @@ class Currency extends BaseModel implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $setters = [ - 'value' => 'setValue', + 'value' => 'setValue', 'unit' => 'setUnit' ]; diff --git a/lib/Model/ShippingV2/Dimensions.php b/lib/Model/ShippingV2/Dimensions.php index d3c439620..2aff11a66 100644 --- a/lib/Model/ShippingV2/Dimensions.php +++ b/lib/Model/ShippingV2/Dimensions.php @@ -100,7 +100,7 @@ class Dimensions extends BaseModel implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $setters = [ - 'length' => 'setLength', + 'length' => 'setLength', 'width' => 'setWidth', 'height' => 'setHeight', 'unit' => 'setUnit' diff --git a/lib/Model/ShippingV2/DirectFulfillmentItemIdentifiers.php b/lib/Model/ShippingV2/DirectFulfillmentItemIdentifiers.php index 191816f35..3ddc0e70f 100644 --- a/lib/Model/ShippingV2/DirectFulfillmentItemIdentifiers.php +++ b/lib/Model/ShippingV2/DirectFulfillmentItemIdentifiers.php @@ -94,7 +94,7 @@ class DirectFulfillmentItemIdentifiers extends BaseModel implements ModelInterfa * @var string[] */ protected static $setters = [ - 'line_item_id' => 'setLineItemId', + 'line_item_id' => 'setLineItemId', 'piece_number' => 'setPieceNumber' ]; diff --git a/lib/Model/ShippingV2/DirectPurchaseRequest.php b/lib/Model/ShippingV2/DirectPurchaseRequest.php index 72f1a72ca..bd2f02863 100644 --- a/lib/Model/ShippingV2/DirectPurchaseRequest.php +++ b/lib/Model/ShippingV2/DirectPurchaseRequest.php @@ -106,7 +106,7 @@ class DirectPurchaseRequest extends BaseModel implements ModelInterface, ArrayAc * @var string[] */ protected static $setters = [ - 'ship_to' => 'setShipTo', + 'ship_to' => 'setShipTo', 'ship_from' => 'setShipFrom', 'return_to' => 'setReturnTo', 'packages' => 'setPackages', diff --git a/lib/Model/ShippingV2/DirectPurchaseResult.php b/lib/Model/ShippingV2/DirectPurchaseResult.php index 148d505ed..ff09c782f 100644 --- a/lib/Model/ShippingV2/DirectPurchaseResult.php +++ b/lib/Model/ShippingV2/DirectPurchaseResult.php @@ -94,7 +94,7 @@ class DirectPurchaseResult extends BaseModel implements ModelInterface, ArrayAcc * @var string[] */ protected static $setters = [ - 'shipment_id' => 'setShipmentId', + 'shipment_id' => 'setShipmentId', 'package_document_detail_list' => 'setPackageDocumentDetailList' ]; diff --git a/lib/Model/ShippingV2/DocumentSize.php b/lib/Model/ShippingV2/DocumentSize.php index cf002a218..846e75203 100644 --- a/lib/Model/ShippingV2/DocumentSize.php +++ b/lib/Model/ShippingV2/DocumentSize.php @@ -97,7 +97,7 @@ class DocumentSize extends BaseModel implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $setters = [ - 'width' => 'setWidth', + 'width' => 'setWidth', 'length' => 'setLength', 'unit' => 'setUnit' ]; diff --git a/lib/Model/ShippingV2/Error.php b/lib/Model/ShippingV2/Error.php index f5dd85596..a61366863 100644 --- a/lib/Model/ShippingV2/Error.php +++ b/lib/Model/ShippingV2/Error.php @@ -97,7 +97,7 @@ class Error extends BaseModel implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $setters = [ - 'code' => 'setCode', + 'code' => 'setCode', 'message' => 'setMessage', 'details' => 'setDetails' ]; diff --git a/lib/Model/ShippingV2/ErrorList.php b/lib/Model/ShippingV2/ErrorList.php new file mode 100644 index 000000000..6c6af0105 --- /dev/null +++ b/lib/Model/ShippingV2/ErrorList.php @@ -0,0 +1,188 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ErrorList extends BaseModel implements ModelInterface, ArrayAccess, \JsonSerializable, \IteratorAggregate +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ErrorList'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'errors' => '\SellingPartnerApi\Model\ShippingV2\Error[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'errors' => null + ]; + + + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'headers' => 'headers', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'headers' => 'setHeaders', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'headers' => 'getHeaders', + 'errors' => 'getErrors' + ]; + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['errors'] = $data['errors'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + return $invalidProperties; + } + + /** + * Gets API response headers + * + * @return array[string] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets API response headers (only relevant to response models) + * + * @param array[string => string] $headers Associative array of response headers. + * + * @return self + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + return $this; + } + + /** + * Gets errors + * + * @return \SellingPartnerApi\Model\ShippingV2\Error[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \SellingPartnerApi\Model\ShippingV2\Error[]|null $errors A list of error responses returned when a request is unsuccessful. + * + * @return self + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } +} + + diff --git a/lib/Model/ShippingV2/Event.php b/lib/Model/ShippingV2/Event.php index ca57b8644..4376ab562 100644 --- a/lib/Model/ShippingV2/Event.php +++ b/lib/Model/ShippingV2/Event.php @@ -97,7 +97,7 @@ class Event extends BaseModel implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $setters = [ - 'event_code' => 'setEventCode', + 'event_code' => 'setEventCode', 'location' => 'setLocation', 'event_time' => 'setEventTime' ]; diff --git a/lib/Model/ShippingV2/GetRatesRequest.php b/lib/Model/ShippingV2/GetRatesRequest.php index 334ef93da..0de0f4e1f 100644 --- a/lib/Model/ShippingV2/GetRatesRequest.php +++ b/lib/Model/ShippingV2/GetRatesRequest.php @@ -112,7 +112,7 @@ class GetRatesRequest extends BaseModel implements ModelInterface, ArrayAccess, * @var string[] */ protected static $setters = [ - 'ship_to' => 'setShipTo', + 'ship_to' => 'setShipTo', 'ship_from' => 'setShipFrom', 'return_to' => 'setReturnTo', 'ship_date' => 'setShipDate', diff --git a/lib/Model/ShippingV2/GetRatesResult.php b/lib/Model/ShippingV2/GetRatesResult.php index c0a47843f..89d8e0f4b 100644 --- a/lib/Model/ShippingV2/GetRatesResult.php +++ b/lib/Model/ShippingV2/GetRatesResult.php @@ -97,7 +97,7 @@ class GetRatesResult extends BaseModel implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $setters = [ - 'request_token' => 'setRequestToken', + 'request_token' => 'setRequestToken', 'rates' => 'setRates', 'ineligible_rates' => 'setIneligibleRates' ]; diff --git a/lib/Model/ShippingV2/GetShipmentDocumentsResult.php b/lib/Model/ShippingV2/GetShipmentDocumentsResult.php index 6ccf74c0b..659d2f3ad 100644 --- a/lib/Model/ShippingV2/GetShipmentDocumentsResult.php +++ b/lib/Model/ShippingV2/GetShipmentDocumentsResult.php @@ -94,7 +94,7 @@ class GetShipmentDocumentsResult extends BaseModel implements ModelInterface, Ar * @var string[] */ protected static $setters = [ - 'shipment_id' => 'setShipmentId', + 'shipment_id' => 'setShipmentId', 'package_document_detail' => 'setPackageDocumentDetail' ]; diff --git a/lib/Model/ShippingV2/GetTrackingResult.php b/lib/Model/ShippingV2/GetTrackingResult.php index 01ba2fc39..7b1712742 100644 --- a/lib/Model/ShippingV2/GetTrackingResult.php +++ b/lib/Model/ShippingV2/GetTrackingResult.php @@ -103,7 +103,7 @@ class GetTrackingResult extends BaseModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $setters = [ - 'tracking_id' => 'setTrackingId', + 'tracking_id' => 'setTrackingId', 'alternate_leg_tracking_id' => 'setAlternateLegTrackingId', 'event_history' => 'setEventHistory', 'promised_delivery_date' => 'setPromisedDeliveryDate', diff --git a/lib/Model/ShippingV2/IneligibilityReason.php b/lib/Model/ShippingV2/IneligibilityReason.php index c556b15e8..33c9e6894 100644 --- a/lib/Model/ShippingV2/IneligibilityReason.php +++ b/lib/Model/ShippingV2/IneligibilityReason.php @@ -94,7 +94,7 @@ class IneligibilityReason extends BaseModel implements ModelInterface, ArrayAcce * @var string[] */ protected static $setters = [ - 'code' => 'setCode', + 'code' => 'setCode', 'message' => 'setMessage' ]; diff --git a/lib/Model/ShippingV2/IneligibleRate.php b/lib/Model/ShippingV2/IneligibleRate.php index ce934771e..44a75378f 100644 --- a/lib/Model/ShippingV2/IneligibleRate.php +++ b/lib/Model/ShippingV2/IneligibleRate.php @@ -103,7 +103,7 @@ class IneligibleRate extends BaseModel implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $setters = [ - 'service_id' => 'setServiceId', + 'service_id' => 'setServiceId', 'service_name' => 'setServiceName', 'carrier_name' => 'setCarrierName', 'carrier_id' => 'setCarrierId', diff --git a/lib/Model/ShippingV2/InvoiceDetails.php b/lib/Model/ShippingV2/InvoiceDetails.php index d7373a46f..8ff71e67a 100644 --- a/lib/Model/ShippingV2/InvoiceDetails.php +++ b/lib/Model/ShippingV2/InvoiceDetails.php @@ -94,7 +94,7 @@ class InvoiceDetails extends BaseModel implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $setters = [ - 'invoice_number' => 'setInvoiceNumber', + 'invoice_number' => 'setInvoiceNumber', 'invoice_date' => 'setInvoiceDate' ]; diff --git a/lib/Model/ShippingV2/Item.php b/lib/Model/ShippingV2/Item.php index 204ca3c18..af1fde73b 100644 --- a/lib/Model/ShippingV2/Item.php +++ b/lib/Model/ShippingV2/Item.php @@ -118,7 +118,7 @@ class Item extends BaseModel implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $setters = [ - 'item_value' => 'setItemValue', + 'item_value' => 'setItemValue', 'description' => 'setDescription', 'item_identifier' => 'setItemIdentifier', 'quantity' => 'setQuantity', diff --git a/lib/Model/ShippingV2/Location.php b/lib/Model/ShippingV2/Location.php index 4c59bf18d..1ceeb4de2 100644 --- a/lib/Model/ShippingV2/Location.php +++ b/lib/Model/ShippingV2/Location.php @@ -100,7 +100,7 @@ class Location extends BaseModel implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $setters = [ - 'state_or_region' => 'setStateOrRegion', + 'state_or_region' => 'setStateOrRegion', 'city' => 'setCity', 'country_code' => 'setCountryCode', 'postal_code' => 'setPostalCode' diff --git a/lib/Model/ShippingV2/Package.php b/lib/Model/ShippingV2/Package.php index c1cfd9f58..3b5d1ac10 100644 --- a/lib/Model/ShippingV2/Package.php +++ b/lib/Model/ShippingV2/Package.php @@ -112,7 +112,7 @@ class Package extends BaseModel implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $setters = [ - 'dimensions' => 'setDimensions', + 'dimensions' => 'setDimensions', 'weight' => 'setWeight', 'insured_value' => 'setInsuredValue', 'is_hazmat' => 'setIsHazmat', diff --git a/lib/Model/ShippingV2/PackageDocument.php b/lib/Model/ShippingV2/PackageDocument.php index f4792fc6a..5442e4879 100644 --- a/lib/Model/ShippingV2/PackageDocument.php +++ b/lib/Model/ShippingV2/PackageDocument.php @@ -97,7 +97,7 @@ class PackageDocument extends BaseModel implements ModelInterface, ArrayAccess, * @var string[] */ protected static $setters = [ - 'type' => 'setType', + 'type' => 'setType', 'format' => 'setFormat', 'contents' => 'setContents' ]; diff --git a/lib/Model/ShippingV2/PackageDocumentDetail.php b/lib/Model/ShippingV2/PackageDocumentDetail.php index 4fa399c77..0eece85a8 100644 --- a/lib/Model/ShippingV2/PackageDocumentDetail.php +++ b/lib/Model/ShippingV2/PackageDocumentDetail.php @@ -97,7 +97,7 @@ class PackageDocumentDetail extends BaseModel implements ModelInterface, ArrayAc * @var string[] */ protected static $setters = [ - 'package_client_reference_id' => 'setPackageClientReferenceId', + 'package_client_reference_id' => 'setPackageClientReferenceId', 'package_documents' => 'setPackageDocuments', 'tracking_id' => 'setTrackingId' ]; diff --git a/lib/Model/ShippingV2/PrintOption.php b/lib/Model/ShippingV2/PrintOption.php index 6e1878962..feec4044d 100644 --- a/lib/Model/ShippingV2/PrintOption.php +++ b/lib/Model/ShippingV2/PrintOption.php @@ -100,7 +100,7 @@ class PrintOption extends BaseModel implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $setters = [ - 'supported_dpis' => 'setSupportedDpis', + 'supported_dpis' => 'setSupportedDpis', 'supported_page_layouts' => 'setSupportedPageLayouts', 'supported_file_joining_options' => 'setSupportedFileJoiningOptions', 'supported_document_details' => 'setSupportedDocumentDetails' diff --git a/lib/Model/ShippingV2/Promise.php b/lib/Model/ShippingV2/Promise.php index f4580499d..39f2ad1b7 100644 --- a/lib/Model/ShippingV2/Promise.php +++ b/lib/Model/ShippingV2/Promise.php @@ -94,7 +94,7 @@ class Promise extends BaseModel implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $setters = [ - 'delivery_window' => 'setDeliveryWindow', + 'delivery_window' => 'setDeliveryWindow', 'pickup_window' => 'setPickupWindow' ]; diff --git a/lib/Model/ShippingV2/PurchaseShipmentRequest.php b/lib/Model/ShippingV2/PurchaseShipmentRequest.php index f08a65b6e..f2a737151 100644 --- a/lib/Model/ShippingV2/PurchaseShipmentRequest.php +++ b/lib/Model/ShippingV2/PurchaseShipmentRequest.php @@ -103,7 +103,7 @@ class PurchaseShipmentRequest extends BaseModel implements ModelInterface, Array * @var string[] */ protected static $setters = [ - 'request_token' => 'setRequestToken', + 'request_token' => 'setRequestToken', 'rate_id' => 'setRateId', 'requested_document_specification' => 'setRequestedDocumentSpecification', 'requested_value_added_services' => 'setRequestedValueAddedServices', diff --git a/lib/Model/ShippingV2/PurchaseShipmentResult.php b/lib/Model/ShippingV2/PurchaseShipmentResult.php index bd00cec13..24b88c52f 100644 --- a/lib/Model/ShippingV2/PurchaseShipmentResult.php +++ b/lib/Model/ShippingV2/PurchaseShipmentResult.php @@ -97,7 +97,7 @@ class PurchaseShipmentResult extends BaseModel implements ModelInterface, ArrayA * @var string[] */ protected static $setters = [ - 'shipment_id' => 'setShipmentId', + 'shipment_id' => 'setShipmentId', 'package_document_details' => 'setPackageDocumentDetails', 'promise' => 'setPromise' ]; diff --git a/lib/Model/ShippingV2/Rate.php b/lib/Model/ShippingV2/Rate.php index 9bb2eaa79..2251c1da4 100644 --- a/lib/Model/ShippingV2/Rate.php +++ b/lib/Model/ShippingV2/Rate.php @@ -121,7 +121,7 @@ class Rate extends BaseModel implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $setters = [ - 'rate_id' => 'setRateId', + 'rate_id' => 'setRateId', 'carrier_id' => 'setCarrierId', 'carrier_name' => 'setCarrierName', 'service_id' => 'setServiceId', diff --git a/lib/Model/ShippingV2/RequestedDocumentSpecification.php b/lib/Model/ShippingV2/RequestedDocumentSpecification.php index a835bec4b..c5cbb2347 100644 --- a/lib/Model/ShippingV2/RequestedDocumentSpecification.php +++ b/lib/Model/ShippingV2/RequestedDocumentSpecification.php @@ -106,7 +106,7 @@ class RequestedDocumentSpecification extends BaseModel implements ModelInterface * @var string[] */ protected static $setters = [ - 'format' => 'setFormat', + 'format' => 'setFormat', 'size' => 'setSize', 'dpi' => 'setDpi', 'page_layout' => 'setPageLayout', diff --git a/lib/Model/ShippingV2/RequestedValueAddedService.php b/lib/Model/ShippingV2/RequestedValueAddedService.php index 40562f11f..229c2bc44 100644 --- a/lib/Model/ShippingV2/RequestedValueAddedService.php +++ b/lib/Model/ShippingV2/RequestedValueAddedService.php @@ -91,7 +91,7 @@ class RequestedValueAddedService extends BaseModel implements ModelInterface, Ar * @var string[] */ protected static $setters = [ - 'id' => 'setId' + 'id' => 'setId' ]; /** diff --git a/lib/Model/ShippingV2/SupportedDocumentDetail.php b/lib/Model/ShippingV2/SupportedDocumentDetail.php index 841b75a48..a5855c44a 100644 --- a/lib/Model/ShippingV2/SupportedDocumentDetail.php +++ b/lib/Model/ShippingV2/SupportedDocumentDetail.php @@ -94,7 +94,7 @@ class SupportedDocumentDetail extends BaseModel implements ModelInterface, Array * @var string[] */ protected static $setters = [ - 'name' => 'setName', + 'name' => 'setName', 'is_mandatory' => 'setIsMandatory' ]; diff --git a/lib/Model/ShippingV2/SupportedDocumentSpecification.php b/lib/Model/ShippingV2/SupportedDocumentSpecification.php index 3bbddb7fd..0a6f0e312 100644 --- a/lib/Model/ShippingV2/SupportedDocumentSpecification.php +++ b/lib/Model/ShippingV2/SupportedDocumentSpecification.php @@ -97,7 +97,7 @@ class SupportedDocumentSpecification extends BaseModel implements ModelInterface * @var string[] */ protected static $setters = [ - 'format' => 'setFormat', + 'format' => 'setFormat', 'size' => 'setSize', 'print_options' => 'setPrintOptions' ]; diff --git a/lib/Model/ShippingV2/TaxDetail.php b/lib/Model/ShippingV2/TaxDetail.php index d372ec8f2..c15d0a74c 100644 --- a/lib/Model/ShippingV2/TaxDetail.php +++ b/lib/Model/ShippingV2/TaxDetail.php @@ -94,7 +94,7 @@ class TaxDetail extends BaseModel implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $setters = [ - 'tax_type' => 'setTaxType', + 'tax_type' => 'setTaxType', 'tax_registration_number' => 'setTaxRegistrationNumber' ]; diff --git a/lib/Model/ShippingV2/TimeWindow.php b/lib/Model/ShippingV2/TimeWindow.php index 1982ee1cf..140ada913 100644 --- a/lib/Model/ShippingV2/TimeWindow.php +++ b/lib/Model/ShippingV2/TimeWindow.php @@ -94,7 +94,7 @@ class TimeWindow extends BaseModel implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $setters = [ - 'start_time' => 'setStartTime', + 'start_time' => 'setStartTime', 'end_time' => 'setEndTime' ]; diff --git a/lib/Model/ShippingV2/TrackingSummary.php b/lib/Model/ShippingV2/TrackingSummary.php index b83d31538..73ab359c1 100644 --- a/lib/Model/ShippingV2/TrackingSummary.php +++ b/lib/Model/ShippingV2/TrackingSummary.php @@ -91,7 +91,7 @@ class TrackingSummary extends BaseModel implements ModelInterface, ArrayAccess, * @var string[] */ protected static $setters = [ - 'status' => 'setStatus' + 'status' => 'setStatus' ]; /** diff --git a/lib/Model/ShippingV2/ValueAddedService.php b/lib/Model/ShippingV2/ValueAddedService.php index 7891781a3..1c893ae06 100644 --- a/lib/Model/ShippingV2/ValueAddedService.php +++ b/lib/Model/ShippingV2/ValueAddedService.php @@ -97,7 +97,7 @@ class ValueAddedService extends BaseModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $setters = [ - 'id' => 'setId', + 'id' => 'setId', 'name' => 'setName', 'cost' => 'setCost' ]; diff --git a/lib/Model/ShippingV2/ValueAddedServiceDetails.php b/lib/Model/ShippingV2/ValueAddedServiceDetails.php index 3a8787bdd..4f0669045 100644 --- a/lib/Model/ShippingV2/ValueAddedServiceDetails.php +++ b/lib/Model/ShippingV2/ValueAddedServiceDetails.php @@ -91,7 +91,7 @@ class ValueAddedServiceDetails extends BaseModel implements ModelInterface, Arra * @var string[] */ protected static $setters = [ - 'collect_on_delivery' => 'setCollectOnDelivery' + 'collect_on_delivery' => 'setCollectOnDelivery' ]; /** diff --git a/lib/Model/ShippingV2/Weight.php b/lib/Model/ShippingV2/Weight.php index 1171392e5..9dc7ae463 100644 --- a/lib/Model/ShippingV2/Weight.php +++ b/lib/Model/ShippingV2/Weight.php @@ -94,7 +94,7 @@ class Weight extends BaseModel implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $setters = [ - 'unit' => 'setUnit', + 'unit' => 'setUnit', 'value' => 'setValue' ]; diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index c7f80cd62..b5311d843 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -263,8 +263,8 @@ public static function deserialize($data, $class, $httpHeaders = null) } if (strcasecmp(substr($class, -2), '[]') === 0) { - $data = is_string($data) ? json_decode($data, true) : $data; - + $data = is_string($data) ? json_decode($data) : $data; + if (!is_array($data)) { throw new \InvalidArgumentException("Invalid array '$class'"); }