From 45b42050388c7263d93e0758283e8b433b909c15 Mon Sep 17 00:00:00 2001 From: Mikael Gustafsson Date: Sat, 10 Jul 2021 13:05:33 +0200 Subject: [PATCH] Update from swagger --- lib/Api/DefaultApi.php | 608 +++++++++++++----- lib/ApiException.php | 8 +- lib/Configuration.php | 10 +- lib/HeaderSelector.php | 8 +- lib/Model/AdditionalInfo.php | 14 +- lib/Model/Address.php | 14 +- lib/Model/Any.php | 321 ++++++++++ lib/Model/BillingItem.php | 322 ++++++++++ lib/Model/CarrierAddon.php | 351 +++++++++++ lib/Model/Cart.php | 102 +-- lib/Model/CartItem.php | 25 +- lib/Model/CompleteSessionRequest.php | 13 +- lib/Model/CompleteSessionResponse.php | 13 +- lib/Model/Coordinates.php | 11 +- lib/Model/Cost.php | 291 +++++++++ lib/Model/CreateSessionRequest.php | 113 +++- lib/Model/CreateSessionResponse.php | 11 +- lib/Model/CustomerInfo.php | 56 +- lib/Model/DateTimeRange.php | 16 +- lib/Model/Dimensions.php | 352 +++++++++++ lib/Model/Distance.php | 12 +- lib/Model/DistanceSpec.php | 12 +- lib/Model/Error.php | 381 ++++++++++++ lib/Model/GetSessionResponse.php | 11 +- lib/Model/LegLocation.php | 352 +++++++++++ lib/Model/LegLocationType.php | 267 ++++++++ lib/Model/ListSessionsSummariesResponse.php | 292 +++++++++ lib/Model/ModelInterface.php | 8 +- lib/Model/OperationalHours.php | 11 +- lib/Model/PickupLocation.php | 58 +- lib/Model/PickupLocationType.php | 64 ++ lib/Model/PriceComponent.php | 412 +++++++++++++ lib/Model/PriceComponentType.php | 59 ++ lib/Model/Result.php | 412 +++++++++++++ lib/Model/ResultCategory.php | 382 ++++++++++++ lib/Model/ResultDeliveryAddon.php | 322 ++++++++++ lib/Model/ResultDeliveryTime.php | 351 +++++++++++ lib/Model/ResultDeliveryTimeRange.php | 321 ++++++++++ lib/Model/ResultPricing.php | 352 +++++++++++ lib/Model/ResultSelection.php | 68 ++ lib/Model/ResultShipping.php | 652 ++++++++++++++++++++ lib/Model/ResultWarehouse.php | 291 +++++++++ lib/Model/Route.php | 322 ++++++++++ lib/Model/Section.php | 321 ++++++++++ lib/Model/SectionColumnItem.php | 291 +++++++++ lib/Model/SectionItem.php | 351 +++++++++++ lib/Model/SelectedShippingOption.php | 59 +- lib/Model/Session.php | 119 +++- lib/Model/SessionSummary.php | 322 ++++++++++ lib/Model/ShippingCost.php | 322 ++++++++++ lib/Model/ShippingDate.php | 351 +++++++++++ lib/Model/ShippingDateTag.php | 321 ++++++++++ lib/Model/ShippingLeg.php | 382 ++++++++++++ lib/Model/SnippetConfiguration.php | 351 +++++++++++ lib/Model/Supports.php | 382 ++++++++++++ lib/Model/Tag.php | 291 +++++++++ lib/Model/TimeSlot.php | 11 +- lib/Model/UpdateSessionRequest.php | 201 +++++- lib/Model/UpdateSessionResponse.php | 51 +- lib/ObjectSerializer.php | 34 +- 60 files changed, 11826 insertions(+), 405 deletions(-) create mode 100644 lib/Model/Any.php create mode 100644 lib/Model/BillingItem.php create mode 100644 lib/Model/CarrierAddon.php create mode 100644 lib/Model/Cost.php create mode 100644 lib/Model/Dimensions.php create mode 100644 lib/Model/Error.php create mode 100644 lib/Model/LegLocation.php create mode 100644 lib/Model/LegLocationType.php create mode 100644 lib/Model/ListSessionsSummariesResponse.php create mode 100644 lib/Model/PickupLocationType.php create mode 100644 lib/Model/PriceComponent.php create mode 100644 lib/Model/PriceComponentType.php create mode 100644 lib/Model/Result.php create mode 100644 lib/Model/ResultCategory.php create mode 100644 lib/Model/ResultDeliveryAddon.php create mode 100644 lib/Model/ResultDeliveryTime.php create mode 100644 lib/Model/ResultDeliveryTimeRange.php create mode 100644 lib/Model/ResultPricing.php create mode 100644 lib/Model/ResultSelection.php create mode 100644 lib/Model/ResultShipping.php create mode 100644 lib/Model/ResultWarehouse.php create mode 100644 lib/Model/Route.php create mode 100644 lib/Model/Section.php create mode 100644 lib/Model/SectionColumnItem.php create mode 100644 lib/Model/SectionItem.php create mode 100644 lib/Model/SessionSummary.php create mode 100644 lib/Model/ShippingCost.php create mode 100644 lib/Model/ShippingDate.php create mode 100644 lib/Model/ShippingDateTag.php create mode 100644 lib/Model/ShippingLeg.php create mode 100644 lib/Model/SnippetConfiguration.php create mode 100644 lib/Model/Supports.php create mode 100644 lib/Model/Tag.php diff --git a/lib/Api/DefaultApi.php b/lib/Api/DefaultApi.php index 9e3cad4..b2518b9 100755 --- a/lib/Api/DefaultApi.php +++ b/lib/Api/DefaultApi.php @@ -5,14 +5,24 @@ * * @category Class * @package Swagger\Client + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * Swagger Codegen version: 3.0.24 + */ +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. */ namespace Swagger\Client\Api; @@ -33,6 +43,8 @@ * * @category Class * @package Swagger\Client + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ class DefaultApi { @@ -73,8 +85,9 @@ public function getConfig() { return $this->config; } + /** - * Operation completeSession + * Operation siwCompleteSession * * When the customer completes the purchase you also need to complete the session. At this point you will have to supply us with the address and the contact details of the user. * @@ -84,14 +97,14 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Swagger\Client\Model\CompleteSessionResponse */ - public function completeSession($body) + public function siwCompleteSession($body) { - list($response) = $this->completeSessionWithHttpInfo($body); + list($response) = $this->siwCompleteSessionWithHttpInfo($body); return $response; } /** - * Operation completeSessionWithHttpInfo + * Operation siwCompleteSessionWithHttpInfo * * When the customer completes the purchase you also need to complete the session. At this point you will have to supply us with the address and the contact details of the user. * @@ -99,36 +112,38 @@ public function completeSession($body) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @throws RequestException on connection errors * @return array of \Swagger\Client\Model\CompleteSessionResponse, HTTP status code, HTTP response headers (array of strings) */ - public function completeSessionWithHttpInfo($body) + public function siwCompleteSessionWithHttpInfo($body) { $returnType = '\Swagger\Client\Model\CompleteSessionResponse'; - $request = $this->completeSessionRequest($body); + $request = $this->siwCompleteSessionRequest($body); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - throw $e; + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $request->getUri(), - $message + $request->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } @@ -148,31 +163,31 @@ public function completeSessionWithHttpInfo($body) $response->getHeaders() ]; - } catch (ApiException $e) { - $returnType = ''; - $content = $e->getResponseBody(); - if ($returnType !== '\SplFileObject') { - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( - $content, + $e->getResponseBody(), '\Swagger\Client\Model\CompleteSessionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); break; -} + case 0: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } throw $e; } } /** - * Operation completeSessionAsync + * Operation siwCompleteSessionAsync * * When the customer completes the purchase you also need to complete the session. At this point you will have to supply us with the address and the contact details of the user. * @@ -181,9 +196,9 @@ public function completeSessionWithHttpInfo($body) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function completeSessionAsync($body) + public function siwCompleteSessionAsync($body) { - return $this->completeSessionAsyncWithHttpInfo($body) + return $this->siwCompleteSessionAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -192,7 +207,7 @@ function ($response) { } /** - * Operation completeSessionAsyncWithHttpInfo + * Operation siwCompleteSessionAsyncWithHttpInfo * * When the customer completes the purchase you also need to complete the session. At this point you will have to supply us with the address and the contact details of the user. * @@ -201,10 +216,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function completeSessionAsyncWithHttpInfo($body) + public function siwCompleteSessionAsyncWithHttpInfo($body) { $returnType = '\Swagger\Client\Model\CompleteSessionResponse'; - $request = $this->completeSessionRequest($body); + $request = $this->siwCompleteSessionRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -229,38 +244,37 @@ function ($response) use ($returnType) { function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $exception->getRequest()->getUri(), - $message + $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } ); } /** - * Create request for operation 'completeSession' + * Create request for operation 'siwCompleteSession' * * @param \Swagger\Client\Model\CompleteSessionRequest $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function completeSessionRequest($body) + protected function siwCompleteSessionRequest($body) { // verify the required parameter 'body' is set - if ($body === null) { + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling completeSession' + 'Missing the required parameter $body when calling siwCompleteSession' ); } + $resourcePath = '/session.complete'; $formParams = []; $queryParams = []; @@ -268,11 +282,14 @@ protected function completeSessionRequest($body) $httpBody = ''; $multipart = false; + + // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] @@ -312,11 +329,13 @@ protected function completeSessionRequest($body) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); } } + // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { $headers['Authorization'] = $apiKey; } + $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -338,7 +357,7 @@ protected function completeSessionRequest($body) } /** - * Operation createSession + * Operation siwCreateSession * * To add the Ingrid widget to the checkout page you will need to create a new session. This can be done by this call. When doing this you will need to provide some required information. * @@ -348,14 +367,14 @@ protected function completeSessionRequest($body) * @throws \InvalidArgumentException * @return \Swagger\Client\Model\CreateSessionResponse */ - public function createSession($body) + public function siwCreateSession($body) { - list($response) = $this->createSessionWithHttpInfo($body); + list($response) = $this->siwCreateSessionWithHttpInfo($body); return $response; } /** - * Operation createSessionWithHttpInfo + * Operation siwCreateSessionWithHttpInfo * * To add the Ingrid widget to the checkout page you will need to create a new session. This can be done by this call. When doing this you will need to provide some required information. * @@ -363,36 +382,38 @@ public function createSession($body) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @throws RequestException on connection errors * @return array of \Swagger\Client\Model\CreateSessionResponse, HTTP status code, HTTP response headers (array of strings) */ - public function createSessionWithHttpInfo($body) + public function siwCreateSessionWithHttpInfo($body) { $returnType = '\Swagger\Client\Model\CreateSessionResponse'; - $request = $this->createSessionRequest($body); + $request = $this->siwCreateSessionRequest($body); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - throw $e; + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $request->getUri(), - $message + $request->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } @@ -412,31 +433,31 @@ public function createSessionWithHttpInfo($body) $response->getHeaders() ]; - } catch (ApiException $e) { - $returnType = ''; - $content = $e->getResponseBody(); - if ($returnType !== '\SplFileObject') { - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( - $content, + $e->getResponseBody(), '\Swagger\Client\Model\CreateSessionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); break; + case 0: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation createSessionAsync + * Operation siwCreateSessionAsync * * To add the Ingrid widget to the checkout page you will need to create a new session. This can be done by this call. When doing this you will need to provide some required information. * @@ -445,9 +466,9 @@ public function createSessionWithHttpInfo($body) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsync($body) + public function siwCreateSessionAsync($body) { - return $this->createSessionAsyncWithHttpInfo($body) + return $this->siwCreateSessionAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -456,7 +477,7 @@ function ($response) { } /** - * Operation createSessionAsyncWithHttpInfo + * Operation siwCreateSessionAsyncWithHttpInfo * * To add the Ingrid widget to the checkout page you will need to create a new session. This can be done by this call. When doing this you will need to provide some required information. * @@ -465,10 +486,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsyncWithHttpInfo($body) + public function siwCreateSessionAsyncWithHttpInfo($body) { $returnType = '\Swagger\Client\Model\CreateSessionResponse'; - $request = $this->createSessionRequest($body); + $request = $this->siwCreateSessionRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -493,38 +514,37 @@ function ($response) use ($returnType) { function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $exception->getRequest()->getUri(), - $message + $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } ); } /** - * Create request for operation 'createSession' + * Create request for operation 'siwCreateSession' * * @param \Swagger\Client\Model\CreateSessionRequest $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createSessionRequest($body) + protected function siwCreateSessionRequest($body) { // verify the required parameter 'body' is set - if ($body === null) { + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createSession' + 'Missing the required parameter $body when calling siwCreateSession' ); } + $resourcePath = '/session.create'; $formParams = []; $queryParams = []; @@ -532,11 +552,14 @@ protected function createSessionRequest($body) $httpBody = ''; $multipart = false; + + // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] @@ -576,11 +599,13 @@ protected function createSessionRequest($body) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); } } + // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { $headers['Authorization'] = $apiKey; } + $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -602,7 +627,7 @@ protected function createSessionRequest($body) } /** - * Operation getSession + * Operation siwGetSession * * Fetches a session by ID. Can be used for loading a previously created session that have been stored together with a customer's shopping cart from a previous visit. * @@ -612,14 +637,14 @@ protected function createSessionRequest($body) * @throws \InvalidArgumentException * @return \Swagger\Client\Model\GetSessionResponse */ - public function getSession($id = null) + public function siwGetSession($id = null) { - list($response) = $this->getSessionWithHttpInfo($id); + list($response) = $this->siwGetSessionWithHttpInfo($id); return $response; } /** - * Operation getSessionWithHttpInfo + * Operation siwGetSessionWithHttpInfo * * Fetches a session by ID. Can be used for loading a previously created session that have been stored together with a customer's shopping cart from a previous visit. * @@ -627,36 +652,38 @@ public function getSession($id = null) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @throws RequestException on connection errors * @return array of \Swagger\Client\Model\GetSessionResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getSessionWithHttpInfo($id = null) + public function siwGetSessionWithHttpInfo($id = null) { $returnType = '\Swagger\Client\Model\GetSessionResponse'; - $request = $this->getSessionRequest($id); + $request = $this->siwGetSessionRequest($id); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - throw $e; + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $request->getUri(), - $message + $request->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } @@ -676,31 +703,31 @@ public function getSessionWithHttpInfo($id = null) $response->getHeaders() ]; - } catch (ApiException $e) { - $returnType = ''; - $content = $e->getResponseBody(); - if ($returnType !== '\SplFileObject') { - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( - $content, + $e->getResponseBody(), '\Swagger\Client\Model\GetSessionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); break; + case 0: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation getSessionAsync + * Operation siwGetSessionAsync * * Fetches a session by ID. Can be used for loading a previously created session that have been stored together with a customer's shopping cart from a previous visit. * @@ -709,9 +736,9 @@ public function getSessionWithHttpInfo($id = null) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSessionAsync($id = null) + public function siwGetSessionAsync($id = null) { - return $this->getSessionAsyncWithHttpInfo($id) + return $this->siwGetSessionAsyncWithHttpInfo($id) ->then( function ($response) { return $response[0]; @@ -720,7 +747,7 @@ function ($response) { } /** - * Operation getSessionAsyncWithHttpInfo + * Operation siwGetSessionAsyncWithHttpInfo * * Fetches a session by ID. Can be used for loading a previously created session that have been stored together with a customer's shopping cart from a previous visit. * @@ -729,10 +756,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSessionAsyncWithHttpInfo($id = null) + public function siwGetSessionAsyncWithHttpInfo($id = null) { $returnType = '\Swagger\Client\Model\GetSessionResponse'; - $request = $this->getSessionRequest($id); + $request = $this->siwGetSessionRequest($id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -757,32 +784,31 @@ function ($response) use ($returnType) { function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $exception->getRequest()->getUri(), - $message + $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } ); } /** - * Create request for operation 'getSession' + * Create request for operation 'siwGetSession' * * @param string $id Session ID [required]. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getSessionRequest($id = null) + protected function siwGetSessionRequest($id = null) { + $resourcePath = '/session.get'; $formParams = []; $queryParams = []; @@ -792,10 +818,13 @@ protected function getSessionRequest($id = null) // query params if ($id !== null) { - $queryParams['id'] = ObjectSerializer::toQueryValue($id); + $queryParams['id'] = ObjectSerializer::toQueryValue($id, null); } + + // body params $_tempBody = null; + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] @@ -835,11 +864,13 @@ protected function getSessionRequest($id = null) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); } } + // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { $headers['Authorization'] = $apiKey; } + $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -861,7 +892,272 @@ protected function getSessionRequest($id = null) } /** - * Operation updateSession + * Operation siwListSessionsSummaries + * + * Allows the user to get shipping data (session IDs and result fields) associated with tos ID. + * + * @param string $tos_id tos_id (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ListSessionsSummariesResponse + */ + public function siwListSessionsSummaries($tos_id = null) + { + list($response) = $this->siwListSessionsSummariesWithHttpInfo($tos_id); + return $response; + } + + /** + * Operation siwListSessionsSummariesWithHttpInfo + * + * Allows the user to get shipping data (session IDs and result fields) associated with tos ID. + * + * @param string $tos_id (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ListSessionsSummariesResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function siwListSessionsSummariesWithHttpInfo($tos_id = null) + { + $returnType = '\Swagger\Client\Model\ListSessionsSummariesResponse'; + $request = $this->siwListSessionsSummariesRequest($tos_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ListSessionsSummariesResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 0: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation siwListSessionsSummariesAsync + * + * Allows the user to get shipping data (session IDs and result fields) associated with tos ID. + * + * @param string $tos_id (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function siwListSessionsSummariesAsync($tos_id = null) + { + return $this->siwListSessionsSummariesAsyncWithHttpInfo($tos_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation siwListSessionsSummariesAsyncWithHttpInfo + * + * Allows the user to get shipping data (session IDs and result fields) associated with tos ID. + * + * @param string $tos_id (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function siwListSessionsSummariesAsyncWithHttpInfo($tos_id = null) + { + $returnType = '\Swagger\Client\Model\ListSessionsSummariesResponse'; + $request = $this->siwListSessionsSummariesRequest($tos_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'siwListSessionsSummaries' + * + * @param string $tos_id (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function siwListSessionsSummariesRequest($tos_id = null) + { + + $resourcePath = '/sessions_summaries.list'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($tos_id !== null) { + $queryParams['tos_id'] = ObjectSerializer::toQueryValue($tos_id, null); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation siwUpdateSession * * Update the session with new information. Useful for cases where the customer or cart information is changed. The later being the most common case. * @@ -871,14 +1167,14 @@ protected function getSessionRequest($id = null) * @throws \InvalidArgumentException * @return \Swagger\Client\Model\UpdateSessionResponse */ - public function updateSession($body) + public function siwUpdateSession($body) { - list($response) = $this->updateSessionWithHttpInfo($body); + list($response) = $this->siwUpdateSessionWithHttpInfo($body); return $response; } /** - * Operation updateSessionWithHttpInfo + * Operation siwUpdateSessionWithHttpInfo * * Update the session with new information. Useful for cases where the customer or cart information is changed. The later being the most common case. * @@ -886,36 +1182,38 @@ public function updateSession($body) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @throws RequestException on connection errors * @return array of \Swagger\Client\Model\UpdateSessionResponse, HTTP status code, HTTP response headers (array of strings) */ - public function updateSessionWithHttpInfo($body) + public function siwUpdateSessionWithHttpInfo($body) { $returnType = '\Swagger\Client\Model\UpdateSessionResponse'; - $request = $this->updateSessionRequest($body); + $request = $this->siwUpdateSessionRequest($body); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { - throw $e; + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $request->getUri(), - $message + $request->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } @@ -935,31 +1233,31 @@ public function updateSessionWithHttpInfo($body) $response->getHeaders() ]; - } catch (ApiException $e) { - $returnType = ''; - $content = $e->getResponseBody(); - if ($returnType !== '\SplFileObject') { - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( - $content, + $e->getResponseBody(), '\Swagger\Client\Model\UpdateSessionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); break; + case 0: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation updateSessionAsync + * Operation siwUpdateSessionAsync * * Update the session with new information. Useful for cases where the customer or cart information is changed. The later being the most common case. * @@ -968,9 +1266,9 @@ public function updateSessionWithHttpInfo($body) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSessionAsync($body) + public function siwUpdateSessionAsync($body) { - return $this->updateSessionAsyncWithHttpInfo($body) + return $this->siwUpdateSessionAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -979,7 +1277,7 @@ function ($response) { } /** - * Operation updateSessionAsyncWithHttpInfo + * Operation siwUpdateSessionAsyncWithHttpInfo * * Update the session with new information. Useful for cases where the customer or cart information is changed. The later being the most common case. * @@ -988,10 +1286,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateSessionAsyncWithHttpInfo($body) + public function siwUpdateSessionAsyncWithHttpInfo($body) { $returnType = '\Swagger\Client\Model\UpdateSessionResponse'; - $request = $this->updateSessionRequest($body); + $request = $this->siwUpdateSessionRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1016,38 +1314,37 @@ function ($response) use ($returnType) { function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); - $message = $response->getBody()->getContents(); throw new ApiException( sprintf( - '[%d] Error connecting to the API (%s): %s', + '[%d] Error connecting to the API (%s)', $statusCode, - $exception->getRequest()->getUri(), - $message + $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), - $message + $response->getBody() ); } ); } /** - * Create request for operation 'updateSession' + * Create request for operation 'siwUpdateSession' * * @param \Swagger\Client\Model\UpdateSessionRequest $body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateSessionRequest($body) + protected function siwUpdateSessionRequest($body) { // verify the required parameter 'body' is set - if ($body === null) { + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling updateSession' + 'Missing the required parameter $body when calling siwUpdateSession' ); } + $resourcePath = '/session.update'; $formParams = []; $queryParams = []; @@ -1055,11 +1352,14 @@ protected function updateSessionRequest($body) $httpBody = ''; $multipart = false; + + // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] @@ -1099,11 +1399,13 @@ protected function updateSessionRequest($body) $httpBody = \GuzzleHttp\Psr7\build_query($formParams); } } + // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { $headers['Authorization'] = $apiKey; } + $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1132,9 +1434,7 @@ protected function updateSessionRequest($body) */ protected function createHttpClientOption() { - $options = [ - 'http_errors' => false, - ]; + $options = []; if ($this->config->getDebug()) { $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); if (!$options[RequestOptions::DEBUG]) { diff --git a/lib/ApiException.php b/lib/ApiException.php index 2e3c2c0..7e811bb 100755 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -10,14 +10,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. diff --git a/lib/Configuration.php b/lib/Configuration.php index e57b506..339cfd3 100755 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -10,14 +10,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -80,7 +80,7 @@ class Configuration * * @var string */ - protected $host = '///v1/siw'; + protected $host = '/v1/siw'; /** * User agent of the HTTP request, set to "PHP-Swagger" by default diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 3b23e4d..54b214f 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -10,14 +10,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. diff --git a/lib/Model/AdditionalInfo.php b/lib/Model/AdditionalInfo.php index 34d9a1a..a83dc26 100644 --- a/lib/Model/AdditionalInfo.php +++ b/lib/Model/AdditionalInfo.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * AdditionalInfo Class Doc Comment * * @category Class + * @description Additional meta information related to the session. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -204,8 +205,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -270,7 +270,7 @@ public function getCustomerNumber() /** * Sets customer_number * - * @param string $customer_number customer number provided by the user. + * @param string $customer_number customer_number * * @return $this */ diff --git a/lib/Model/Address.php b/lib/Model/Address.php index 0bc18ad..2866e3a 100644 --- a/lib/Model/Address.php +++ b/lib/Model/Address.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * Address Class Doc Comment * * @category Class + * @description Common address entity that used almost everywhere in Ingrid's API. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -246,8 +247,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -432,7 +432,7 @@ public function getCountry() /** * Sets country * - * @param string $country country + * @param string $country Country should be specified as two uppercase letters (ISO Alpha-2). Example `SE` for Sweden, `ES` for Spain. * * @return $this */ diff --git a/lib/Model/Any.php b/lib/Model/Any.php new file mode 100644 index 0000000..bea2a64 --- /dev/null +++ b/lib/Model/Any.php @@ -0,0 +1,321 @@ + 'string', +'value' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'type_url' => null, +'value' => 'byte' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type_url' => 'type_url', +'value' => 'value' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type_url' => 'setTypeUrl', +'value' => 'setValue' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type_url' => 'getTypeUrl', +'value' => 'getValue' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['type_url'] = isset($data['type_url']) ? $data['type_url'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type_url + * + * @return string + */ + public function getTypeUrl() + { + return $this->container['type_url']; + } + + /** + * Sets type_url + * + * @param string $type_url type_url + * + * @return $this + */ + public function setTypeUrl($type_url) + { + $this->container['type_url'] = $type_url; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/BillingItem.php b/lib/Model/BillingItem.php new file mode 100644 index 0000000..a0effdc --- /dev/null +++ b/lib/Model/BillingItem.php @@ -0,0 +1,322 @@ + 'string', +'cost' => '\Swagger\Client\Model\Cost' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'description' => null, +'cost' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', +'cost' => 'cost' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', +'cost' => 'setCost' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', +'cost' => 'getCost' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['cost'] = isset($data['cost']) ? $data['cost'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The kind of shipping cost. Can be pure shipping cost, addon or additional service. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets cost + * + * @return \Swagger\Client\Model\Cost + */ + public function getCost() + { + return $this->container['cost']; + } + + /** + * Sets cost + * + * @param \Swagger\Client\Model\Cost $cost cost + * + * @return $this + */ + public function setCost($cost) + { + $this->container['cost'] = $cost; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/CarrierAddon.php b/lib/Model/CarrierAddon.php new file mode 100644 index 0000000..e2ce265 --- /dev/null +++ b/lib/Model/CarrierAddon.php @@ -0,0 +1,351 @@ + 'string', +'code' => 'string', +'description' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, +'code' => null, +'description' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', +'code' => 'code', +'description' => 'description' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', +'code' => 'setCode', +'description' => 'setDescription' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', +'code' => 'getCode', +'description' => 'getDescription' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Internal identifier of an addon. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets code + * + * @return string + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string $code Identifier of the addon in carrier's system. + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description description + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/Cart.php b/lib/Model/Cart.php index 1352da6..dd0360a 100644 --- a/lib/Model/Cart.php +++ b/lib/Model/Cart.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * Cart Class Doc Comment * * @category Class + * @description Cart information from the e-commerce store. Information in here is used by the shipping rule engine to calculate the best shipping option for the customer. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -61,10 +62,11 @@ class Cart implements ModelInterface, ArrayAccess 'currency' => 'string', 'pre_order' => 'bool', 'voucher' => 'string', -'shipping_date' => '\Swagger\Client\Model\DateTimeRange', +'shipping_date' => '\Swagger\Client\Model\ShippingDate', 'items' => '\Swagger\Client\Model\CartItem[]', -'attributes' => 'string[]', -'cart_id' => 'string' ]; +'cart_id' => 'string', +'vouchers' => 'string[]', +'attributes' => 'string[]' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -75,12 +77,13 @@ class Cart implements ModelInterface, ArrayAccess 'total_value' => 'int32', 'total_discount' => 'int32', 'currency' => null, -'pre_order' => 'boolean', +'pre_order' => null, 'voucher' => null, 'shipping_date' => null, 'items' => null, -'attributes' => null, -'cart_id' => null ]; +'cart_id' => null, +'vouchers' => null, +'attributes' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -116,8 +119,9 @@ public static function swaggerFormats() 'voucher' => 'voucher', 'shipping_date' => 'shipping_date', 'items' => 'items', -'attributes' => 'attributes', -'cart_id' => 'cart_id' ]; +'cart_id' => 'cart_id', +'vouchers' => 'vouchers', +'attributes' => 'attributes' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -132,8 +136,9 @@ public static function swaggerFormats() 'voucher' => 'setVoucher', 'shipping_date' => 'setShippingDate', 'items' => 'setItems', -'attributes' => 'setAttributes', -'cart_id' => 'setCartId' ]; +'cart_id' => 'setCartId', +'vouchers' => 'setVouchers', +'attributes' => 'setAttributes' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -148,8 +153,9 @@ public static function swaggerFormats() 'voucher' => 'getVoucher', 'shipping_date' => 'getShippingDate', 'items' => 'getItems', -'attributes' => 'getAttributes', -'cart_id' => 'getCartId' ]; +'cart_id' => 'getCartId', +'vouchers' => 'getVouchers', +'attributes' => 'getAttributes' ]; /** * Array of attributes where the key is the local name, @@ -216,8 +222,9 @@ public function __construct(array $data = null) $this->container['voucher'] = isset($data['voucher']) ? $data['voucher'] : null; $this->container['shipping_date'] = isset($data['shipping_date']) ? $data['shipping_date'] : null; $this->container['items'] = isset($data['items']) ? $data['items'] : null; - $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['cart_id'] = isset($data['cart_id']) ? $data['cart_id'] : null; + $this->container['vouchers'] = isset($data['vouchers']) ? $data['vouchers'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; } /** @@ -240,8 +247,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -368,7 +374,7 @@ public function setVoucher($voucher) /** * Gets shipping_date * - * @return \Swagger\Client\Model\DateTimeRange + * @return \Swagger\Client\Model\ShippingDate */ public function getShippingDate() { @@ -378,7 +384,7 @@ public function getShippingDate() /** * Sets shipping_date * - * @param \Swagger\Client\Model\DateTimeRange $shipping_date shipping_date + * @param \Swagger\Client\Model\ShippingDate $shipping_date shipping_date * * @return $this */ @@ -414,49 +420,73 @@ public function setItems($items) } /** - * Gets attributes + * Gets cart_id + * + * @return string + */ + public function getCartId() + { + return $this->container['cart_id']; + } + + /** + * Sets cart_id + * + * @param string $cart_id cart_id + * + * @return $this + */ + public function setCartId($cart_id) + { + $this->container['cart_id'] = $cart_id; + + return $this; + } + + /** + * Gets vouchers * * @return string[] */ - public function getAttributes() + public function getVouchers() { - return $this->container['attributes']; + return $this->container['vouchers']; } /** - * Sets attributes + * Sets vouchers * - * @param string[] $attributes attributes + * @param string[] $vouchers vouchers * * @return $this */ - public function setAttributes($attributes) + public function setVouchers($vouchers) { - $this->container['attributes'] = $attributes; + $this->container['vouchers'] = $vouchers; return $this; } /** - * Gets cart_id + * Gets attributes * - * @return string + * @return string[] */ - public function getCartId() + public function getAttributes() { - return $this->container['cart_id']; + return $this->container['attributes']; } /** - * Sets cart_id + * Sets attributes * - * @param string $cart_id The cart id for the customers cart on the merchant site. + * @param string[] $attributes attributes * * @return $this */ - public function setCartId($cart_id) + public function setAttributes($attributes) { - $this->container['cart_id'] = $cart_id; + $this->container['attributes'] = $attributes; return $this; } diff --git a/lib/Model/CartItem.php b/lib/Model/CartItem.php index fca60be..fcb2d75 100644 --- a/lib/Model/CartItem.php +++ b/lib/Model/CartItem.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -60,7 +60,7 @@ class CartItem implements ModelInterface, ArrayAccess 'name' => 'string', 'attributes' => 'string[]', 'out_of_stock' => 'bool', -'dimensions' => '\Swagger\Client\Model\DimensionsDimensions', +'dimensions' => '\Swagger\Client\Model\Dimensions', 'quantity' => 'int', 'weight' => 'int', 'discount' => 'int', @@ -75,7 +75,7 @@ class CartItem implements ModelInterface, ArrayAccess 'sku' => null, 'name' => null, 'attributes' => null, -'out_of_stock' => 'boolean', +'out_of_stock' => null, 'dimensions' => null, 'quantity' => 'int32', 'weight' => 'int32', @@ -240,8 +240,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -344,7 +343,7 @@ public function setOutOfStock($out_of_stock) /** * Gets dimensions * - * @return \Swagger\Client\Model\DimensionsDimensions + * @return \Swagger\Client\Model\Dimensions */ public function getDimensions() { @@ -354,7 +353,7 @@ public function getDimensions() /** * Sets dimensions * - * @param \Swagger\Client\Model\DimensionsDimensions $dimensions dimensions + * @param \Swagger\Client\Model\Dimensions $dimensions dimensions * * @return $this */ @@ -378,7 +377,7 @@ public function getQuantity() /** * Sets quantity * - * @param int $quantity quantity + * @param int $quantity Total number product item in the cart. * * @return $this */ @@ -426,7 +425,7 @@ public function getDiscount() /** * Sets discount * - * @param int $discount Discount of the item. + * @param int $discount discount * * @return $this */ @@ -450,7 +449,7 @@ public function getPrice() /** * Sets price * - * @param int $price Price of the item. + * @param int $price price * * @return $this */ diff --git a/lib/Model/CompleteSessionRequest.php b/lib/Model/CompleteSessionRequest.php index eb2cd88..1fc269b 100644 --- a/lib/Model/CompleteSessionRequest.php +++ b/lib/Model/CompleteSessionRequest.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -216,8 +216,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -282,7 +281,7 @@ public function getWarehouseId() /** * Sets warehouse_id * - * @param string $warehouse_id WarehouseID specifies from which warehouse order will be sent. If it is not supplied and site has only one warehouse, this warehouse will be used as sender. Otherwise order will have no sender. + * @param string $warehouse_id Warehouse ID specifies from which warehouse order will be sent. If it is not supplied and site has only one warehouse, this warehouse will be used as sender. Otherwise order will have no sender address. * * @return $this */ diff --git a/lib/Model/CompleteSessionResponse.php b/lib/Model/CompleteSessionResponse.php index 171b4d2..193597d 100644 --- a/lib/Model/CompleteSessionResponse.php +++ b/lib/Model/CompleteSessionResponse.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -198,8 +198,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -240,7 +239,7 @@ public function getTosId() /** * Sets tos_id * - * @param string $tos_id TOS Id is deprecated, use the tos_id on the session instead. + * @param string $tos_id tos_id * * @return $this */ diff --git a/lib/Model/Coordinates.php b/lib/Model/Coordinates.php index 3ecbbc8..253768e 100644 --- a/lib/Model/Coordinates.php +++ b/lib/Model/Coordinates.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -198,8 +198,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/Cost.php b/lib/Model/Cost.php new file mode 100644 index 0000000..ef104af --- /dev/null +++ b/lib/Model/Cost.php @@ -0,0 +1,291 @@ + 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'amount' => 'int32' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['amount'] = isset($data['amount']) ? $data['amount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets amount + * + * @return int + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param int $amount amount + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/CreateSessionRequest.php b/lib/Model/CreateSessionRequest.php index 34194bf..19a8345 100644 --- a/lib/Model/CreateSessionRequest.php +++ b/lib/Model/CreateSessionRequest.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,7 +35,7 @@ * CreateSessionRequest Class Doc Comment * * @category Class - * @description Contains the required information to intialize a new session. + * @description Contains the required information to initialize a new session. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -65,7 +65,10 @@ class CreateSessionRequest implements ModelInterface, ArrayAccess 'external_id' => 'string', 'customer' => '\Swagger\Client\Model\CustomerInfo', 'search_address' => '\Swagger\Client\Model\Address', -'locales' => 'string[]' ]; +'locales' => 'string[]', +'meta' => 'map[string,string]', +'snippet_configuration' => '\Swagger\Client\Model\SnippetConfiguration', +'delivery_price_discount' => 'int' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -81,7 +84,10 @@ class CreateSessionRequest implements ModelInterface, ArrayAccess 'external_id' => null, 'customer' => null, 'search_address' => null, -'locales' => null ]; +'locales' => null, +'meta' => null, +'snippet_configuration' => null, +'delivery_price_discount' => 'int32' ]; /** * Array of property to type mappings. Used for (de)serialization @@ -118,7 +124,10 @@ public static function swaggerFormats() 'external_id' => 'external_id', 'customer' => 'customer', 'search_address' => 'search_address', -'locales' => 'locales' ]; +'locales' => 'locales', +'meta' => 'meta', +'snippet_configuration' => 'snippet_configuration', +'delivery_price_discount' => 'delivery_price_discount' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -134,7 +143,10 @@ public static function swaggerFormats() 'external_id' => 'setExternalId', 'customer' => 'setCustomer', 'search_address' => 'setSearchAddress', -'locales' => 'setLocales' ]; +'locales' => 'setLocales', +'meta' => 'setMeta', +'snippet_configuration' => 'setSnippetConfiguration', +'delivery_price_discount' => 'setDeliveryPriceDiscount' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -150,7 +162,10 @@ public static function swaggerFormats() 'external_id' => 'getExternalId', 'customer' => 'getCustomer', 'search_address' => 'getSearchAddress', -'locales' => 'getLocales' ]; +'locales' => 'getLocales', +'meta' => 'getMeta', +'snippet_configuration' => 'getSnippetConfiguration', +'delivery_price_discount' => 'getDeliveryPriceDiscount' ]; /** * Array of attributes where the key is the local name, @@ -219,6 +234,9 @@ public function __construct(array $data = null) $this->container['customer'] = isset($data['customer']) ? $data['customer'] : null; $this->container['search_address'] = isset($data['search_address']) ? $data['search_address'] : null; $this->container['locales'] = isset($data['locales']) ? $data['locales'] : null; + $this->container['meta'] = isset($data['meta']) ? $data['meta'] : null; + $this->container['snippet_configuration'] = isset($data['snippet_configuration']) ? $data['snippet_configuration'] : null; + $this->container['delivery_price_discount'] = isset($data['delivery_price_discount']) ? $data['delivery_price_discount'] : null; } /** @@ -241,8 +259,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -461,6 +478,78 @@ public function setLocales($locales) return $this; } + + /** + * Gets meta + * + * @return map[string,string] + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param map[string,string] $meta Generic key/value object that is used for supplying complementing information. + * + * @return $this + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets snippet_configuration + * + * @return \Swagger\Client\Model\SnippetConfiguration + */ + public function getSnippetConfiguration() + { + return $this->container['snippet_configuration']; + } + + /** + * Sets snippet_configuration + * + * @param \Swagger\Client\Model\SnippetConfiguration $snippet_configuration snippet_configuration + * + * @return $this + */ + public function setSnippetConfiguration($snippet_configuration) + { + $this->container['snippet_configuration'] = $snippet_configuration; + + return $this; + } + + /** + * Gets delivery_price_discount + * + * @return int + */ + public function getDeliveryPriceDiscount() + { + return $this->container['delivery_price_discount']; + } + + /** + * Sets delivery_price_discount + * + * @param int $delivery_price_discount Reduces the price with the given amount for all delivery options presented to the consumer. Prices that would go below zero is set to zero. + * + * @return $this + */ + public function setDeliveryPriceDiscount($delivery_price_discount) + { + $this->container['delivery_price_discount'] = $delivery_price_discount; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CreateSessionResponse.php b/lib/Model/CreateSessionResponse.php index 168c84f..d4984e0 100644 --- a/lib/Model/CreateSessionResponse.php +++ b/lib/Model/CreateSessionResponse.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -198,8 +198,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/CustomerInfo.php b/lib/Model/CustomerInfo.php index f83294a..4a3eacf 100644 --- a/lib/Model/CustomerInfo.php +++ b/lib/Model/CustomerInfo.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * CustomerInfo Class Doc Comment * * @category Class + * @description Contains information about the customer such as name, address, email and mobile phone number. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -58,7 +59,8 @@ class CustomerInfo implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'address' => '\Swagger\Client\Model\Address', 'phone' => 'string', -'email' => 'string' ]; +'email' => 'string', +'national_identification_number' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -68,7 +70,8 @@ class CustomerInfo implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'address' => null, 'phone' => null, -'email' => null ]; +'email' => null, +'national_identification_number' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -99,7 +102,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'address' => 'address', 'phone' => 'phone', -'email' => 'email' ]; +'email' => 'email', +'national_identification_number' => 'national_identification_number' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -109,7 +113,8 @@ public static function swaggerFormats() protected static $setters = [ 'address' => 'setAddress', 'phone' => 'setPhone', -'email' => 'setEmail' ]; +'email' => 'setEmail', +'national_identification_number' => 'setNationalIdentificationNumber' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -119,7 +124,8 @@ public static function swaggerFormats() protected static $getters = [ 'address' => 'getAddress', 'phone' => 'getPhone', -'email' => 'getEmail' ]; +'email' => 'getEmail', +'national_identification_number' => 'getNationalIdentificationNumber' ]; /** * Array of attributes where the key is the local name, @@ -182,6 +188,7 @@ public function __construct(array $data = null) $this->container['address'] = isset($data['address']) ? $data['address'] : null; $this->container['phone'] = isset($data['phone']) ? $data['phone'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['national_identification_number'] = isset($data['national_identification_number']) ? $data['national_identification_number'] : null; } /** @@ -204,8 +211,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -246,7 +252,7 @@ public function getPhone() /** * Sets phone * - * @param string $phone phone + * @param string $phone Customer's mobile phone number where SMS notifications will be sent. * * @return $this */ @@ -270,7 +276,7 @@ public function getEmail() /** * Sets email * - * @param string $email email + * @param string $email Customer's email where notifications will be sent to. * * @return $this */ @@ -280,6 +286,30 @@ public function setEmail($email) return $this; } + + /** + * Gets national_identification_number + * + * @return string + */ + public function getNationalIdentificationNumber() + { + return $this->container['national_identification_number']; + } + + /** + * Sets national_identification_number + * + * @param string $national_identification_number Customer's national identification number, eg. SSN. + * + * @return $this + */ + public function setNationalIdentificationNumber($national_identification_number) + { + $this->container['national_identification_number'] = $national_identification_number; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/DateTimeRange.php b/lib/Model/DateTimeRange.php index f01b03f..cbdfb43 100644 --- a/lib/Model/DateTimeRange.php +++ b/lib/Model/DateTimeRange.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * DateTimeRange Class Doc Comment * * @category Class + * @description Provides a date interval. Depending on a case, `start` and `end` parts are not guaranteed to be present. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -198,8 +199,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -216,7 +216,7 @@ public function getStart() /** * Sets start * - * @param string $start Start DateTime in RFC3339. + * @param string $start start * * @return $this */ @@ -240,7 +240,7 @@ public function getEnd() /** * Sets end * - * @param string $end End DateTime in RFC3339. + * @param string $end End of the interval. Date is returned in RFC3339 format. Example `2018-09-08T22:47:31Z07:00`. * * @return $this */ diff --git a/lib/Model/Dimensions.php b/lib/Model/Dimensions.php new file mode 100644 index 0000000..a0a3b07 --- /dev/null +++ b/lib/Model/Dimensions.php @@ -0,0 +1,352 @@ + 'int', +'length' => 'int', +'width' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'height' => 'int32', +'length' => 'int32', +'width' => 'int32' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'height' => 'height', +'length' => 'length', +'width' => 'width' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'height' => 'setHeight', +'length' => 'setLength', +'width' => 'setWidth' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'height' => 'getHeight', +'length' => 'getLength', +'width' => 'getWidth' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['height'] = isset($data['height']) ? $data['height'] : null; + $this->container['length'] = isset($data['length']) ? $data['length'] : null; + $this->container['width'] = isset($data['width']) ? $data['width'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets height + * + * @return int + */ + public function getHeight() + { + return $this->container['height']; + } + + /** + * Sets height + * + * @param int $height Height of the item in millimeters. + * + * @return $this + */ + public function setHeight($height) + { + $this->container['height'] = $height; + + return $this; + } + + /** + * Gets length + * + * @return int + */ + public function getLength() + { + return $this->container['length']; + } + + /** + * Sets length + * + * @param int $length Length of the item in millimeters. + * + * @return $this + */ + public function setLength($length) + { + $this->container['length'] = $length; + + return $this; + } + + /** + * Gets width + * + * @return int + */ + public function getWidth() + { + return $this->container['width']; + } + + /** + * Sets width + * + * @param int $width Width of the item in millimeters. + * + * @return $this + */ + public function setWidth($width) + { + $this->container['width'] = $width; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/Distance.php b/lib/Model/Distance.php index 2a60e10..9283c76 100644 --- a/lib/Model/Distance.php +++ b/lib/Model/Distance.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * Distance Class Doc Comment * * @category Class + * @description Walking and driving distance information (if available). This depends if we could reverse geolocate supplied address and succeeded in finding a nearest route from A to B. Usually only available for distance information between address provided by the customer and service point address. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -198,8 +199,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/DistanceSpec.php b/lib/Model/DistanceSpec.php index d32ed90..cd55ba2 100644 --- a/lib/Model/DistanceSpec.php +++ b/lib/Model/DistanceSpec.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * DistanceSpec Class Doc Comment * * @category Class + * @description Generic distance object used by Distance object to provide driving and walking information. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -198,8 +199,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/Error.php b/lib/Model/Error.php new file mode 100644 index 0000000..39d0f34 --- /dev/null +++ b/lib/Model/Error.php @@ -0,0 +1,381 @@ + 'string', +'code' => 'int', +'message' => 'string', +'details' => '\Swagger\Client\Model\Any[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'error' => null, +'code' => 'int32', +'message' => null, +'details' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error', +'code' => 'code', +'message' => 'message', +'details' => 'details' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError', +'code' => 'setCode', +'message' => 'setMessage', +'details' => 'setDetails' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError', +'code' => 'getCode', +'message' => 'getMessage', +'details' => 'getDetails' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['error'] = isset($data['error']) ? $data['error'] : null; + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + $this->container['details'] = isset($data['details']) ? $data['details'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets error + * + * @return string + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string $error error + * + * @return $this + */ + public function setError($error) + { + $this->container['error'] = $error; + + return $this; + } + + /** + * Gets code + * + * @return int + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int $code code + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets details + * + * @return \Swagger\Client\Model\Any[] + */ + public function getDetails() + { + return $this->container['details']; + } + + /** + * Sets details + * + * @param \Swagger\Client\Model\Any[] $details details + * + * @return $this + */ + public function setDetails($details) + { + $this->container['details'] = $details; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/GetSessionResponse.php b/lib/Model/GetSessionResponse.php index a822c26..5b6567e 100644 --- a/lib/Model/GetSessionResponse.php +++ b/lib/Model/GetSessionResponse.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -198,8 +198,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/LegLocation.php b/lib/Model/LegLocation.php new file mode 100644 index 0000000..d9fd9b9 --- /dev/null +++ b/lib/Model/LegLocation.php @@ -0,0 +1,352 @@ + '\Swagger\Client\Model\Address', +'location_type' => '\Swagger\Client\Model\LegLocationType', +'external_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null, +'location_type' => null, +'external_id' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address' => 'address', +'location_type' => 'location_type', +'external_id' => 'external_id' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress', +'location_type' => 'setLocationType', +'external_id' => 'setExternalId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress', +'location_type' => 'getLocationType', +'external_id' => 'getExternalId' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + $this->container['location_type'] = isset($data['location_type']) ? $data['location_type'] : null; + $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets address + * + * @return \Swagger\Client\Model\Address + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Swagger\Client\Model\Address $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets location_type + * + * @return \Swagger\Client\Model\LegLocationType + */ + public function getLocationType() + { + return $this->container['location_type']; + } + + /** + * Sets location_type + * + * @param \Swagger\Client\Model\LegLocationType $location_type location_type + * + * @return $this + */ + public function setLocationType($location_type) + { + $this->container['location_type'] = $location_type; + + return $this; + } + + /** + * Gets external_id + * + * @return string + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string $external_id external_id + * + * @return $this + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/LegLocationType.php b/lib/Model/LegLocationType.php new file mode 100644 index 0000000..6c5eb7e --- /dev/null +++ b/lib/Model/LegLocationType.php @@ -0,0 +1,267 @@ +listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ListSessionsSummariesResponse.php b/lib/Model/ListSessionsSummariesResponse.php new file mode 100644 index 0000000..7aad3db --- /dev/null +++ b/lib/Model/ListSessionsSummariesResponse.php @@ -0,0 +1,292 @@ + '\Swagger\Client\Model\SessionSummary[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'results' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'results' => 'results' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'results' => 'setResults' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'results' => 'getResults' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['results'] = isset($data['results']) ? $data['results'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets results + * + * @return \Swagger\Client\Model\SessionSummary[] + */ + public function getResults() + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \Swagger\Client\Model\SessionSummary[] $results results + * + * @return $this + */ + public function setResults($results) + { + $this->container['results'] = $results; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 4065b13..bbc334b 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. diff --git a/lib/Model/OperationalHours.php b/lib/Model/OperationalHours.php index 3b7944f..e5a2c09 100644 --- a/lib/Model/OperationalHours.php +++ b/lib/Model/OperationalHours.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -234,8 +234,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/PickupLocation.php b/lib/Model/PickupLocation.php index edf4445..18b21f2 100644 --- a/lib/Model/PickupLocation.php +++ b/lib/Model/PickupLocation.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -35,6 +35,7 @@ * PickupLocation Class Doc Comment * * @category Class + * @description Contains information about the pickup service point as returned by the carrier. * @package Swagger\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -62,7 +63,8 @@ class PickupLocation implements ModelInterface, ArrayAccess 'distance' => '\Swagger\Client\Model\Distance', 'operational_hours' => '\Swagger\Client\Model\OperationalHours', 'meta' => 'map[string,string]', -'location_type' => '\Swagger\Client\Model\ShippingPickupLocationType' ]; +'location_type' => '\Swagger\Client\Model\PickupLocationType', +'sections' => '\Swagger\Client\Model\Section[]' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -76,7 +78,8 @@ class PickupLocation implements ModelInterface, ArrayAccess 'distance' => null, 'operational_hours' => null, 'meta' => null, -'location_type' => null ]; +'location_type' => null, +'sections' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -111,7 +114,8 @@ public static function swaggerFormats() 'distance' => 'distance', 'operational_hours' => 'operational_hours', 'meta' => 'meta', -'location_type' => 'location_type' ]; +'location_type' => 'location_type', +'sections' => 'sections' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -125,7 +129,8 @@ public static function swaggerFormats() 'distance' => 'setDistance', 'operational_hours' => 'setOperationalHours', 'meta' => 'setMeta', -'location_type' => 'setLocationType' ]; +'location_type' => 'setLocationType', +'sections' => 'setSections' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -139,7 +144,8 @@ public static function swaggerFormats() 'distance' => 'getDistance', 'operational_hours' => 'getOperationalHours', 'meta' => 'getMeta', -'location_type' => 'getLocationType' ]; +'location_type' => 'getLocationType', +'sections' => 'getSections' ]; /** * Array of attributes where the key is the local name, @@ -206,6 +212,7 @@ public function __construct(array $data = null) $this->container['operational_hours'] = isset($data['operational_hours']) ? $data['operational_hours'] : null; $this->container['meta'] = isset($data['meta']) ? $data['meta'] : null; $this->container['location_type'] = isset($data['location_type']) ? $data['location_type'] : null; + $this->container['sections'] = isset($data['sections']) ? $data['sections'] : null; } /** @@ -228,8 +235,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -246,7 +252,7 @@ public function getExternalId() /** * Sets external_id * - * @param string $external_id external_id + * @param string $external_id Carrier specific ID of the service point location returned by the carrier. * * @return $this */ @@ -380,7 +386,7 @@ public function setMeta($meta) /** * Gets location_type * - * @return \Swagger\Client\Model\ShippingPickupLocationType + * @return \Swagger\Client\Model\PickupLocationType */ public function getLocationType() { @@ -390,7 +396,7 @@ public function getLocationType() /** * Sets location_type * - * @param \Swagger\Client\Model\ShippingPickupLocationType $location_type location_type + * @param \Swagger\Client\Model\PickupLocationType $location_type location_type * * @return $this */ @@ -400,6 +406,30 @@ public function setLocationType($location_type) return $this; } + + /** + * Gets sections + * + * @return \Swagger\Client\Model\Section[] + */ + public function getSections() + { + return $this->container['sections']; + } + + /** + * Sets sections + * + * @param \Swagger\Client\Model\Section[] $sections sections + * + * @return $this + */ + public function setSections($sections) + { + $this->container['sections'] = $sections; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PickupLocationType.php b/lib/Model/PickupLocationType.php new file mode 100644 index 0000000..98c34b2 --- /dev/null +++ b/lib/Model/PickupLocationType.php @@ -0,0 +1,64 @@ + 'string', +'type' => '\Swagger\Client\Model\PriceComponentType', +'value' => 'int', +'vat_rate' => 'float', +'vat' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, +'type' => null, +'value' => 'int32', +'vat_rate' => 'float', +'vat' => 'int32' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'type' => 'type', +'value' => 'value', +'vat_rate' => 'vat_rate', +'vat' => 'vat' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'type' => 'setType', +'value' => 'setValue', +'vat_rate' => 'setVatRate', +'vat' => 'setVat' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'type' => 'getType', +'value' => 'getValue', +'vat_rate' => 'getVatRate', +'vat' => 'getVat' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['vat_rate'] = isset($data['vat_rate']) ? $data['vat_rate'] : null; + $this->container['vat'] = isset($data['vat']) ? $data['vat'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return \Swagger\Client\Model\PriceComponentType + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Swagger\Client\Model\PriceComponentType $type type + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets vat_rate + * + * @return float + */ + public function getVatRate() + { + return $this->container['vat_rate']; + } + + /** + * Sets vat_rate + * + * @param float $vat_rate vat_rate + * + * @return $this + */ + public function setVatRate($vat_rate) + { + $this->container['vat_rate'] = $vat_rate; + + return $this; + } + + /** + * Gets vat + * + * @return int + */ + public function getVat() + { + return $this->container['vat']; + } + + /** + * Sets vat + * + * @param int $vat vat + * + * @return $this + */ + public function setVat($vat) + { + $this->container['vat'] = $vat; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/PriceComponentType.php b/lib/Model/PriceComponentType.php new file mode 100644 index 0000000..02f6dae --- /dev/null +++ b/lib/Model/PriceComponentType.php @@ -0,0 +1,59 @@ + '\Swagger\Client\Model\ResultShipping', +'category' => '\Swagger\Client\Model\ResultCategory', +'pricing' => '\Swagger\Client\Model\ResultPricing', +'selection' => '\Swagger\Client\Model\ResultSelection', +'delivery_time' => '\Swagger\Client\Model\ResultDeliveryTime' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'shipping' => null, +'category' => null, +'pricing' => null, +'selection' => null, +'delivery_time' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'shipping' => 'shipping', +'category' => 'category', +'pricing' => 'pricing', +'selection' => 'selection', +'delivery_time' => 'delivery_time' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'shipping' => 'setShipping', +'category' => 'setCategory', +'pricing' => 'setPricing', +'selection' => 'setSelection', +'delivery_time' => 'setDeliveryTime' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'shipping' => 'getShipping', +'category' => 'getCategory', +'pricing' => 'getPricing', +'selection' => 'getSelection', +'delivery_time' => 'getDeliveryTime' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['shipping'] = isset($data['shipping']) ? $data['shipping'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['pricing'] = isset($data['pricing']) ? $data['pricing'] : null; + $this->container['selection'] = isset($data['selection']) ? $data['selection'] : null; + $this->container['delivery_time'] = isset($data['delivery_time']) ? $data['delivery_time'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets shipping + * + * @return \Swagger\Client\Model\ResultShipping + */ + public function getShipping() + { + return $this->container['shipping']; + } + + /** + * Sets shipping + * + * @param \Swagger\Client\Model\ResultShipping $shipping shipping + * + * @return $this + */ + public function setShipping($shipping) + { + $this->container['shipping'] = $shipping; + + return $this; + } + + /** + * Gets category + * + * @return \Swagger\Client\Model\ResultCategory + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param \Swagger\Client\Model\ResultCategory $category category + * + * @return $this + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets pricing + * + * @return \Swagger\Client\Model\ResultPricing + */ + public function getPricing() + { + return $this->container['pricing']; + } + + /** + * Sets pricing + * + * @param \Swagger\Client\Model\ResultPricing $pricing pricing + * + * @return $this + */ + public function setPricing($pricing) + { + $this->container['pricing'] = $pricing; + + return $this; + } + + /** + * Gets selection + * + * @return \Swagger\Client\Model\ResultSelection + */ + public function getSelection() + { + return $this->container['selection']; + } + + /** + * Sets selection + * + * @param \Swagger\Client\Model\ResultSelection $selection selection + * + * @return $this + */ + public function setSelection($selection) + { + $this->container['selection'] = $selection; + + return $this; + } + + /** + * Gets delivery_time + * + * @return \Swagger\Client\Model\ResultDeliveryTime + */ + public function getDeliveryTime() + { + return $this->container['delivery_time']; + } + + /** + * Sets delivery_time + * + * @param \Swagger\Client\Model\ResultDeliveryTime $delivery_time delivery_time + * + * @return $this + */ + public function setDeliveryTime($delivery_time) + { + $this->container['delivery_time'] = $delivery_time; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultCategory.php b/lib/Model/ResultCategory.php new file mode 100644 index 0000000..e40427f --- /dev/null +++ b/lib/Model/ResultCategory.php @@ -0,0 +1,382 @@ + 'string', +'name' => 'string', +'external_id' => 'string', +'tags' => '\Swagger\Client\Model\Tag[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, +'name' => null, +'external_id' => null, +'tags' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'name' => 'name', +'external_id' => 'external_id', +'tags' => 'tags' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'name' => 'setName', +'external_id' => 'setExternalId', +'tags' => 'setTags' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'name' => 'getName', +'external_id' => 'getExternalId', +'tags' => 'getTags' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; + $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Id as set by the merchant in configuration. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Default category name. Used in shipping selector widget to show category name to the customer. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets external_id + * + * @return string + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string $external_id Optional external id that can be used to map to merchant specific ids. Can be set in configuration. + * + * @return $this + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } + + /** + * Gets tags + * + * @return \Swagger\Client\Model\Tag[] + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \Swagger\Client\Model\Tag[] $tags tags + * + * @return $this + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultDeliveryAddon.php b/lib/Model/ResultDeliveryAddon.php new file mode 100644 index 0000000..5679c4d --- /dev/null +++ b/lib/Model/ResultDeliveryAddon.php @@ -0,0 +1,322 @@ + 'string', +'external_addon_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, +'external_addon_id' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'external_addon_id' => 'external_addon_id' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'external_addon_id' => 'setExternalAddonId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'external_addon_id' => 'getExternalAddonId' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['external_addon_id'] = isset($data['external_addon_id']) ? $data['external_addon_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets external_addon_id + * + * @return string + */ + public function getExternalAddonId() + { + return $this->container['external_addon_id']; + } + + /** + * Sets external_addon_id + * + * @param string $external_addon_id external_addon_id + * + * @return $this + */ + public function setExternalAddonId($external_addon_id) + { + $this->container['external_addon_id'] = $external_addon_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultDeliveryTime.php b/lib/Model/ResultDeliveryTime.php new file mode 100644 index 0000000..cb18593 --- /dev/null +++ b/lib/Model/ResultDeliveryTime.php @@ -0,0 +1,351 @@ + '\Swagger\Client\Model\ResultDeliveryTimeRange', +'customer_delivery_promise' => '\Swagger\Client\Model\ResultDeliveryTimeRange', +'carrier_delivery_promise' => '\Swagger\Client\Model\ResultDeliveryTimeRange' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'pickup_from_merchant' => null, +'customer_delivery_promise' => null, +'carrier_delivery_promise' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pickup_from_merchant' => 'pickup_from_merchant', +'customer_delivery_promise' => 'customer_delivery_promise', +'carrier_delivery_promise' => 'carrier_delivery_promise' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pickup_from_merchant' => 'setPickupFromMerchant', +'customer_delivery_promise' => 'setCustomerDeliveryPromise', +'carrier_delivery_promise' => 'setCarrierDeliveryPromise' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pickup_from_merchant' => 'getPickupFromMerchant', +'customer_delivery_promise' => 'getCustomerDeliveryPromise', +'carrier_delivery_promise' => 'getCarrierDeliveryPromise' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['pickup_from_merchant'] = isset($data['pickup_from_merchant']) ? $data['pickup_from_merchant'] : null; + $this->container['customer_delivery_promise'] = isset($data['customer_delivery_promise']) ? $data['customer_delivery_promise'] : null; + $this->container['carrier_delivery_promise'] = isset($data['carrier_delivery_promise']) ? $data['carrier_delivery_promise'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets pickup_from_merchant + * + * @return \Swagger\Client\Model\ResultDeliveryTimeRange + */ + public function getPickupFromMerchant() + { + return $this->container['pickup_from_merchant']; + } + + /** + * Sets pickup_from_merchant + * + * @param \Swagger\Client\Model\ResultDeliveryTimeRange $pickup_from_merchant pickup_from_merchant + * + * @return $this + */ + public function setPickupFromMerchant($pickup_from_merchant) + { + $this->container['pickup_from_merchant'] = $pickup_from_merchant; + + return $this; + } + + /** + * Gets customer_delivery_promise + * + * @return \Swagger\Client\Model\ResultDeliveryTimeRange + */ + public function getCustomerDeliveryPromise() + { + return $this->container['customer_delivery_promise']; + } + + /** + * Sets customer_delivery_promise + * + * @param \Swagger\Client\Model\ResultDeliveryTimeRange $customer_delivery_promise customer_delivery_promise + * + * @return $this + */ + public function setCustomerDeliveryPromise($customer_delivery_promise) + { + $this->container['customer_delivery_promise'] = $customer_delivery_promise; + + return $this; + } + + /** + * Gets carrier_delivery_promise + * + * @return \Swagger\Client\Model\ResultDeliveryTimeRange + */ + public function getCarrierDeliveryPromise() + { + return $this->container['carrier_delivery_promise']; + } + + /** + * Sets carrier_delivery_promise + * + * @param \Swagger\Client\Model\ResultDeliveryTimeRange $carrier_delivery_promise carrier_delivery_promise + * + * @return $this + */ + public function setCarrierDeliveryPromise($carrier_delivery_promise) + { + $this->container['carrier_delivery_promise'] = $carrier_delivery_promise; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultDeliveryTimeRange.php b/lib/Model/ResultDeliveryTimeRange.php new file mode 100644 index 0000000..60b26ac --- /dev/null +++ b/lib/Model/ResultDeliveryTimeRange.php @@ -0,0 +1,321 @@ + 'string', +'latest' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'earliest' => null, +'latest' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'earliest' => 'earliest', +'latest' => 'latest' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'earliest' => 'setEarliest', +'latest' => 'setLatest' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'earliest' => 'getEarliest', +'latest' => 'getLatest' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['earliest'] = isset($data['earliest']) ? $data['earliest'] : null; + $this->container['latest'] = isset($data['latest']) ? $data['latest'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets earliest + * + * @return string + */ + public function getEarliest() + { + return $this->container['earliest']; + } + + /** + * Sets earliest + * + * @param string $earliest earliest + * + * @return $this + */ + public function setEarliest($earliest) + { + $this->container['earliest'] = $earliest; + + return $this; + } + + /** + * Gets latest + * + * @return string + */ + public function getLatest() + { + return $this->container['latest']; + } + + /** + * Sets latest + * + * @param string $latest latest + * + * @return $this + */ + public function setLatest($latest) + { + $this->container['latest'] = $latest; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultPricing.php b/lib/Model/ResultPricing.php new file mode 100644 index 0000000..799aa32 --- /dev/null +++ b/lib/Model/ResultPricing.php @@ -0,0 +1,352 @@ + 'string', +'price' => 'int', +'price_components' => '\Swagger\Client\Model\PriceComponent[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'currency' => null, +'price' => 'int32', +'price_components' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'currency' => 'currency', +'price' => 'price', +'price_components' => 'price_components' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', +'price' => 'setPrice', +'price_components' => 'setPriceComponents' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', +'price' => 'getPrice', +'price_components' => 'getPriceComponents' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['currency'] = isset($data['currency']) ? $data['currency'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['price_components'] = isset($data['price_components']) ? $data['price_components'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency Session's currency. Example `SEK`. + * + * @return $this + */ + public function setCurrency($currency) + { + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets price + * + * @return int + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param int $price Price in cents. Example `20000` represents `200.00`. + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets price_components + * + * @return \Swagger\Client\Model\PriceComponent[] + */ + public function getPriceComponents() + { + return $this->container['price_components']; + } + + /** + * Sets price_components + * + * @param \Swagger\Client\Model\PriceComponent[] $price_components Components which make up the price. + * + * @return $this + */ + public function setPriceComponents($price_components) + { + $this->container['price_components'] = $price_components; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultSelection.php b/lib/Model/ResultSelection.php new file mode 100644 index 0000000..e76c60f --- /dev/null +++ b/lib/Model/ResultSelection.php @@ -0,0 +1,68 @@ + 'string', +'delivery_type' => 'string', +'carrier' => 'string', +'product' => 'string', +'location' => '\Swagger\Client\Model\PickupLocation', +'delivery_time' => '\Swagger\Client\Model\TimeSlot', +'external_method_id' => 'string', +'addons' => '\Swagger\Client\Model\CarrierAddon[]', +'supports' => '\Swagger\Client\Model\Supports', +'meta' => 'map[string,string]', +'route' => '\Swagger\Client\Model\Route', +'delivery_addons' => '\Swagger\Client\Model\ResultDeliveryAddon[]', +'warehouse' => '\Swagger\Client\Model\ResultWarehouse' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'shipping_method' => null, +'delivery_type' => null, +'carrier' => null, +'product' => null, +'location' => null, +'delivery_time' => null, +'external_method_id' => null, +'addons' => null, +'supports' => null, +'meta' => null, +'route' => null, +'delivery_addons' => null, +'warehouse' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'shipping_method' => 'shipping_method', +'delivery_type' => 'delivery_type', +'carrier' => 'carrier', +'product' => 'product', +'location' => 'location', +'delivery_time' => 'delivery_time', +'external_method_id' => 'external_method_id', +'addons' => 'addons', +'supports' => 'supports', +'meta' => 'meta', +'route' => 'route', +'delivery_addons' => 'delivery_addons', +'warehouse' => 'warehouse' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'shipping_method' => 'setShippingMethod', +'delivery_type' => 'setDeliveryType', +'carrier' => 'setCarrier', +'product' => 'setProduct', +'location' => 'setLocation', +'delivery_time' => 'setDeliveryTime', +'external_method_id' => 'setExternalMethodId', +'addons' => 'setAddons', +'supports' => 'setSupports', +'meta' => 'setMeta', +'route' => 'setRoute', +'delivery_addons' => 'setDeliveryAddons', +'warehouse' => 'setWarehouse' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'shipping_method' => 'getShippingMethod', +'delivery_type' => 'getDeliveryType', +'carrier' => 'getCarrier', +'product' => 'getProduct', +'location' => 'getLocation', +'delivery_time' => 'getDeliveryTime', +'external_method_id' => 'getExternalMethodId', +'addons' => 'getAddons', +'supports' => 'getSupports', +'meta' => 'getMeta', +'route' => 'getRoute', +'delivery_addons' => 'getDeliveryAddons', +'warehouse' => 'getWarehouse' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['shipping_method'] = isset($data['shipping_method']) ? $data['shipping_method'] : null; + $this->container['delivery_type'] = isset($data['delivery_type']) ? $data['delivery_type'] : null; + $this->container['carrier'] = isset($data['carrier']) ? $data['carrier'] : null; + $this->container['product'] = isset($data['product']) ? $data['product'] : null; + $this->container['location'] = isset($data['location']) ? $data['location'] : null; + $this->container['delivery_time'] = isset($data['delivery_time']) ? $data['delivery_time'] : null; + $this->container['external_method_id'] = isset($data['external_method_id']) ? $data['external_method_id'] : null; + $this->container['addons'] = isset($data['addons']) ? $data['addons'] : null; + $this->container['supports'] = isset($data['supports']) ? $data['supports'] : null; + $this->container['meta'] = isset($data['meta']) ? $data['meta'] : null; + $this->container['route'] = isset($data['route']) ? $data['route'] : null; + $this->container['delivery_addons'] = isset($data['delivery_addons']) ? $data['delivery_addons'] : null; + $this->container['warehouse'] = isset($data['warehouse']) ? $data['warehouse'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets shipping_method + * + * @return string + */ + public function getShippingMethod() + { + return $this->container['shipping_method']; + } + + /** + * Sets shipping_method + * + * @param string $shipping_method Ingrid's ID of the shipping product. Example `bst-std` for BEST Delivery. + * + * @return $this + */ + public function setShippingMethod($shipping_method) + { + $this->container['shipping_method'] = $shipping_method; + + return $this; + } + + /** + * Gets delivery_type + * + * @return string + */ + public function getDeliveryType() + { + return $this->container['delivery_type']; + } + + /** + * Sets delivery_type + * + * @param string $delivery_type Type of delivery (pickup, instore, mailbox, delivery). + * + * @return $this + */ + public function setDeliveryType($delivery_type) + { + $this->container['delivery_type'] = $delivery_type; + + return $this; + } + + /** + * Gets carrier + * + * @return string + */ + public function getCarrier() + { + return $this->container['carrier']; + } + + /** + * Sets carrier + * + * @param string $carrier Name of the shipping company. + * + * @return $this + */ + public function setCarrier($carrier) + { + $this->container['carrier'] = $carrier; + + return $this; + } + + /** + * Gets product + * + * @return string + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param string $product Name of the shipping product. + * + * @return $this + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets location + * + * @return \Swagger\Client\Model\PickupLocation + */ + public function getLocation() + { + return $this->container['location']; + } + + /** + * Sets location + * + * @param \Swagger\Client\Model\PickupLocation $location location + * + * @return $this + */ + public function setLocation($location) + { + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets delivery_time + * + * @return \Swagger\Client\Model\TimeSlot + */ + public function getDeliveryTime() + { + return $this->container['delivery_time']; + } + + /** + * Sets delivery_time + * + * @param \Swagger\Client\Model\TimeSlot $delivery_time delivery_time + * + * @return $this + */ + public function setDeliveryTime($delivery_time) + { + $this->container['delivery_time'] = $delivery_time; + + return $this; + } + + /** + * Gets external_method_id + * + * @return string + */ + public function getExternalMethodId() + { + return $this->container['external_method_id']; + } + + /** + * Sets external_method_id + * + * @param string $external_method_id External method identifier, can be used for merchant-specific shipping methods mappings, eg override. + * + * @return $this + */ + public function setExternalMethodId($external_method_id) + { + $this->container['external_method_id'] = $external_method_id; + + return $this; + } + + /** + * Gets addons + * + * @return \Swagger\Client\Model\CarrierAddon[] + */ + public function getAddons() + { + return $this->container['addons']; + } + + /** + * Sets addons + * + * @param \Swagger\Client\Model\CarrierAddon[] $addons Shipping products addons that are enabled by default. Can be configured in the Merchant Admin tool. + * + * @return $this + */ + public function setAddons($addons) + { + $this->container['addons'] = $addons; + + return $this; + } + + /** + * Gets supports + * + * @return \Swagger\Client\Model\Supports + */ + public function getSupports() + { + return $this->container['supports']; + } + + /** + * Sets supports + * + * @param \Swagger\Client\Model\Supports $supports supports + * + * @return $this + */ + public function setSupports($supports) + { + $this->container['supports'] = $supports; + + return $this; + } + + /** + * Gets meta + * + * @return map[string,string] + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param map[string,string] $meta Carrier specific metadata related to the shipping option, for example addons. + * + * @return $this + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets route + * + * @return \Swagger\Client\Model\Route + */ + public function getRoute() + { + return $this->container['route']; + } + + /** + * Sets route + * + * @param \Swagger\Client\Model\Route $route route + * + * @return $this + */ + public function setRoute($route) + { + $this->container['route'] = $route; + + return $this; + } + + /** + * Gets delivery_addons + * + * @return \Swagger\Client\Model\ResultDeliveryAddon[] + */ + public function getDeliveryAddons() + { + return $this->container['delivery_addons']; + } + + /** + * Sets delivery_addons + * + * @param \Swagger\Client\Model\ResultDeliveryAddon[] $delivery_addons Selected delivery addons. + * + * @return $this + */ + public function setDeliveryAddons($delivery_addons) + { + $this->container['delivery_addons'] = $delivery_addons; + + return $this; + } + + /** + * Gets warehouse + * + * @return \Swagger\Client\Model\ResultWarehouse + */ + public function getWarehouse() + { + return $this->container['warehouse']; + } + + /** + * Sets warehouse + * + * @param \Swagger\Client\Model\ResultWarehouse $warehouse warehouse + * + * @return $this + */ + public function setWarehouse($warehouse) + { + $this->container['warehouse'] = $warehouse; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ResultWarehouse.php b/lib/Model/ResultWarehouse.php new file mode 100644 index 0000000..2e44587 --- /dev/null +++ b/lib/Model/ResultWarehouse.php @@ -0,0 +1,291 @@ + '\Swagger\Client\Model\Address' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'address' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'address' => 'address' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'address' => 'setAddress' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'address' => 'getAddress' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['address'] = isset($data['address']) ? $data['address'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets address + * + * @return \Swagger\Client\Model\Address + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \Swagger\Client\Model\Address $address address + * + * @return $this + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/Route.php b/lib/Model/Route.php new file mode 100644 index 0000000..cb0a427 --- /dev/null +++ b/lib/Model/Route.php @@ -0,0 +1,322 @@ + 'string', +'shipping_legs' => '\Swagger\Client\Model\ShippingLeg[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, +'shipping_legs' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'shipping_legs' => 'shipping_legs' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'shipping_legs' => 'setShippingLegs' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'shipping_legs' => 'getShippingLegs' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['shipping_legs'] = isset($data['shipping_legs']) ? $data['shipping_legs'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets shipping_legs + * + * @return \Swagger\Client\Model\ShippingLeg[] + */ + public function getShippingLegs() + { + return $this->container['shipping_legs']; + } + + /** + * Sets shipping_legs + * + * @param \Swagger\Client\Model\ShippingLeg[] $shipping_legs ShippingLegs represent a list of delivery steps. + * + * @return $this + */ + public function setShippingLegs($shipping_legs) + { + $this->container['shipping_legs'] = $shipping_legs; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/Section.php b/lib/Model/Section.php new file mode 100644 index 0000000..87ef746 --- /dev/null +++ b/lib/Model/Section.php @@ -0,0 +1,321 @@ + 'string', +'columns' => '\Swagger\Client\Model\SectionColumnItem[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, +'columns' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', +'columns' => 'columns' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', +'columns' => 'setColumns' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', +'columns' => 'getColumns' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['columns'] = isset($data['columns']) ? $data['columns'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets columns + * + * @return \Swagger\Client\Model\SectionColumnItem[] + */ + public function getColumns() + { + return $this->container['columns']; + } + + /** + * Sets columns + * + * @param \Swagger\Client\Model\SectionColumnItem[] $columns columns + * + * @return $this + */ + public function setColumns($columns) + { + $this->container['columns'] = $columns; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/SectionColumnItem.php b/lib/Model/SectionColumnItem.php new file mode 100644 index 0000000..421bc65 --- /dev/null +++ b/lib/Model/SectionColumnItem.php @@ -0,0 +1,291 @@ + '\Swagger\Client\Model\SectionItem[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'items' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'items' => 'items' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'items' => 'setItems' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'items' => 'getItems' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['items'] = isset($data['items']) ? $data['items'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets items + * + * @return \Swagger\Client\Model\SectionItem[] + */ + public function getItems() + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param \Swagger\Client\Model\SectionItem[] $items items + * + * @return $this + */ + public function setItems($items) + { + $this->container['items'] = $items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/SectionItem.php b/lib/Model/SectionItem.php new file mode 100644 index 0000000..3fa653b --- /dev/null +++ b/lib/Model/SectionItem.php @@ -0,0 +1,351 @@ + 'string', +'text' => 'string', +'link' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'icon' => null, +'text' => null, +'link' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'icon' => 'icon', +'text' => 'text', +'link' => 'link' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'icon' => 'setIcon', +'text' => 'setText', +'link' => 'setLink' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'icon' => 'getIcon', +'text' => 'getText', +'link' => 'getLink' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['icon'] = isset($data['icon']) ? $data['icon'] : null; + $this->container['text'] = isset($data['text']) ? $data['text'] : null; + $this->container['link'] = isset($data['link']) ? $data['link'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets icon + * + * @return string + */ + public function getIcon() + { + return $this->container['icon']; + } + + /** + * Sets icon + * + * @param string $icon icon + * + * @return $this + */ + public function setIcon($icon) + { + $this->container['icon'] = $icon; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text text + * + * @return $this + */ + public function setText($text) + { + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets link + * + * @return string + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string $link link + * + * @return $this + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/SelectedShippingOption.php b/lib/Model/SelectedShippingOption.php index 334b211..a6071e3 100644 --- a/lib/Model/SelectedShippingOption.php +++ b/lib/Model/SelectedShippingOption.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -67,7 +67,8 @@ class SelectedShippingOption implements ModelInterface, ArrayAccess 'shipping_category' => 'string', 'external_method_id' => 'string', 'meta' => 'map[string,string]', -'routes' => '\Swagger\Client\Model\RouteRoute[]' ]; +'routes' => '\Swagger\Client\Model\Route[]', +'category_tags' => '\Swagger\Client\Model\Tag[]' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -86,7 +87,8 @@ class SelectedShippingOption implements ModelInterface, ArrayAccess 'shipping_category' => null, 'external_method_id' => null, 'meta' => null, -'routes' => null ]; +'routes' => null, +'category_tags' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -126,7 +128,8 @@ public static function swaggerFormats() 'shipping_category' => 'shipping_category', 'external_method_id' => 'external_method_id', 'meta' => 'meta', -'routes' => 'routes' ]; +'routes' => 'routes', +'category_tags' => 'category_tags' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -145,7 +148,8 @@ public static function swaggerFormats() 'shipping_category' => 'setShippingCategory', 'external_method_id' => 'setExternalMethodId', 'meta' => 'setMeta', -'routes' => 'setRoutes' ]; +'routes' => 'setRoutes', +'category_tags' => 'setCategoryTags' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -164,7 +168,8 @@ public static function swaggerFormats() 'shipping_category' => 'getShippingCategory', 'external_method_id' => 'getExternalMethodId', 'meta' => 'getMeta', -'routes' => 'getRoutes' ]; +'routes' => 'getRoutes', +'category_tags' => 'getCategoryTags' ]; /** * Array of attributes where the key is the local name, @@ -236,6 +241,7 @@ public function __construct(array $data = null) $this->container['external_method_id'] = isset($data['external_method_id']) ? $data['external_method_id'] : null; $this->container['meta'] = isset($data['meta']) ? $data['meta'] : null; $this->container['routes'] = isset($data['routes']) ? $data['routes'] : null; + $this->container['category_tags'] = isset($data['category_tags']) ? $data['category_tags'] : null; } /** @@ -258,8 +264,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -468,7 +473,7 @@ public function getShippingCategory() /** * Sets shipping_category * - * @param string $shipping_category Shipping category (external_id) which the selected shipping options resides under. Shipping categories and their external_ids are configuered in the Merchant admin. + * @param string $shipping_category Shipping category under which the selected shipping options are grouped. Shipping categories are setup and configured in the merchant admin tool. * * @return $this */ @@ -492,7 +497,7 @@ public function getExternalMethodId() /** * Sets external_method_id * - * @param string $external_method_id External method identifier, can be used for custom shipping methods mappings. + * @param string $external_method_id External method identifier that can be used for custom shipping methods mappings, eg overriding a shipping product id from Ingrid by merchant's own. This mapping needs to be setup in the Merchant Admin tool. * * @return $this */ @@ -530,7 +535,7 @@ public function setMeta($meta) /** * Gets routes * - * @return \Swagger\Client\Model\RouteRoute[] + * @return \Swagger\Client\Model\Route[] */ public function getRoutes() { @@ -540,7 +545,7 @@ public function getRoutes() /** * Sets routes * - * @param \Swagger\Client\Model\RouteRoute[] $routes Routes represent all possible combinations for delivery steps. + * @param \Swagger\Client\Model\Route[] $routes Routes represent a list of delivery steps. This is used for so called chained deliveries where there are more than two deliveries involved to deliver a package to the customer. For example from central warehouse to the service point and then from a service point to customer's house. For a non-chained delivery this will contain only one step. * * @return $this */ @@ -550,6 +555,30 @@ public function setRoutes($routes) return $this; } + + /** + * Gets category_tags + * + * @return \Swagger\Client\Model\Tag[] + */ + public function getCategoryTags() + { + return $this->container['category_tags']; + } + + /** + * Sets category_tags + * + * @param \Swagger\Client\Model\Tag[] $category_tags category_tags + * + * @return $this + */ + public function setCategoryTags($category_tags) + { + $this->container['category_tags'] = $category_tags; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Session.php b/lib/Model/Session.php index 852f297..fa7838c 100644 --- a/lib/Model/Session.php +++ b/lib/Model/Session.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -67,7 +67,10 @@ class Session implements ModelInterface, ArrayAccess 'expires_at' => 'string', 'customer' => '\Swagger\Client\Model\CustomerInfo', 'search_address' => '\Swagger\Client\Model\Address', -'tos_id' => 'string' ]; +'tos_id' => 'string', +'shipping_cost' => '\Swagger\Client\Model\ShippingCost', +'result' => '\Swagger\Client\Model\Result', +'experiment_id' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -86,7 +89,10 @@ class Session implements ModelInterface, ArrayAccess 'expires_at' => null, 'customer' => null, 'search_address' => null, -'tos_id' => null ]; +'tos_id' => null, +'shipping_cost' => null, +'result' => null, +'experiment_id' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -126,7 +132,10 @@ public static function swaggerFormats() 'expires_at' => 'expires_at', 'customer' => 'customer', 'search_address' => 'search_address', -'tos_id' => 'tos_id' ]; +'tos_id' => 'tos_id', +'shipping_cost' => 'shipping_cost', +'result' => 'result', +'experiment_id' => 'experiment_id' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -145,7 +154,10 @@ public static function swaggerFormats() 'expires_at' => 'setExpiresAt', 'customer' => 'setCustomer', 'search_address' => 'setSearchAddress', -'tos_id' => 'setTosId' ]; +'tos_id' => 'setTosId', +'shipping_cost' => 'setShippingCost', +'result' => 'setResult', +'experiment_id' => 'setExperimentId' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -164,7 +176,10 @@ public static function swaggerFormats() 'expires_at' => 'getExpiresAt', 'customer' => 'getCustomer', 'search_address' => 'getSearchAddress', -'tos_id' => 'getTosId' ]; +'tos_id' => 'getTosId', +'shipping_cost' => 'getShippingCost', +'result' => 'getResult', +'experiment_id' => 'getExperimentId' ]; /** * Array of attributes where the key is the local name, @@ -236,6 +251,9 @@ public function __construct(array $data = null) $this->container['customer'] = isset($data['customer']) ? $data['customer'] : null; $this->container['search_address'] = isset($data['search_address']) ? $data['search_address'] : null; $this->container['tos_id'] = isset($data['tos_id']) ? $data['tos_id'] : null; + $this->container['shipping_cost'] = isset($data['shipping_cost']) ? $data['shipping_cost'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + $this->container['experiment_id'] = isset($data['experiment_id']) ? $data['experiment_id'] : null; } /** @@ -258,8 +276,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -276,7 +293,7 @@ public function getId() /** * Sets id * - * @param string $id id + * @param string $id UUIDv4 identifier of the session. Generated when session is created. Used for updating, fetching and completing the session. * * @return $this */ @@ -396,7 +413,7 @@ public function getExternalId() /** * Sets external_id * - * @param string $external_id external_id + * @param string $external_id Can be used to store a unique identifier from the merchant. For example external order ID or external shipment ID. * * @return $this */ @@ -468,7 +485,7 @@ public function getExpiresAt() /** * Sets expires_at * - * @param string $expires_at Time at which shipping options start to invalidate, in RFC 3339 format. + * @param string $expires_at Time at which some of the shipping options will be invalid. This is influenced by the cutoff times at the warehouse among other things. Session should be refreshed if this value is in the past. * * @return $this */ @@ -540,7 +557,7 @@ public function getTosId() /** * Sets tos_id * - * @param string $tos_id TosId identifies the order which the session belongs to. The tos id is available if the session was created from an order or when the session is completed. + * @param string $tos_id tos_id * * @return $this */ @@ -550,6 +567,78 @@ public function setTosId($tos_id) return $this; } + + /** + * Gets shipping_cost + * + * @return \Swagger\Client\Model\ShippingCost + */ + public function getShippingCost() + { + return $this->container['shipping_cost']; + } + + /** + * Sets shipping_cost + * + * @param \Swagger\Client\Model\ShippingCost $shipping_cost shipping_cost + * + * @return $this + */ + public function setShippingCost($shipping_cost) + { + $this->container['shipping_cost'] = $shipping_cost; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\Result + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\Result $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets experiment_id + * + * @return string + */ + public function getExperimentId() + { + return $this->container['experiment_id']; + } + + /** + * Sets experiment_id + * + * @param string $experiment_id Identifier of an A/B testing experiment, which is related to the session. If the session is not related to any A/B testing experiment, this field is empty. + * + * @return $this + */ + public function setExperimentId($experiment_id) + { + $this->container['experiment_id'] = $experiment_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/SessionSummary.php b/lib/Model/SessionSummary.php new file mode 100644 index 0000000..22432da --- /dev/null +++ b/lib/Model/SessionSummary.php @@ -0,0 +1,322 @@ + 'string', +'result' => '\Swagger\Client\Model\Result' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'session_id' => null, +'result' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'session_id' => 'session_id', +'result' => 'result' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'session_id' => 'setSessionId', +'result' => 'setResult' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'session_id' => 'getSessionId', +'result' => 'getResult' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['session_id'] = isset($data['session_id']) ? $data['session_id'] : null; + $this->container['result'] = isset($data['result']) ? $data['result'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets session_id + * + * @return string + */ + public function getSessionId() + { + return $this->container['session_id']; + } + + /** + * Sets session_id + * + * @param string $session_id session_id + * + * @return $this + */ + public function setSessionId($session_id) + { + $this->container['session_id'] = $session_id; + + return $this; + } + + /** + * Gets result + * + * @return \Swagger\Client\Model\Result + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Swagger\Client\Model\Result $result result + * + * @return $this + */ + public function setResult($result) + { + $this->container['result'] = $result; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ShippingCost.php b/lib/Model/ShippingCost.php new file mode 100644 index 0000000..bedff02 --- /dev/null +++ b/lib/Model/ShippingCost.php @@ -0,0 +1,322 @@ + '\Swagger\Client\Model\BillingItem[]', +'total_cost' => '\Swagger\Client\Model\Cost' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'billing_items' => null, +'total_cost' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'billing_items' => 'billing_items', +'total_cost' => 'total_cost' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'billing_items' => 'setBillingItems', +'total_cost' => 'setTotalCost' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'billing_items' => 'getBillingItems', +'total_cost' => 'getTotalCost' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['billing_items'] = isset($data['billing_items']) ? $data['billing_items'] : null; + $this->container['total_cost'] = isset($data['total_cost']) ? $data['total_cost'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets billing_items + * + * @return \Swagger\Client\Model\BillingItem[] + */ + public function getBillingItems() + { + return $this->container['billing_items']; + } + + /** + * Sets billing_items + * + * @param \Swagger\Client\Model\BillingItem[] $billing_items billing_items + * + * @return $this + */ + public function setBillingItems($billing_items) + { + $this->container['billing_items'] = $billing_items; + + return $this; + } + + /** + * Gets total_cost + * + * @return \Swagger\Client\Model\Cost + */ + public function getTotalCost() + { + return $this->container['total_cost']; + } + + /** + * Sets total_cost + * + * @param \Swagger\Client\Model\Cost $total_cost total_cost + * + * @return $this + */ + public function setTotalCost($total_cost) + { + $this->container['total_cost'] = $total_cost; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ShippingDate.php b/lib/Model/ShippingDate.php new file mode 100644 index 0000000..adb1daf --- /dev/null +++ b/lib/Model/ShippingDate.php @@ -0,0 +1,351 @@ + 'string', +'end' => 'string', +'category_tags' => '\Swagger\Client\Model\ShippingDateTag[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'start' => null, +'end' => null, +'category_tags' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'start' => 'start', +'end' => 'end', +'category_tags' => 'category_tags' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'start' => 'setStart', +'end' => 'setEnd', +'category_tags' => 'setCategoryTags' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'start' => 'getStart', +'end' => 'getEnd', +'category_tags' => 'getCategoryTags' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['start'] = isset($data['start']) ? $data['start'] : null; + $this->container['end'] = isset($data['end']) ? $data['end'] : null; + $this->container['category_tags'] = isset($data['category_tags']) ? $data['category_tags'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets start + * + * @return string + */ + public function getStart() + { + return $this->container['start']; + } + + /** + * Sets start + * + * @param string $start start + * + * @return $this + */ + public function setStart($start) + { + $this->container['start'] = $start; + + return $this; + } + + /** + * Gets end + * + * @return string + */ + public function getEnd() + { + return $this->container['end']; + } + + /** + * Sets end + * + * @param string $end End of the interval. Date is returned in RFC3339 format. Example `2018-09-08T22:47:31Z07:00`. + * + * @return $this + */ + public function setEnd($end) + { + $this->container['end'] = $end; + + return $this; + } + + /** + * Gets category_tags + * + * @return \Swagger\Client\Model\ShippingDateTag[] + */ + public function getCategoryTags() + { + return $this->container['category_tags']; + } + + /** + * Sets category_tags + * + * @param \Swagger\Client\Model\ShippingDateTag[] $category_tags category_tags + * + * @return $this + */ + public function setCategoryTags($category_tags) + { + $this->container['category_tags'] = $category_tags; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ShippingDateTag.php b/lib/Model/ShippingDateTag.php new file mode 100644 index 0000000..1c25bf4 --- /dev/null +++ b/lib/Model/ShippingDateTag.php @@ -0,0 +1,321 @@ + 'string', +'shipping_date' => '\Swagger\Client\Model\DateTimeRange' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null, +'shipping_date' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', +'shipping_date' => 'shipping_date' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', +'shipping_date' => 'setShippingDate' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', +'shipping_date' => 'getShippingDate' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['shipping_date'] = isset($data['shipping_date']) ? $data['shipping_date'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the category tag. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets shipping_date + * + * @return \Swagger\Client\Model\DateTimeRange + */ + public function getShippingDate() + { + return $this->container['shipping_date']; + } + + /** + * Sets shipping_date + * + * @param \Swagger\Client\Model\DateTimeRange $shipping_date shipping_date + * + * @return $this + */ + public function setShippingDate($shipping_date) + { + $this->container['shipping_date'] = $shipping_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ShippingLeg.php b/lib/Model/ShippingLeg.php new file mode 100644 index 0000000..bc9d2eb --- /dev/null +++ b/lib/Model/ShippingLeg.php @@ -0,0 +1,382 @@ + 'string', +'delivery_type' => 'string', +'from' => '\Swagger\Client\Model\LegLocation', +'to' => '\Swagger\Client\Model\LegLocation' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'shipping_method' => null, +'delivery_type' => null, +'from' => null, +'to' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'shipping_method' => 'shipping_method', +'delivery_type' => 'delivery_type', +'from' => 'from', +'to' => 'to' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'shipping_method' => 'setShippingMethod', +'delivery_type' => 'setDeliveryType', +'from' => 'setFrom', +'to' => 'setTo' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'shipping_method' => 'getShippingMethod', +'delivery_type' => 'getDeliveryType', +'from' => 'getFrom', +'to' => 'getTo' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['shipping_method'] = isset($data['shipping_method']) ? $data['shipping_method'] : null; + $this->container['delivery_type'] = isset($data['delivery_type']) ? $data['delivery_type'] : null; + $this->container['from'] = isset($data['from']) ? $data['from'] : null; + $this->container['to'] = isset($data['to']) ? $data['to'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets shipping_method + * + * @return string + */ + public function getShippingMethod() + { + return $this->container['shipping_method']; + } + + /** + * Sets shipping_method + * + * @param string $shipping_method shipping_method + * + * @return $this + */ + public function setShippingMethod($shipping_method) + { + $this->container['shipping_method'] = $shipping_method; + + return $this; + } + + /** + * Gets delivery_type + * + * @return string + */ + public function getDeliveryType() + { + return $this->container['delivery_type']; + } + + /** + * Sets delivery_type + * + * @param string $delivery_type delivery_type + * + * @return $this + */ + public function setDeliveryType($delivery_type) + { + $this->container['delivery_type'] = $delivery_type; + + return $this; + } + + /** + * Gets from + * + * @return \Swagger\Client\Model\LegLocation + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param \Swagger\Client\Model\LegLocation $from from + * + * @return $this + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return \Swagger\Client\Model\LegLocation + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \Swagger\Client\Model\LegLocation $to to + * + * @return $this + */ + public function setTo($to) + { + $this->container['to'] = $to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/SnippetConfiguration.php b/lib/Model/SnippetConfiguration.php new file mode 100644 index 0000000..7bfdef2 --- /dev/null +++ b/lib/Model/SnippetConfiguration.php @@ -0,0 +1,351 @@ + 'string', +'object_id' => 'string', +'loader_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'container_id' => null, +'object_id' => null, +'loader_id' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'container_id' => 'container_id', +'object_id' => 'object_id', +'loader_id' => 'loader_id' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'container_id' => 'setContainerId', +'object_id' => 'setObjectId', +'loader_id' => 'setLoaderId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'container_id' => 'getContainerId', +'object_id' => 'getObjectId', +'loader_id' => 'getLoaderId' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['container_id'] = isset($data['container_id']) ? $data['container_id'] : null; + $this->container['object_id'] = isset($data['object_id']) ? $data['object_id'] : null; + $this->container['loader_id'] = isset($data['loader_id']) ? $data['loader_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets container_id + * + * @return string + */ + public function getContainerId() + { + return $this->container['container_id']; + } + + /** + * Sets container_id + * + * @param string $container_id container_id + * + * @return $this + */ + public function setContainerId($container_id) + { + $this->container['container_id'] = $container_id; + + return $this; + } + + /** + * Gets object_id + * + * @return string + */ + public function getObjectId() + { + return $this->container['object_id']; + } + + /** + * Sets object_id + * + * @param string $object_id object_id + * + * @return $this + */ + public function setObjectId($object_id) + { + $this->container['object_id'] = $object_id; + + return $this; + } + + /** + * Gets loader_id + * + * @return string + */ + public function getLoaderId() + { + return $this->container['loader_id']; + } + + /** + * Sets loader_id + * + * @param string $loader_id loader_id + * + * @return $this + */ + public function setLoaderId($loader_id) + { + $this->container['loader_id'] = $loader_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/Supports.php b/lib/Model/Supports.php new file mode 100644 index 0000000..d91b666 --- /dev/null +++ b/lib/Model/Supports.php @@ -0,0 +1,382 @@ + 'bool', +'door_code' => 'bool', +'courier_instructions' => 'bool', +'customer_number' => 'bool' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'search' => null, +'door_code' => null, +'courier_instructions' => null, +'customer_number' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'search' => 'search', +'door_code' => 'door_code', +'courier_instructions' => 'courier_instructions', +'customer_number' => 'customer_number' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'search' => 'setSearch', +'door_code' => 'setDoorCode', +'courier_instructions' => 'setCourierInstructions', +'customer_number' => 'setCustomerNumber' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'search' => 'getSearch', +'door_code' => 'getDoorCode', +'courier_instructions' => 'getCourierInstructions', +'customer_number' => 'getCustomerNumber' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['search'] = isset($data['search']) ? $data['search'] : null; + $this->container['door_code'] = isset($data['door_code']) ? $data['door_code'] : null; + $this->container['courier_instructions'] = isset($data['courier_instructions']) ? $data['courier_instructions'] : null; + $this->container['customer_number'] = isset($data['customer_number']) ? $data['customer_number'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets search + * + * @return bool + */ + public function getSearch() + { + return $this->container['search']; + } + + /** + * Sets search + * + * @param bool $search search + * + * @return $this + */ + public function setSearch($search) + { + $this->container['search'] = $search; + + return $this; + } + + /** + * Gets door_code + * + * @return bool + */ + public function getDoorCode() + { + return $this->container['door_code']; + } + + /** + * Sets door_code + * + * @param bool $door_code Indicates if shipping option supports door code. If true, a door code input will be displayed in the shipping selector widget. Only applicable for home delivery type. + * + * @return $this + */ + public function setDoorCode($door_code) + { + $this->container['door_code'] = $door_code; + + return $this; + } + + /** + * Gets courier_instructions + * + * @return bool + */ + public function getCourierInstructions() + { + return $this->container['courier_instructions']; + } + + /** + * Sets courier_instructions + * + * @param bool $courier_instructions Indicates if shipping option supports courier notes. If true, a courier instructions input will be displayed in the shipping selector widget. Only applicable for home delivery type. + * + * @return $this + */ + public function setCourierInstructions($courier_instructions) + { + $this->container['courier_instructions'] = $courier_instructions; + + return $this; + } + + /** + * Gets customer_number + * + * @return bool + */ + public function getCustomerNumber() + { + return $this->container['customer_number']; + } + + /** + * Sets customer_number + * + * @param bool $customer_number Indicates if shipping option supports carrier specific customer number. If true, a carrier number input will be displayed in the shipping selector widget. Only applicable for DHL Germany at this moment, where customer has to provide a number that identifies a pickup locker. + * + * @return $this + */ + public function setCustomerNumber($customer_number) + { + $this->container['customer_number'] = $customer_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/Tag.php b/lib/Model/Tag.php new file mode 100644 index 0000000..cd15beb --- /dev/null +++ b/lib/Model/Tag.php @@ -0,0 +1,291 @@ + 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'name' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * 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['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/TimeSlot.php b/lib/Model/TimeSlot.php index 2bbd0df..6335f58 100644 --- a/lib/Model/TimeSlot.php +++ b/lib/Model/TimeSlot.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -216,8 +216,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } diff --git a/lib/Model/UpdateSessionRequest.php b/lib/Model/UpdateSessionRequest.php index 095b205..bb7d3fb 100644 --- a/lib/Model/UpdateSessionRequest.php +++ b/lib/Model/UpdateSessionRequest.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -61,7 +61,13 @@ class UpdateSessionRequest implements ModelInterface, ArrayAccess 'cart' => '\Swagger\Client\Model\Cart', 'customer' => '\Swagger\Client\Model\CustomerInfo', 'search_address' => '\Swagger\Client\Model\Address', -'external_id' => 'string' ]; +'external_id' => 'string', +'purchase_country' => 'string', +'purchase_currency' => 'string', +'locales' => 'string[]', +'meta' => 'map[string,string]', +'snippet_configuration' => '\Swagger\Client\Model\SnippetConfiguration', +'delivery_price_discount' => 'int' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -74,7 +80,13 @@ class UpdateSessionRequest implements ModelInterface, ArrayAccess 'cart' => null, 'customer' => null, 'search_address' => null, -'external_id' => null ]; +'external_id' => null, +'purchase_country' => null, +'purchase_currency' => null, +'locales' => null, +'meta' => null, +'snippet_configuration' => null, +'delivery_price_discount' => 'int32' ]; /** * Array of property to type mappings. Used for (de)serialization @@ -108,7 +120,13 @@ public static function swaggerFormats() 'cart' => 'cart', 'customer' => 'customer', 'search_address' => 'search_address', -'external_id' => 'external_id' ]; +'external_id' => 'external_id', +'purchase_country' => 'purchase_country', +'purchase_currency' => 'purchase_currency', +'locales' => 'locales', +'meta' => 'meta', +'snippet_configuration' => 'snippet_configuration', +'delivery_price_discount' => 'delivery_price_discount' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -121,7 +139,13 @@ public static function swaggerFormats() 'cart' => 'setCart', 'customer' => 'setCustomer', 'search_address' => 'setSearchAddress', -'external_id' => 'setExternalId' ]; +'external_id' => 'setExternalId', +'purchase_country' => 'setPurchaseCountry', +'purchase_currency' => 'setPurchaseCurrency', +'locales' => 'setLocales', +'meta' => 'setMeta', +'snippet_configuration' => 'setSnippetConfiguration', +'delivery_price_discount' => 'setDeliveryPriceDiscount' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -134,7 +158,13 @@ public static function swaggerFormats() 'cart' => 'getCart', 'customer' => 'getCustomer', 'search_address' => 'getSearchAddress', -'external_id' => 'getExternalId' ]; +'external_id' => 'getExternalId', +'purchase_country' => 'getPurchaseCountry', +'purchase_currency' => 'getPurchaseCurrency', +'locales' => 'getLocales', +'meta' => 'getMeta', +'snippet_configuration' => 'getSnippetConfiguration', +'delivery_price_discount' => 'getDeliveryPriceDiscount' ]; /** * Array of attributes where the key is the local name, @@ -200,6 +230,12 @@ public function __construct(array $data = null) $this->container['customer'] = isset($data['customer']) ? $data['customer'] : null; $this->container['search_address'] = isset($data['search_address']) ? $data['search_address'] : null; $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; + $this->container['purchase_country'] = isset($data['purchase_country']) ? $data['purchase_country'] : null; + $this->container['purchase_currency'] = isset($data['purchase_currency']) ? $data['purchase_currency'] : null; + $this->container['locales'] = isset($data['locales']) ? $data['locales'] : null; + $this->container['meta'] = isset($data['meta']) ? $data['meta'] : null; + $this->container['snippet_configuration'] = isset($data['snippet_configuration']) ? $data['snippet_configuration'] : null; + $this->container['delivery_price_discount'] = isset($data['delivery_price_discount']) ? $data['delivery_price_discount'] : null; } /** @@ -222,8 +258,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -370,6 +405,150 @@ public function setExternalId($external_id) return $this; } + + /** + * Gets purchase_country + * + * @return string + */ + public function getPurchaseCountry() + { + return $this->container['purchase_country']; + } + + /** + * Sets purchase_country + * + * @param string $purchase_country purchase_country + * + * @return $this + */ + public function setPurchaseCountry($purchase_country) + { + $this->container['purchase_country'] = $purchase_country; + + return $this; + } + + /** + * Gets purchase_currency + * + * @return string + */ + public function getPurchaseCurrency() + { + return $this->container['purchase_currency']; + } + + /** + * Sets purchase_currency + * + * @param string $purchase_currency purchase_currency + * + * @return $this + */ + public function setPurchaseCurrency($purchase_currency) + { + $this->container['purchase_currency'] = $purchase_currency; + + return $this; + } + + /** + * Gets locales + * + * @return string[] + */ + public function getLocales() + { + return $this->container['locales']; + } + + /** + * Sets locales + * + * @param string[] $locales locales + * + * @return $this + */ + public function setLocales($locales) + { + $this->container['locales'] = $locales; + + return $this; + } + + /** + * Gets meta + * + * @return map[string,string] + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param map[string,string] $meta Generic key/value object that is used for supplying complementing information. + * + * @return $this + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets snippet_configuration + * + * @return \Swagger\Client\Model\SnippetConfiguration + */ + public function getSnippetConfiguration() + { + return $this->container['snippet_configuration']; + } + + /** + * Sets snippet_configuration + * + * @param \Swagger\Client\Model\SnippetConfiguration $snippet_configuration snippet_configuration + * + * @return $this + */ + public function setSnippetConfiguration($snippet_configuration) + { + $this->container['snippet_configuration'] = $snippet_configuration; + + return $this; + } + + /** + * Gets delivery_price_discount + * + * @return int + */ + public function getDeliveryPriceDiscount() + { + return $this->container['delivery_price_discount']; + } + + /** + * Sets delivery_price_discount + * + * @param int $delivery_price_discount Reduces the price with the given amount for all delivery options presented to the consumer. Prices that would go below zero is set to zero. + * + * @return $this + */ + public function setDeliveryPriceDiscount($delivery_price_discount) + { + $this->container['delivery_price_discount'] = $delivery_price_discount; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateSessionResponse.php b/lib/Model/UpdateSessionResponse.php index d0863ac..c88e3dc 100644 --- a/lib/Model/UpdateSessionResponse.php +++ b/lib/Model/UpdateSessionResponse.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -56,7 +56,8 @@ class UpdateSessionResponse implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'session' => '\Swagger\Client\Model\Session' ]; + 'session' => '\Swagger\Client\Model\Session', +'html_snippet' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -64,7 +65,8 @@ class UpdateSessionResponse implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'session' => null ]; + 'session' => null, +'html_snippet' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -93,7 +95,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'session' => 'session' ]; + 'session' => 'session', +'html_snippet' => 'html_snippet' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -101,7 +104,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'session' => 'setSession' ]; + 'session' => 'setSession', +'html_snippet' => 'setHtmlSnippet' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -109,7 +113,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'session' => 'getSession' ]; + 'session' => 'getSession', +'html_snippet' => 'getHtmlSnippet' ]; /** * Array of attributes where the key is the local name, @@ -170,6 +175,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['session'] = isset($data['session']) ? $data['session'] : null; + $this->container['html_snippet'] = isset($data['html_snippet']) ? $data['html_snippet'] : null; } /** @@ -192,8 +198,7 @@ public function listInvalidProperties() */ public function valid() { - - return true; + return count($this->listInvalidProperties()) === 0; } @@ -220,6 +225,30 @@ public function setSession($session) return $this; } + + /** + * Gets html_snippet + * + * @return string + */ + public function getHtmlSnippet() + { + return $this->container['html_snippet']; + } + + /** + * Sets html_snippet + * + * @param string $html_snippet html_snippet + * + * @return $this + */ + public function setHtmlSnippet($html_snippet) + { + $this->container['html_snippet'] = $html_snippet; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 092328d..d4db88a 100755 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -11,14 +11,14 @@ */ /** -* SIW API + * SIW API * -* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * -* OpenAPI spec version: 1.0 + * OpenAPI spec version: 1.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 3.0.4 + * Swagger Codegen version: 3.0.24 */ /** * NOTE: This class is auto generated by the swagger code generator program. @@ -42,12 +42,11 @@ class ObjectSerializer * Serialize data * * @param mixed $data the data to serialize - * @param string $type the SwaggerType of the data * @param string $format the format of the Swagger type of the data * * @return string|object serialized form of $data */ - public static function sanitizeForSerialization($data, $type = null, $format = null) + public static function sanitizeForSerialization($data, $format = null) { if (is_scalar($data) || null === $data) { return $data; @@ -118,22 +117,23 @@ public static function toPathValue($value) * later. * * @param string[]|string|\DateTime $object an object to be serialized to a string + * @param string|null $format the format of the parameter * * @return string the serialized object */ - public static function toQueryValue($object) + public static function toQueryValue($object, $format = null) { if (is_array($object)) { return implode(',', $object); } else { - return self::toString($object); + return self::toString($object, $format); } } /** * Take value and turn it into a string suitable for inclusion in * the header. If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 + * If it's a datetime object, format it in RFC3339 * * @param string $value a string which will be part of the header * @@ -147,7 +147,7 @@ public static function toHeaderValue($value) /** * Take value and turn it into a string suitable for inclusion in * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 + * If it's a datetime object, format it in RFC3339 * * @param string|\SplFileObject $value the value of the form parameter * @@ -165,16 +165,18 @@ public static function toFormValue($value) /** * Take value and turn it into a string suitable for inclusion in * the parameter. If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 + * If it's a datetime object, format it in RFC3339 + * If it's a date, format it in Y-m-d * * @param string|\DateTime $value the value of the parameter + * @param string|null $format the format of the parameter * * @return string the header string */ - public static function toString($value) + public static function toString($value, $format = null) { - if ($value instanceof \DateTime) { // datetime in ISO8601 format - return $value->format(\DateTime::ATOM); + if ($value instanceof \DateTime) { + return ($format === 'date') ? $value->format('Y-m-d') : $value->format(\DateTime::ATOM); } else { return $value; } @@ -270,7 +272,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . self::sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } @@ -292,7 +294,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = 'Swagger\Client\Model\\' . $data->{$discriminator}; + $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; if (is_subclass_of($subclass, $class)) { $class = $subclass; }