From c240376e177b9097cb2e3ce551153571bd325dbe Mon Sep 17 00:00:00 2001 From: Simon Schurter Date: Thu, 17 Dec 2020 11:16:13 +0100 Subject: [PATCH] Release 2.1.5 --- composer.json | 2 +- lib/ApiClient.php | 2 +- lib/Configuration.php | 6 +- lib/Http/SocketHttpClient.php | 5 + lib/Model/AbstractPaymentLinkUpdate.php | 56 ++--- lib/Model/AccountCreate.php | 8 + lib/Model/AccountUpdate.php | 8 + lib/Model/ApplicationUser.php | 42 +--- lib/Model/ApplicationUserCreate.php | 4 + lib/Model/ApplicationUserCreateWithMacKey.php | 4 + lib/Model/ApplicationUserUpdate.php | 4 + lib/Model/Charge.php | 32 --- lib/Model/ChargeAttempt.php | 32 --- lib/Model/ChargeFlowLevel.php | 32 --- lib/Model/ChargeFlowLevelPaymentLink.php | 32 --- lib/Model/ConnectorInvocation.php | 32 --- lib/Model/CustomerActive.php | 16 ++ lib/Model/CustomerCommentActive.php | 4 + lib/Model/CustomerCommentCreate.php | 4 + lib/Model/CustomerCreate.php | 16 ++ lib/Model/DeliveryIndication.php | 32 --- lib/Model/HumanUserCreate.php | 16 ++ lib/Model/HumanUserUpdate.php | 16 ++ lib/Model/PaymentLink.php | 56 ++--- lib/Model/PaymentLinkActive.php | 10 + lib/Model/PaymentLinkAddressHandlingMode.php | 56 +++++ lib/Model/PaymentLinkCreate.php | 4 + lib/Model/PaymentLinkUpdate.php | 56 ++--- lib/Model/PaymentTerminalContactAddress.php | 153 ++---------- lib/Model/RefundCommentActive.php | 4 + lib/Model/RefundCommentCreate.php | 4 + lib/Model/ShopifyTransaction.php | 32 --- lib/Model/SpaceCreate.php | 8 + lib/Model/SpaceUpdate.php | 8 + lib/Model/TokenCreate.php | 8 + lib/Model/TokenUpdate.php | 8 + lib/Model/Transaction.php | 202 +++++++++++++++- lib/Model/TransactionCommentActive.php | 4 + lib/Model/TransactionCommentCreate.php | 4 + lib/Model/TransactionCompletion.php | 32 --- lib/Model/TransactionCreate.php | 176 ++++---------- lib/Model/TransactionInvoice.php | 32 --- lib/Model/TransactionInvoiceCommentActive.php | 4 + lib/Model/TransactionInvoiceCommentCreate.php | 4 + lib/Model/TransactionLineItemVersion.php | 32 --- lib/Model/TransactionPending.php | 32 +++ lib/Model/TransactionVoid.php | 32 --- lib/Model/WebhookListenerCreate.php | 4 + lib/Model/WebhookListenerUpdate.php | 4 + lib/Model/WebhookUrlCreate.php | 12 + lib/Model/WebhookUrlUpdate.php | 12 + lib/Service/TokenService.php | 226 ++++++++++++++++++ test/ApiClientTest.php | 31 ++- test/RefundServiceTest.php | 3 +- test/TransactionCompletionServiceTest.php | 3 +- test/TransactionServiceTest.php | 1 + 56 files changed, 911 insertions(+), 751 deletions(-) create mode 100644 lib/Model/PaymentLinkAddressHandlingMode.php diff --git a/composer.json b/composer.json index 2ac51a5..f3c7598 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "postfinancecheckout/sdk", - "version": "2.1.4", + "version": "2.1.5", "description": "PostFinance Checkout SDK for PHP", "keywords": [ "postfinancecheckout", diff --git a/lib/ApiClient.php b/lib/ApiClient.php index 84ee0cc..c97eae0 100644 --- a/lib/ApiClient.php +++ b/lib/ApiClient.php @@ -54,7 +54,7 @@ final class ApiClient { * * @var string */ - private $userAgent = 'PHP-Client/2.1.4/php'; + private $userAgent = 'PHP-Client/2.1.5/php'; /** * The path to the certificate authority file. diff --git a/lib/Configuration.php b/lib/Configuration.php index abc04d5..a9e295f 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -80,7 +80,7 @@ class Configuration * * @var string */ - protected $userAgent = 'PostFinanceCheckout\Sdk/2.1.4/php'; + protected $userAgent = 'PostFinanceCheckout\Sdk/2.1.5/php'; /** * Debug switch (default set to false) @@ -388,8 +388,8 @@ public static function toDebugReport() $report = 'PHP SDK (PostFinanceCheckout\Sdk) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 2.1.4' . PHP_EOL; - $report .= ' SDK Package Version: 2.1.4' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 2.1.5' . PHP_EOL; + $report .= ' SDK Package Version: 2.1.5' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Http/SocketHttpClient.php b/lib/Http/SocketHttpClient.php index 9910781..47e20b5 100644 --- a/lib/Http/SocketHttpClient.php +++ b/lib/Http/SocketHttpClient.php @@ -103,6 +103,11 @@ private function readFromSocket(ApiClient $apiClient, HttpRequest $request, $soc } $responseMessage .= $line; } else { + // If the content of the response is empty, there is nothing to be read. + if ($contentLength == 0) { + $endReached = true; + break; + } // Check if we can read without chunks if (!$chunked) { $readBytes = 4096; diff --git a/lib/Model/AbstractPaymentLinkUpdate.php b/lib/Model/AbstractPaymentLinkUpdate.php index a19f9e5..3227a3d 100644 --- a/lib/Model/AbstractPaymentLinkUpdate.php +++ b/lib/Model/AbstractPaymentLinkUpdate.php @@ -52,13 +52,13 @@ class AbstractPaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'int', 'available_from' => '\DateTime', 'available_until' => '\DateTime', - 'billing_address_required' => 'bool', + 'billing_address_handling_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode', 'currency' => 'string', 'language' => 'string', 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItemCreate[]', 'maximal_number_of_transactions' => 'int', 'name' => 'string', - 'shipping_address_required' => 'bool' + 'shipping_address_handling_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode' ]; /** @@ -71,13 +71,13 @@ class AbstractPaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'int64', 'available_from' => 'date-time', 'available_until' => 'date-time', - 'billing_address_required' => null, + 'billing_address_handling_mode' => null, 'currency' => null, 'language' => null, 'line_items' => null, 'maximal_number_of_transactions' => 'int32', 'name' => null, - 'shipping_address_required' => null + 'shipping_address_handling_mode' => null ]; /** @@ -91,13 +91,13 @@ class AbstractPaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'appliedSpaceView', 'available_from' => 'availableFrom', 'available_until' => 'availableUntil', - 'billing_address_required' => 'billingAddressRequired', + 'billing_address_handling_mode' => 'billingAddressHandlingMode', 'currency' => 'currency', 'language' => 'language', 'line_items' => 'lineItems', 'maximal_number_of_transactions' => 'maximalNumberOfTransactions', 'name' => 'name', - 'shipping_address_required' => 'shippingAddressRequired' + 'shipping_address_handling_mode' => 'shippingAddressHandlingMode' ]; /** @@ -110,13 +110,13 @@ class AbstractPaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'setAppliedSpaceView', 'available_from' => 'setAvailableFrom', 'available_until' => 'setAvailableUntil', - 'billing_address_required' => 'setBillingAddressRequired', + 'billing_address_handling_mode' => 'setBillingAddressHandlingMode', 'currency' => 'setCurrency', 'language' => 'setLanguage', 'line_items' => 'setLineItems', 'maximal_number_of_transactions' => 'setMaximalNumberOfTransactions', 'name' => 'setName', - 'shipping_address_required' => 'setShippingAddressRequired' + 'shipping_address_handling_mode' => 'setShippingAddressHandlingMode' ]; /** @@ -129,13 +129,13 @@ class AbstractPaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'getAppliedSpaceView', 'available_from' => 'getAvailableFrom', 'available_until' => 'getAvailableUntil', - 'billing_address_required' => 'getBillingAddressRequired', + 'billing_address_handling_mode' => 'getBillingAddressHandlingMode', 'currency' => 'getCurrency', 'language' => 'getLanguage', 'line_items' => 'getLineItems', 'maximal_number_of_transactions' => 'getMaximalNumberOfTransactions', 'name' => 'getName', - 'shipping_address_required' => 'getShippingAddressRequired' + 'shipping_address_handling_mode' => 'getShippingAddressHandlingMode' ]; @@ -164,7 +164,7 @@ public function __construct(array $data = null) $this->container['available_until'] = isset($data['available_until']) ? $data['available_until'] : null; - $this->container['billing_address_required'] = isset($data['billing_address_required']) ? $data['billing_address_required'] : null; + $this->container['billing_address_handling_mode'] = isset($data['billing_address_handling_mode']) ? $data['billing_address_handling_mode'] : null; $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; @@ -176,7 +176,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['shipping_address_required'] = isset($data['shipping_address_required']) ? $data['shipping_address_required'] : null; + $this->container['shipping_address_handling_mode'] = isset($data['shipping_address_handling_mode']) ? $data['shipping_address_handling_mode'] : null; } @@ -374,25 +374,25 @@ public function setAvailableUntil($available_until) /** - * Gets billing_address_required + * Gets billing_address_handling_mode * - * @return bool + * @return \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode */ - public function getBillingAddressRequired() + public function getBillingAddressHandlingMode() { - return $this->container['billing_address_required']; + return $this->container['billing_address_handling_mode']; } /** - * Sets billing_address_required + * Sets billing_address_handling_mode * - * @param bool $billing_address_required By making the billing address required the transaction can only be created when a billing address is provided within the request. + * @param \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode $billing_address_handling_mode The billing address handling mode controls if the address is collected or not and how it is collected. * * @return $this */ - public function setBillingAddressRequired($billing_address_required) + public function setBillingAddressHandlingMode($billing_address_handling_mode) { - $this->container['billing_address_required'] = $billing_address_required; + $this->container['billing_address_handling_mode'] = $billing_address_handling_mode; return $this; } @@ -528,25 +528,25 @@ public function setName($name) /** - * Gets shipping_address_required + * Gets shipping_address_handling_mode * - * @return bool + * @return \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode */ - public function getShippingAddressRequired() + public function getShippingAddressHandlingMode() { - return $this->container['shipping_address_required']; + return $this->container['shipping_address_handling_mode']; } /** - * Sets shipping_address_required + * Sets shipping_address_handling_mode * - * @param bool $shipping_address_required By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * @param \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode $shipping_address_handling_mode The shipping address handling mode controls if the address is collected or not and how it is collected. * * @return $this */ - public function setShippingAddressRequired($shipping_address_required) + public function setShippingAddressHandlingMode($shipping_address_handling_mode) { - $this->container['shipping_address_required'] = $shipping_address_required; + $this->container['shipping_address_handling_mode'] = $shipping_address_handling_mode; return $this; } diff --git a/lib/Model/AccountCreate.php b/lib/Model/AccountCreate.php index 86f4332..b532984 100644 --- a/lib/Model/AccountCreate.php +++ b/lib/Model/AccountCreate.php @@ -121,6 +121,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 3)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 3."; + } + if ($this->container['scope'] === null) { $invalidProperties[] = "'scope' can't be null"; } diff --git a/lib/Model/AccountUpdate.php b/lib/Model/AccountUpdate.php index bc478f8..67e1306 100644 --- a/lib/Model/AccountUpdate.php +++ b/lib/Model/AccountUpdate.php @@ -121,6 +121,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 3)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 3."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/ApplicationUser.php b/lib/Model/ApplicationUser.php index 8692510..9fa6cfb 100644 --- a/lib/Model/ApplicationUser.php +++ b/lib/Model/ApplicationUser.php @@ -49,8 +49,7 @@ class ApplicationUser extends User protected static $swaggerTypes = [ 'name' => 'string', 'primary_account' => '\PostFinanceCheckout\Sdk\Model\Account', - 'request_limit' => 'int', - 'scope' => '\PostFinanceCheckout\Sdk\Model\Scope' + 'request_limit' => 'int' ]; /** @@ -61,8 +60,7 @@ class ApplicationUser extends User protected static $swaggerFormats = [ 'name' => null, 'primary_account' => null, - 'request_limit' => 'int64', - 'scope' => null + 'request_limit' => 'int64' ]; /** @@ -74,8 +72,7 @@ class ApplicationUser extends User protected static $attributeMap = [ 'name' => 'name', 'primary_account' => 'primaryAccount', - 'request_limit' => 'requestLimit', - 'scope' => 'scope' + 'request_limit' => 'requestLimit' ]; /** @@ -86,8 +83,7 @@ class ApplicationUser extends User protected static $setters = [ 'name' => 'setName', 'primary_account' => 'setPrimaryAccount', - 'request_limit' => 'setRequestLimit', - 'scope' => 'setScope' + 'request_limit' => 'setRequestLimit' ]; /** @@ -98,8 +94,7 @@ class ApplicationUser extends User protected static $getters = [ 'name' => 'getName', 'primary_account' => 'getPrimaryAccount', - 'request_limit' => 'getRequestLimit', - 'scope' => 'getScope' + 'request_limit' => 'getRequestLimit' ]; @@ -122,8 +117,6 @@ public function __construct(array $data = null) $this->container['request_limit'] = isset($data['request_limit']) ? $data['request_limit'] : null; - $this->container['scope'] = isset($data['scope']) ? $data['scope'] : null; - } /** @@ -297,31 +290,6 @@ public function setRequestLimit($request_limit) return $this; } - - /** - * Gets scope - * - * @return \PostFinanceCheckout\Sdk\Model\Scope - */ - public function getScope() - { - return $this->container['scope']; - } - - /** - * Sets scope - * - * @param \PostFinanceCheckout\Sdk\Model\Scope $scope The scope to which the user belongs to. - * - * @return $this - */ - public function setScope($scope) - { - $this->container['scope'] = $scope; - - return $this; - } - /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ApplicationUserCreate.php b/lib/Model/ApplicationUserCreate.php index d945bb1..f5da3f3 100644 --- a/lib/Model/ApplicationUserCreate.php +++ b/lib/Model/ApplicationUserCreate.php @@ -114,6 +114,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 256)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 256."; + } + if ($this->container['primary_account'] === null) { $invalidProperties[] = "'primary_account' can't be null"; } diff --git a/lib/Model/ApplicationUserCreateWithMacKey.php b/lib/Model/ApplicationUserCreateWithMacKey.php index efdd1d4..760135e 100644 --- a/lib/Model/ApplicationUserCreateWithMacKey.php +++ b/lib/Model/ApplicationUserCreateWithMacKey.php @@ -114,6 +114,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 256)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 256."; + } + return $invalidProperties; } diff --git a/lib/Model/ApplicationUserUpdate.php b/lib/Model/ApplicationUserUpdate.php index 61a509c..46c6188 100644 --- a/lib/Model/ApplicationUserUpdate.php +++ b/lib/Model/ApplicationUserUpdate.php @@ -121,6 +121,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 256)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 256."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/Charge.php b/lib/Model/Charge.php index 002027a..dd47972 100644 --- a/lib/Model/Charge.php +++ b/lib/Model/Charge.php @@ -50,7 +50,6 @@ class Charge extends TransactionAwareEntity 'created_on' => '\DateTime', 'failure_reason' => '\PostFinanceCheckout\Sdk\Model\FailureReason', 'language' => 'string', - 'linked_space_id' => 'int', 'planned_purge_date' => '\DateTime', 'space_view_id' => 'int', 'state' => '\PostFinanceCheckout\Sdk\Model\ChargeState', @@ -71,7 +70,6 @@ class Charge extends TransactionAwareEntity 'created_on' => 'date-time', 'failure_reason' => null, 'language' => null, - 'linked_space_id' => 'int64', 'planned_purge_date' => 'date-time', 'space_view_id' => 'int64', 'state' => null, @@ -93,7 +91,6 @@ class Charge extends TransactionAwareEntity 'created_on' => 'createdOn', 'failure_reason' => 'failureReason', 'language' => 'language', - 'linked_space_id' => 'linkedSpaceId', 'planned_purge_date' => 'plannedPurgeDate', 'space_view_id' => 'spaceViewId', 'state' => 'state', @@ -114,7 +111,6 @@ class Charge extends TransactionAwareEntity 'created_on' => 'setCreatedOn', 'failure_reason' => 'setFailureReason', 'language' => 'setLanguage', - 'linked_space_id' => 'setLinkedSpaceId', 'planned_purge_date' => 'setPlannedPurgeDate', 'space_view_id' => 'setSpaceViewId', 'state' => 'setState', @@ -135,7 +131,6 @@ class Charge extends TransactionAwareEntity 'created_on' => 'getCreatedOn', 'failure_reason' => 'getFailureReason', 'language' => 'getLanguage', - 'linked_space_id' => 'getLinkedSpaceId', 'planned_purge_date' => 'getPlannedPurgeDate', 'space_view_id' => 'getSpaceViewId', 'state' => 'getState', @@ -167,8 +162,6 @@ public function __construct(array $data = null) $this->container['language'] = isset($data['language']) ? $data['language'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; $this->container['space_view_id'] = isset($data['space_view_id']) ? $data['space_view_id'] : null; @@ -353,31 +346,6 @@ public function setLanguage($language) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets planned_purge_date * diff --git a/lib/Model/ChargeAttempt.php b/lib/Model/ChargeAttempt.php index 0758268..3f45629 100644 --- a/lib/Model/ChargeAttempt.php +++ b/lib/Model/ChargeAttempt.php @@ -58,7 +58,6 @@ class ChargeAttempt extends TransactionAwareEntity 'invocation' => '\PostFinanceCheckout\Sdk\Model\ConnectorInvocation', 'labels' => '\PostFinanceCheckout\Sdk\Model\Label[]', 'language' => 'string', - 'linked_space_id' => 'int', 'next_update_on' => '\DateTime', 'planned_purge_date' => '\DateTime', 'redirection_url' => 'string', @@ -91,7 +90,6 @@ class ChargeAttempt extends TransactionAwareEntity 'invocation' => null, 'labels' => null, 'language' => null, - 'linked_space_id' => 'int64', 'next_update_on' => 'date-time', 'planned_purge_date' => 'date-time', 'redirection_url' => null, @@ -125,7 +123,6 @@ class ChargeAttempt extends TransactionAwareEntity 'invocation' => 'invocation', 'labels' => 'labels', 'language' => 'language', - 'linked_space_id' => 'linkedSpaceId', 'next_update_on' => 'nextUpdateOn', 'planned_purge_date' => 'plannedPurgeDate', 'redirection_url' => 'redirectionUrl', @@ -158,7 +155,6 @@ class ChargeAttempt extends TransactionAwareEntity 'invocation' => 'setInvocation', 'labels' => 'setLabels', 'language' => 'setLanguage', - 'linked_space_id' => 'setLinkedSpaceId', 'next_update_on' => 'setNextUpdateOn', 'planned_purge_date' => 'setPlannedPurgeDate', 'redirection_url' => 'setRedirectionUrl', @@ -191,7 +187,6 @@ class ChargeAttempt extends TransactionAwareEntity 'invocation' => 'getInvocation', 'labels' => 'getLabels', 'language' => 'getLanguage', - 'linked_space_id' => 'getLinkedSpaceId', 'next_update_on' => 'getNextUpdateOn', 'planned_purge_date' => 'getPlannedPurgeDate', 'redirection_url' => 'getRedirectionUrl', @@ -243,8 +238,6 @@ public function __construct(array $data = null) $this->container['language'] = isset($data['language']) ? $data['language'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['next_update_on'] = isset($data['next_update_on']) ? $data['next_update_on'] : null; $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; @@ -641,31 +634,6 @@ public function setLanguage($language) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets next_update_on * diff --git a/lib/Model/ChargeFlowLevel.php b/lib/Model/ChargeFlowLevel.php index ad72f3a..460886c 100644 --- a/lib/Model/ChargeFlowLevel.php +++ b/lib/Model/ChargeFlowLevel.php @@ -50,7 +50,6 @@ class ChargeFlowLevel extends TransactionAwareEntity 'asynchronous_charge' => 'int', 'configuration' => '\PostFinanceCheckout\Sdk\Model\ChargeFlowLevelConfiguration', 'created_on' => '\DateTime', - 'linked_space_id' => 'int', 'planned_purge_date' => '\DateTime', 'state' => '\PostFinanceCheckout\Sdk\Model\ChargeFlowLevelState', 'synchronous_charge' => 'int', @@ -69,7 +68,6 @@ class ChargeFlowLevel extends TransactionAwareEntity 'asynchronous_charge' => 'int64', 'configuration' => null, 'created_on' => 'date-time', - 'linked_space_id' => 'int64', 'planned_purge_date' => 'date-time', 'state' => null, 'synchronous_charge' => 'int64', @@ -89,7 +87,6 @@ class ChargeFlowLevel extends TransactionAwareEntity 'asynchronous_charge' => 'asynchronousCharge', 'configuration' => 'configuration', 'created_on' => 'createdOn', - 'linked_space_id' => 'linkedSpaceId', 'planned_purge_date' => 'plannedPurgeDate', 'state' => 'state', 'synchronous_charge' => 'synchronousCharge', @@ -108,7 +105,6 @@ class ChargeFlowLevel extends TransactionAwareEntity 'asynchronous_charge' => 'setAsynchronousCharge', 'configuration' => 'setConfiguration', 'created_on' => 'setCreatedOn', - 'linked_space_id' => 'setLinkedSpaceId', 'planned_purge_date' => 'setPlannedPurgeDate', 'state' => 'setState', 'synchronous_charge' => 'setSynchronousCharge', @@ -127,7 +123,6 @@ class ChargeFlowLevel extends TransactionAwareEntity 'asynchronous_charge' => 'getAsynchronousCharge', 'configuration' => 'getConfiguration', 'created_on' => 'getCreatedOn', - 'linked_space_id' => 'getLinkedSpaceId', 'planned_purge_date' => 'getPlannedPurgeDate', 'state' => 'getState', 'synchronous_charge' => 'getSynchronousCharge', @@ -157,8 +152,6 @@ public function __construct(array $data = null) $this->container['created_on'] = isset($data['created_on']) ? $data['created_on'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; $this->container['state'] = isset($data['state']) ? $data['state'] : null; @@ -339,31 +332,6 @@ public function setCreatedOn($created_on) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets planned_purge_date * diff --git a/lib/Model/ChargeFlowLevelPaymentLink.php b/lib/Model/ChargeFlowLevelPaymentLink.php index 302ee37..5e6da47 100644 --- a/lib/Model/ChargeFlowLevelPaymentLink.php +++ b/lib/Model/ChargeFlowLevelPaymentLink.php @@ -48,7 +48,6 @@ class ChargeFlowLevelPaymentLink extends TransactionAwareEntity */ protected static $swaggerTypes = [ 'charge_flow_level' => '\PostFinanceCheckout\Sdk\Model\ChargeFlowLevel', - 'linked_space_id' => 'int', 'payment_link' => 'string' ]; @@ -59,7 +58,6 @@ class ChargeFlowLevelPaymentLink extends TransactionAwareEntity */ protected static $swaggerFormats = [ 'charge_flow_level' => null, - 'linked_space_id' => 'int64', 'payment_link' => null ]; @@ -71,7 +69,6 @@ class ChargeFlowLevelPaymentLink extends TransactionAwareEntity */ protected static $attributeMap = [ 'charge_flow_level' => 'chargeFlowLevel', - 'linked_space_id' => 'linkedSpaceId', 'payment_link' => 'paymentLink' ]; @@ -82,7 +79,6 @@ class ChargeFlowLevelPaymentLink extends TransactionAwareEntity */ protected static $setters = [ 'charge_flow_level' => 'setChargeFlowLevel', - 'linked_space_id' => 'setLinkedSpaceId', 'payment_link' => 'setPaymentLink' ]; @@ -93,7 +89,6 @@ class ChargeFlowLevelPaymentLink extends TransactionAwareEntity */ protected static $getters = [ 'charge_flow_level' => 'getChargeFlowLevel', - 'linked_space_id' => 'getLinkedSpaceId', 'payment_link' => 'getPaymentLink' ]; @@ -113,8 +108,6 @@ public function __construct(array $data = null) $this->container['charge_flow_level'] = isset($data['charge_flow_level']) ? $data['charge_flow_level'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['payment_link'] = isset($data['payment_link']) ? $data['payment_link'] : null; } @@ -233,31 +226,6 @@ public function setChargeFlowLevel($charge_flow_level) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets payment_link * diff --git a/lib/Model/ConnectorInvocation.php b/lib/Model/ConnectorInvocation.php index 304dc12..fdbb07b 100644 --- a/lib/Model/ConnectorInvocation.php +++ b/lib/Model/ConnectorInvocation.php @@ -48,7 +48,6 @@ class ConnectorInvocation extends TransactionAwareEntity */ protected static $swaggerTypes = [ 'created_on' => '\DateTime', - 'linked_space_id' => 'int', 'planned_purge_date' => '\DateTime', 'stage' => '\PostFinanceCheckout\Sdk\Model\ConnectorInvocationStage', 'time_took_in_milliseconds' => 'int', @@ -63,7 +62,6 @@ class ConnectorInvocation extends TransactionAwareEntity */ protected static $swaggerFormats = [ 'created_on' => 'date-time', - 'linked_space_id' => 'int64', 'planned_purge_date' => 'date-time', 'stage' => null, 'time_took_in_milliseconds' => 'int64', @@ -79,7 +77,6 @@ class ConnectorInvocation extends TransactionAwareEntity */ protected static $attributeMap = [ 'created_on' => 'createdOn', - 'linked_space_id' => 'linkedSpaceId', 'planned_purge_date' => 'plannedPurgeDate', 'stage' => 'stage', 'time_took_in_milliseconds' => 'timeTookInMilliseconds', @@ -94,7 +91,6 @@ class ConnectorInvocation extends TransactionAwareEntity */ protected static $setters = [ 'created_on' => 'setCreatedOn', - 'linked_space_id' => 'setLinkedSpaceId', 'planned_purge_date' => 'setPlannedPurgeDate', 'stage' => 'setStage', 'time_took_in_milliseconds' => 'setTimeTookInMilliseconds', @@ -109,7 +105,6 @@ class ConnectorInvocation extends TransactionAwareEntity */ protected static $getters = [ 'created_on' => 'getCreatedOn', - 'linked_space_id' => 'getLinkedSpaceId', 'planned_purge_date' => 'getPlannedPurgeDate', 'stage' => 'getStage', 'time_took_in_milliseconds' => 'getTimeTookInMilliseconds', @@ -133,8 +128,6 @@ public function __construct(array $data = null) $this->container['created_on'] = isset($data['created_on']) ? $data['created_on'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; $this->container['stage'] = isset($data['stage']) ? $data['stage'] : null; @@ -261,31 +254,6 @@ public function setCreatedOn($created_on) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets planned_purge_date * diff --git a/lib/Model/CustomerActive.php b/lib/Model/CustomerActive.php index 0fc04c5..b37506f 100644 --- a/lib/Model/CustomerActive.php +++ b/lib/Model/CustomerActive.php @@ -121,6 +121,22 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['customer_id']) && (mb_strlen($this->container['customer_id']) > 100)) { + $invalidProperties[] = "invalid value for 'customer_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 254)) { + $invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 254."; + } + + if (!is_null($this->container['family_name']) && (mb_strlen($this->container['family_name']) > 100)) { + $invalidProperties[] = "invalid value for 'family_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['given_name']) && (mb_strlen($this->container['given_name']) > 100)) { + $invalidProperties[] = "invalid value for 'given_name', the character length must be smaller than or equal to 100."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/CustomerCommentActive.php b/lib/Model/CustomerCommentActive.php index c81aaec..68a13a8 100644 --- a/lib/Model/CustomerCommentActive.php +++ b/lib/Model/CustomerCommentActive.php @@ -121,6 +121,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/CustomerCommentCreate.php b/lib/Model/CustomerCommentCreate.php index 2599826..eb6f8cd 100644 --- a/lib/Model/CustomerCommentCreate.php +++ b/lib/Model/CustomerCommentCreate.php @@ -114,6 +114,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['customer'] === null) { $invalidProperties[] = "'customer' can't be null"; } diff --git a/lib/Model/CustomerCreate.php b/lib/Model/CustomerCreate.php index 9cf476f..93ebbdc 100644 --- a/lib/Model/CustomerCreate.php +++ b/lib/Model/CustomerCreate.php @@ -112,6 +112,22 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['customer_id']) && (mb_strlen($this->container['customer_id']) > 100)) { + $invalidProperties[] = "invalid value for 'customer_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 254)) { + $invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 254."; + } + + if (!is_null($this->container['family_name']) && (mb_strlen($this->container['family_name']) > 100)) { + $invalidProperties[] = "invalid value for 'family_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['given_name']) && (mb_strlen($this->container['given_name']) > 100)) { + $invalidProperties[] = "invalid value for 'given_name', the character length must be smaller than or equal to 100."; + } + return $invalidProperties; } diff --git a/lib/Model/DeliveryIndication.php b/lib/Model/DeliveryIndication.php index 8ce3061..9250cd0 100644 --- a/lib/Model/DeliveryIndication.php +++ b/lib/Model/DeliveryIndication.php @@ -51,7 +51,6 @@ class DeliveryIndication extends TransactionAwareEntity 'automatically_decided_on' => '\DateTime', 'completion' => 'int', 'created_on' => '\DateTime', - 'linked_space_id' => 'int', 'manual_decision_timeout_on' => '\DateTime', 'manually_decided_by' => 'int', 'manually_decided_on' => '\DateTime', @@ -71,7 +70,6 @@ class DeliveryIndication extends TransactionAwareEntity 'automatically_decided_on' => 'date-time', 'completion' => 'int64', 'created_on' => 'date-time', - 'linked_space_id' => 'int64', 'manual_decision_timeout_on' => 'date-time', 'manually_decided_by' => 'int64', 'manually_decided_on' => 'date-time', @@ -92,7 +90,6 @@ class DeliveryIndication extends TransactionAwareEntity 'automatically_decided_on' => 'automaticallyDecidedOn', 'completion' => 'completion', 'created_on' => 'createdOn', - 'linked_space_id' => 'linkedSpaceId', 'manual_decision_timeout_on' => 'manualDecisionTimeoutOn', 'manually_decided_by' => 'manuallyDecidedBy', 'manually_decided_on' => 'manuallyDecidedOn', @@ -112,7 +109,6 @@ class DeliveryIndication extends TransactionAwareEntity 'automatically_decided_on' => 'setAutomaticallyDecidedOn', 'completion' => 'setCompletion', 'created_on' => 'setCreatedOn', - 'linked_space_id' => 'setLinkedSpaceId', 'manual_decision_timeout_on' => 'setManualDecisionTimeoutOn', 'manually_decided_by' => 'setManuallyDecidedBy', 'manually_decided_on' => 'setManuallyDecidedOn', @@ -132,7 +128,6 @@ class DeliveryIndication extends TransactionAwareEntity 'automatically_decided_on' => 'getAutomaticallyDecidedOn', 'completion' => 'getCompletion', 'created_on' => 'getCreatedOn', - 'linked_space_id' => 'getLinkedSpaceId', 'manual_decision_timeout_on' => 'getManualDecisionTimeoutOn', 'manually_decided_by' => 'getManuallyDecidedBy', 'manually_decided_on' => 'getManuallyDecidedOn', @@ -164,8 +159,6 @@ public function __construct(array $data = null) $this->container['created_on'] = isset($data['created_on']) ? $data['created_on'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['manual_decision_timeout_on'] = isset($data['manual_decision_timeout_on']) ? $data['manual_decision_timeout_on'] : null; $this->container['manually_decided_by'] = isset($data['manually_decided_by']) ? $data['manually_decided_by'] : null; @@ -371,31 +364,6 @@ public function setCreatedOn($created_on) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets manual_decision_timeout_on * diff --git a/lib/Model/HumanUserCreate.php b/lib/Model/HumanUserCreate.php index 71c164d..76a20e4 100644 --- a/lib/Model/HumanUserCreate.php +++ b/lib/Model/HumanUserCreate.php @@ -114,6 +114,22 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 128)) { + $invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 128."; + } + + if (!is_null($this->container['firstname']) && (mb_strlen($this->container['firstname']) > 100)) { + $invalidProperties[] = "invalid value for 'firstname', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['lastname']) && (mb_strlen($this->container['lastname']) > 100)) { + $invalidProperties[] = "invalid value for 'lastname', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['mobile_phone_number']) && (mb_strlen($this->container['mobile_phone_number']) > 30)) { + $invalidProperties[] = "invalid value for 'mobile_phone_number', the character length must be smaller than or equal to 30."; + } + return $invalidProperties; } diff --git a/lib/Model/HumanUserUpdate.php b/lib/Model/HumanUserUpdate.php index 80b2978..7b50148 100644 --- a/lib/Model/HumanUserUpdate.php +++ b/lib/Model/HumanUserUpdate.php @@ -121,6 +121,22 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 128)) { + $invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 128."; + } + + if (!is_null($this->container['firstname']) && (mb_strlen($this->container['firstname']) > 100)) { + $invalidProperties[] = "invalid value for 'firstname', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['lastname']) && (mb_strlen($this->container['lastname']) > 100)) { + $invalidProperties[] = "invalid value for 'lastname', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['mobile_phone_number']) && (mb_strlen($this->container['mobile_phone_number']) > 30)) { + $invalidProperties[] = "invalid value for 'mobile_phone_number', the character length must be smaller than or equal to 30."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/PaymentLink.php b/lib/Model/PaymentLink.php index 88729e5..a78be1d 100644 --- a/lib/Model/PaymentLink.php +++ b/lib/Model/PaymentLink.php @@ -53,7 +53,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'applied_space_view' => 'int', 'available_from' => '\DateTime', 'available_until' => '\DateTime', - 'billing_address_required' => 'bool', + 'billing_address_handling_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode', 'currency' => 'string', 'external_id' => 'string', 'id' => 'int', @@ -64,7 +64,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'name' => 'string', 'planned_purge_date' => '\DateTime', 'protection_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkProtectionMode', - 'shipping_address_required' => 'bool', + 'shipping_address_handling_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode', 'state' => '\PostFinanceCheckout\Sdk\Model\CreationEntityState', 'url' => 'string', 'version' => 'int' @@ -80,7 +80,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'applied_space_view' => 'int64', 'available_from' => 'date-time', 'available_until' => 'date-time', - 'billing_address_required' => null, + 'billing_address_handling_mode' => null, 'currency' => null, 'external_id' => null, 'id' => 'int64', @@ -91,7 +91,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'name' => null, 'planned_purge_date' => 'date-time', 'protection_mode' => null, - 'shipping_address_required' => null, + 'shipping_address_handling_mode' => null, 'state' => null, 'url' => null, 'version' => 'int32' @@ -108,7 +108,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'applied_space_view' => 'appliedSpaceView', 'available_from' => 'availableFrom', 'available_until' => 'availableUntil', - 'billing_address_required' => 'billingAddressRequired', + 'billing_address_handling_mode' => 'billingAddressHandlingMode', 'currency' => 'currency', 'external_id' => 'externalId', 'id' => 'id', @@ -119,7 +119,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'name' => 'name', 'planned_purge_date' => 'plannedPurgeDate', 'protection_mode' => 'protectionMode', - 'shipping_address_required' => 'shippingAddressRequired', + 'shipping_address_handling_mode' => 'shippingAddressHandlingMode', 'state' => 'state', 'url' => 'url', 'version' => 'version' @@ -135,7 +135,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'applied_space_view' => 'setAppliedSpaceView', 'available_from' => 'setAvailableFrom', 'available_until' => 'setAvailableUntil', - 'billing_address_required' => 'setBillingAddressRequired', + 'billing_address_handling_mode' => 'setBillingAddressHandlingMode', 'currency' => 'setCurrency', 'external_id' => 'setExternalId', 'id' => 'setId', @@ -146,7 +146,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'name' => 'setName', 'planned_purge_date' => 'setPlannedPurgeDate', 'protection_mode' => 'setProtectionMode', - 'shipping_address_required' => 'setShippingAddressRequired', + 'shipping_address_handling_mode' => 'setShippingAddressHandlingMode', 'state' => 'setState', 'url' => 'setUrl', 'version' => 'setVersion' @@ -162,7 +162,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'applied_space_view' => 'getAppliedSpaceView', 'available_from' => 'getAvailableFrom', 'available_until' => 'getAvailableUntil', - 'billing_address_required' => 'getBillingAddressRequired', + 'billing_address_handling_mode' => 'getBillingAddressHandlingMode', 'currency' => 'getCurrency', 'external_id' => 'getExternalId', 'id' => 'getId', @@ -173,7 +173,7 @@ class PaymentLink implements ModelInterface, ArrayAccess 'name' => 'getName', 'planned_purge_date' => 'getPlannedPurgeDate', 'protection_mode' => 'getProtectionMode', - 'shipping_address_required' => 'getShippingAddressRequired', + 'shipping_address_handling_mode' => 'getShippingAddressHandlingMode', 'state' => 'getState', 'url' => 'getUrl', 'version' => 'getVersion' @@ -205,7 +205,7 @@ public function __construct(array $data = null) $this->container['available_until'] = isset($data['available_until']) ? $data['available_until'] : null; - $this->container['billing_address_required'] = isset($data['billing_address_required']) ? $data['billing_address_required'] : null; + $this->container['billing_address_handling_mode'] = isset($data['billing_address_handling_mode']) ? $data['billing_address_handling_mode'] : null; $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; @@ -227,7 +227,7 @@ public function __construct(array $data = null) $this->container['protection_mode'] = isset($data['protection_mode']) ? $data['protection_mode'] : null; - $this->container['shipping_address_required'] = isset($data['shipping_address_required']) ? $data['shipping_address_required'] : null; + $this->container['shipping_address_handling_mode'] = isset($data['shipping_address_handling_mode']) ? $data['shipping_address_handling_mode'] : null; $this->container['state'] = isset($data['state']) ? $data['state'] : null; @@ -439,25 +439,25 @@ public function setAvailableUntil($available_until) /** - * Gets billing_address_required + * Gets billing_address_handling_mode * - * @return bool + * @return \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode */ - public function getBillingAddressRequired() + public function getBillingAddressHandlingMode() { - return $this->container['billing_address_required']; + return $this->container['billing_address_handling_mode']; } /** - * Sets billing_address_required + * Sets billing_address_handling_mode * - * @param bool $billing_address_required By making the billing address required the transaction can only be created when a billing address is provided within the request. + * @param \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode $billing_address_handling_mode The billing address handling mode controls if the address is collected or not and how it is collected. * * @return $this */ - public function setBillingAddressRequired($billing_address_required) + public function setBillingAddressHandlingMode($billing_address_handling_mode) { - $this->container['billing_address_required'] = $billing_address_required; + $this->container['billing_address_handling_mode'] = $billing_address_handling_mode; return $this; } @@ -725,25 +725,25 @@ public function setProtectionMode($protection_mode) /** - * Gets shipping_address_required + * Gets shipping_address_handling_mode * - * @return bool + * @return \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode */ - public function getShippingAddressRequired() + public function getShippingAddressHandlingMode() { - return $this->container['shipping_address_required']; + return $this->container['shipping_address_handling_mode']; } /** - * Sets shipping_address_required + * Sets shipping_address_handling_mode * - * @param bool $shipping_address_required By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * @param \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode $shipping_address_handling_mode The shipping address handling mode controls if the address is collected or not and how it is collected. * * @return $this */ - public function setShippingAddressRequired($shipping_address_required) + public function setShippingAddressHandlingMode($shipping_address_handling_mode) { - $this->container['shipping_address_required'] = $shipping_address_required; + $this->container['shipping_address_handling_mode'] = $shipping_address_handling_mode; return $this; } diff --git a/lib/Model/PaymentLinkActive.php b/lib/Model/PaymentLinkActive.php index 895316a..90378d2 100644 --- a/lib/Model/PaymentLinkActive.php +++ b/lib/Model/PaymentLinkActive.php @@ -114,6 +114,16 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['version'] === null) { + $invalidProperties[] = "'version' can't be null"; + } + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 100)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 100."; + } + return $invalidProperties; } diff --git a/lib/Model/PaymentLinkAddressHandlingMode.php b/lib/Model/PaymentLinkAddressHandlingMode.php new file mode 100644 index 0000000..d373799 --- /dev/null +++ b/lib/Model/PaymentLinkAddressHandlingMode.php @@ -0,0 +1,56 @@ +container['name']) && (mb_strlen($this->container['name']) > 100)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 100."; + } + if ($this->container['external_id'] === null) { $invalidProperties[] = "'external_id' can't be null"; } diff --git a/lib/Model/PaymentLinkUpdate.php b/lib/Model/PaymentLinkUpdate.php index d2824c2..07c1fcf 100644 --- a/lib/Model/PaymentLinkUpdate.php +++ b/lib/Model/PaymentLinkUpdate.php @@ -55,13 +55,13 @@ class PaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'int', 'available_from' => '\DateTime', 'available_until' => '\DateTime', - 'billing_address_required' => 'bool', + 'billing_address_handling_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode', 'currency' => 'string', 'language' => 'string', 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItemCreate[]', 'maximal_number_of_transactions' => 'int', 'name' => 'string', - 'shipping_address_required' => 'bool' + 'shipping_address_handling_mode' => '\PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode' ]; /** @@ -76,13 +76,13 @@ class PaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'int64', 'available_from' => 'date-time', 'available_until' => 'date-time', - 'billing_address_required' => null, + 'billing_address_handling_mode' => null, 'currency' => null, 'language' => null, 'line_items' => null, 'maximal_number_of_transactions' => 'int32', 'name' => null, - 'shipping_address_required' => null + 'shipping_address_handling_mode' => null ]; /** @@ -98,13 +98,13 @@ class PaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'appliedSpaceView', 'available_from' => 'availableFrom', 'available_until' => 'availableUntil', - 'billing_address_required' => 'billingAddressRequired', + 'billing_address_handling_mode' => 'billingAddressHandlingMode', 'currency' => 'currency', 'language' => 'language', 'line_items' => 'lineItems', 'maximal_number_of_transactions' => 'maximalNumberOfTransactions', 'name' => 'name', - 'shipping_address_required' => 'shippingAddressRequired' + 'shipping_address_handling_mode' => 'shippingAddressHandlingMode' ]; /** @@ -119,13 +119,13 @@ class PaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'setAppliedSpaceView', 'available_from' => 'setAvailableFrom', 'available_until' => 'setAvailableUntil', - 'billing_address_required' => 'setBillingAddressRequired', + 'billing_address_handling_mode' => 'setBillingAddressHandlingMode', 'currency' => 'setCurrency', 'language' => 'setLanguage', 'line_items' => 'setLineItems', 'maximal_number_of_transactions' => 'setMaximalNumberOfTransactions', 'name' => 'setName', - 'shipping_address_required' => 'setShippingAddressRequired' + 'shipping_address_handling_mode' => 'setShippingAddressHandlingMode' ]; /** @@ -140,13 +140,13 @@ class PaymentLinkUpdate implements ModelInterface, ArrayAccess 'applied_space_view' => 'getAppliedSpaceView', 'available_from' => 'getAvailableFrom', 'available_until' => 'getAvailableUntil', - 'billing_address_required' => 'getBillingAddressRequired', + 'billing_address_handling_mode' => 'getBillingAddressHandlingMode', 'currency' => 'getCurrency', 'language' => 'getLanguage', 'line_items' => 'getLineItems', 'maximal_number_of_transactions' => 'getMaximalNumberOfTransactions', 'name' => 'getName', - 'shipping_address_required' => 'getShippingAddressRequired' + 'shipping_address_handling_mode' => 'getShippingAddressHandlingMode' ]; @@ -179,7 +179,7 @@ public function __construct(array $data = null) $this->container['available_until'] = isset($data['available_until']) ? $data['available_until'] : null; - $this->container['billing_address_required'] = isset($data['billing_address_required']) ? $data['billing_address_required'] : null; + $this->container['billing_address_handling_mode'] = isset($data['billing_address_handling_mode']) ? $data['billing_address_handling_mode'] : null; $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; @@ -191,7 +191,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['shipping_address_required'] = isset($data['shipping_address_required']) ? $data['shipping_address_required'] : null; + $this->container['shipping_address_handling_mode'] = isset($data['shipping_address_handling_mode']) ? $data['shipping_address_handling_mode'] : null; } @@ -445,25 +445,25 @@ public function setAvailableUntil($available_until) /** - * Gets billing_address_required + * Gets billing_address_handling_mode * - * @return bool + * @return \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode */ - public function getBillingAddressRequired() + public function getBillingAddressHandlingMode() { - return $this->container['billing_address_required']; + return $this->container['billing_address_handling_mode']; } /** - * Sets billing_address_required + * Sets billing_address_handling_mode * - * @param bool $billing_address_required By making the billing address required the transaction can only be created when a billing address is provided within the request. + * @param \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode $billing_address_handling_mode The billing address handling mode controls if the address is collected or not and how it is collected. * * @return $this */ - public function setBillingAddressRequired($billing_address_required) + public function setBillingAddressHandlingMode($billing_address_handling_mode) { - $this->container['billing_address_required'] = $billing_address_required; + $this->container['billing_address_handling_mode'] = $billing_address_handling_mode; return $this; } @@ -599,25 +599,25 @@ public function setName($name) /** - * Gets shipping_address_required + * Gets shipping_address_handling_mode * - * @return bool + * @return \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode */ - public function getShippingAddressRequired() + public function getShippingAddressHandlingMode() { - return $this->container['shipping_address_required']; + return $this->container['shipping_address_handling_mode']; } /** - * Sets shipping_address_required + * Sets shipping_address_handling_mode * - * @param bool $shipping_address_required By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * @param \PostFinanceCheckout\Sdk\Model\PaymentLinkAddressHandlingMode $shipping_address_handling_mode The shipping address handling mode controls if the address is collected or not and how it is collected. * * @return $this */ - public function setShippingAddressRequired($shipping_address_required) + public function setShippingAddressHandlingMode($shipping_address_handling_mode) { - $this->container['shipping_address_required'] = $shipping_address_required; + $this->container['shipping_address_handling_mode'] = $shipping_address_handling_mode; return $this; } diff --git a/lib/Model/PaymentTerminalContactAddress.php b/lib/Model/PaymentTerminalContactAddress.php index b898ea6..143c03b 100644 --- a/lib/Model/PaymentTerminalContactAddress.php +++ b/lib/Model/PaymentTerminalContactAddress.php @@ -47,10 +47,7 @@ class PaymentTerminalContactAddress extends PaymentTerminalAddress * @var string[] */ protected static $swaggerTypes = [ - 'family_name' => 'string', - 'given_name' => 'string', - 'organization_name' => 'string', - 'phone_number' => 'string' + ]; /** @@ -59,10 +56,7 @@ class PaymentTerminalContactAddress extends PaymentTerminalAddress * @var string[] */ protected static $swaggerFormats = [ - 'family_name' => null, - 'given_name' => null, - 'organization_name' => null, - 'phone_number' => null + ]; /** @@ -72,10 +66,7 @@ class PaymentTerminalContactAddress extends PaymentTerminalAddress * @var string[] */ protected static $attributeMap = [ - 'family_name' => 'familyName', - 'given_name' => 'givenName', - 'organization_name' => 'organizationName', - 'phone_number' => 'phoneNumber' + ]; /** @@ -84,10 +75,7 @@ class PaymentTerminalContactAddress extends PaymentTerminalAddress * @var string[] */ protected static $setters = [ - 'family_name' => 'setFamilyName', - 'given_name' => 'setGivenName', - 'organization_name' => 'setOrganizationName', - 'phone_number' => 'setPhoneNumber' + ]; /** @@ -96,10 +84,7 @@ class PaymentTerminalContactAddress extends PaymentTerminalAddress * @var string[] */ protected static $getters = [ - 'family_name' => 'getFamilyName', - 'given_name' => 'getGivenName', - 'organization_name' => 'getOrganizationName', - 'phone_number' => 'getPhoneNumber' + ]; @@ -116,14 +101,6 @@ public function __construct(array $data = null) parent::__construct($data); - $this->container['family_name'] = isset($data['family_name']) ? $data['family_name'] : null; - - $this->container['given_name'] = isset($data['given_name']) ? $data['given_name'] : null; - - $this->container['organization_name'] = isset($data['organization_name']) ? $data['organization_name'] : null; - - $this->container['phone_number'] = isset($data['phone_number']) ? $data['phone_number'] : null; - } /** @@ -135,6 +112,26 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['dependent_locality']) && (mb_strlen($this->container['dependent_locality']) > 100)) { + $invalidProperties[] = "invalid value for 'dependent_locality', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 254)) { + $invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 254."; + } + + if (!is_null($this->container['mobile_phone_number']) && (mb_strlen($this->container['mobile_phone_number']) > 100)) { + $invalidProperties[] = "invalid value for 'mobile_phone_number', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['salutation']) && (mb_strlen($this->container['salutation']) > 20)) { + $invalidProperties[] = "invalid value for 'salutation', the character length must be smaller than or equal to 20."; + } + + if (!is_null($this->container['sorting_code']) && (mb_strlen($this->container['sorting_code']) > 100)) { + $invalidProperties[] = "invalid value for 'sorting_code', the character length must be smaller than or equal to 100."; + } + return $invalidProperties; } @@ -214,106 +211,6 @@ public function valid() } - - /** - * Gets family_name - * - * @return string - */ - public function getFamilyName() - { - return $this->container['family_name']; - } - - /** - * Sets family_name - * - * @param string $family_name - * - * @return $this - */ - public function setFamilyName($family_name) - { - $this->container['family_name'] = $family_name; - - return $this; - } - - - /** - * Gets given_name - * - * @return string - */ - public function getGivenName() - { - return $this->container['given_name']; - } - - /** - * Sets given_name - * - * @param string $given_name - * - * @return $this - */ - public function setGivenName($given_name) - { - $this->container['given_name'] = $given_name; - - return $this; - } - - - /** - * Gets organization_name - * - * @return string - */ - public function getOrganizationName() - { - return $this->container['organization_name']; - } - - /** - * Sets organization_name - * - * @param string $organization_name - * - * @return $this - */ - public function setOrganizationName($organization_name) - { - $this->container['organization_name'] = $organization_name; - - return $this; - } - - - /** - * Gets phone_number - * - * @return string - */ - public function getPhoneNumber() - { - return $this->container['phone_number']; - } - - /** - * Sets phone_number - * - * @param string $phone_number - * - * @return $this - */ - public function setPhoneNumber($phone_number) - { - $this->container['phone_number'] = $phone_number; - - return $this; - } - /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RefundCommentActive.php b/lib/Model/RefundCommentActive.php index e82359b..d0b2d16 100644 --- a/lib/Model/RefundCommentActive.php +++ b/lib/Model/RefundCommentActive.php @@ -121,6 +121,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/RefundCommentCreate.php b/lib/Model/RefundCommentCreate.php index c7ff867..5933379 100644 --- a/lib/Model/RefundCommentCreate.php +++ b/lib/Model/RefundCommentCreate.php @@ -114,6 +114,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['refund'] === null) { $invalidProperties[] = "'refund' can't be null"; } diff --git a/lib/Model/ShopifyTransaction.php b/lib/Model/ShopifyTransaction.php index 3c61f52..7db32cf 100644 --- a/lib/Model/ShopifyTransaction.php +++ b/lib/Model/ShopifyTransaction.php @@ -50,7 +50,6 @@ class ShopifyTransaction extends TransactionAwareEntity 'checkout_id' => 'string', 'created_on' => '\DateTime', 'integration' => '\PostFinanceCheckout\Sdk\Model\ShopifyIntegration', - 'linked_space_id' => 'int', 'order_id' => 'string', 'order_name' => 'string', 'planned_purge_date' => '\DateTime', @@ -68,7 +67,6 @@ class ShopifyTransaction extends TransactionAwareEntity 'checkout_id' => null, 'created_on' => 'date-time', 'integration' => null, - 'linked_space_id' => 'int64', 'order_id' => null, 'order_name' => null, 'planned_purge_date' => 'date-time', @@ -87,7 +85,6 @@ class ShopifyTransaction extends TransactionAwareEntity 'checkout_id' => 'checkoutId', 'created_on' => 'createdOn', 'integration' => 'integration', - 'linked_space_id' => 'linkedSpaceId', 'order_id' => 'orderId', 'order_name' => 'orderName', 'planned_purge_date' => 'plannedPurgeDate', @@ -105,7 +102,6 @@ class ShopifyTransaction extends TransactionAwareEntity 'checkout_id' => 'setCheckoutId', 'created_on' => 'setCreatedOn', 'integration' => 'setIntegration', - 'linked_space_id' => 'setLinkedSpaceId', 'order_id' => 'setOrderId', 'order_name' => 'setOrderName', 'planned_purge_date' => 'setPlannedPurgeDate', @@ -123,7 +119,6 @@ class ShopifyTransaction extends TransactionAwareEntity 'checkout_id' => 'getCheckoutId', 'created_on' => 'getCreatedOn', 'integration' => 'getIntegration', - 'linked_space_id' => 'getLinkedSpaceId', 'order_id' => 'getOrderId', 'order_name' => 'getOrderName', 'planned_purge_date' => 'getPlannedPurgeDate', @@ -152,8 +147,6 @@ public function __construct(array $data = null) $this->container['integration'] = isset($data['integration']) ? $data['integration'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['order_id'] = isset($data['order_id']) ? $data['order_id'] : null; $this->container['order_name'] = isset($data['order_name']) ? $data['order_name'] : null; @@ -332,31 +325,6 @@ public function setIntegration($integration) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets order_id * diff --git a/lib/Model/SpaceCreate.php b/lib/Model/SpaceCreate.php index d519582..acc3be5 100644 --- a/lib/Model/SpaceCreate.php +++ b/lib/Model/SpaceCreate.php @@ -114,6 +114,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 3)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 3."; + } + if ($this->container['account'] === null) { $invalidProperties[] = "'account' can't be null"; } diff --git a/lib/Model/SpaceUpdate.php b/lib/Model/SpaceUpdate.php index dde264f..8118af4 100644 --- a/lib/Model/SpaceUpdate.php +++ b/lib/Model/SpaceUpdate.php @@ -121,6 +121,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 200)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 3)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 3."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/TokenCreate.php b/lib/Model/TokenCreate.php index 47c4371..0177406 100644 --- a/lib/Model/TokenCreate.php +++ b/lib/Model/TokenCreate.php @@ -121,6 +121,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['customer_email_address']) && (mb_strlen($this->container['customer_email_address']) > 150)) { + $invalidProperties[] = "invalid value for 'customer_email_address', the character length must be smaller than or equal to 150."; + } + + if (!is_null($this->container['token_reference']) && (mb_strlen($this->container['token_reference']) > 100)) { + $invalidProperties[] = "invalid value for 'token_reference', the character length must be smaller than or equal to 100."; + } + if ($this->container['external_id'] === null) { $invalidProperties[] = "'external_id' can't be null"; } diff --git a/lib/Model/TokenUpdate.php b/lib/Model/TokenUpdate.php index afd8a18..dfe1aef 100644 --- a/lib/Model/TokenUpdate.php +++ b/lib/Model/TokenUpdate.php @@ -121,6 +121,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['customer_email_address']) && (mb_strlen($this->container['customer_email_address']) > 150)) { + $invalidProperties[] = "invalid value for 'customer_email_address', the character length must be smaller than or equal to 150."; + } + + if (!is_null($this->container['token_reference']) && (mb_strlen($this->container['token_reference']) > 100)) { + $invalidProperties[] = "invalid value for 'token_reference', the character length must be smaller than or equal to 100."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/Transaction.php b/lib/Model/Transaction.php index 6d223a8..9cd2487 100644 --- a/lib/Model/Transaction.php +++ b/lib/Model/Transaction.php @@ -87,6 +87,7 @@ class Transaction implements ModelInterface, ArrayAccess 'internet_protocol_address' => 'string', 'internet_protocol_address_country' => 'string', 'invoice_merchant_reference' => 'string', + 'java_enabled' => 'bool', 'language' => 'string', 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItem[]', 'linked_space_id' => 'int', @@ -97,6 +98,9 @@ class Transaction implements ModelInterface, ArrayAccess 'planned_purge_date' => '\DateTime', 'processing_on' => '\DateTime', 'refunded_amount' => 'float', + 'screen_color_depth' => 'string', + 'screen_height' => 'string', + 'screen_width' => 'string', 'shipping_address' => '\PostFinanceCheckout\Sdk\Model\Address', 'shipping_method' => 'string', 'space_view_id' => 'int', @@ -111,7 +115,9 @@ class Transaction implements ModelInterface, ArrayAccess 'user_agent_header' => 'string', 'user_failure_message' => 'string', 'user_interface_type' => '\PostFinanceCheckout\Sdk\Model\TransactionUserInterfaceType', - 'version' => 'int' + 'version' => 'int', + 'window_height' => 'string', + 'window_width' => 'string' ]; /** @@ -158,6 +164,7 @@ class Transaction implements ModelInterface, ArrayAccess 'internet_protocol_address' => null, 'internet_protocol_address_country' => null, 'invoice_merchant_reference' => null, + 'java_enabled' => null, 'language' => null, 'line_items' => null, 'linked_space_id' => 'int64', @@ -168,6 +175,9 @@ class Transaction implements ModelInterface, ArrayAccess 'planned_purge_date' => 'date-time', 'processing_on' => 'date-time', 'refunded_amount' => null, + 'screen_color_depth' => null, + 'screen_height' => null, + 'screen_width' => null, 'shipping_address' => null, 'shipping_method' => null, 'space_view_id' => 'int64', @@ -182,7 +192,9 @@ class Transaction implements ModelInterface, ArrayAccess 'user_agent_header' => null, 'user_failure_message' => null, 'user_interface_type' => null, - 'version' => 'int32' + 'version' => 'int32', + 'window_height' => null, + 'window_width' => null ]; /** @@ -230,6 +242,7 @@ class Transaction implements ModelInterface, ArrayAccess 'internet_protocol_address' => 'internetProtocolAddress', 'internet_protocol_address_country' => 'internetProtocolAddressCountry', 'invoice_merchant_reference' => 'invoiceMerchantReference', + 'java_enabled' => 'javaEnabled', 'language' => 'language', 'line_items' => 'lineItems', 'linked_space_id' => 'linkedSpaceId', @@ -240,6 +253,9 @@ class Transaction implements ModelInterface, ArrayAccess 'planned_purge_date' => 'plannedPurgeDate', 'processing_on' => 'processingOn', 'refunded_amount' => 'refundedAmount', + 'screen_color_depth' => 'screenColorDepth', + 'screen_height' => 'screenHeight', + 'screen_width' => 'screenWidth', 'shipping_address' => 'shippingAddress', 'shipping_method' => 'shippingMethod', 'space_view_id' => 'spaceViewId', @@ -254,7 +270,9 @@ class Transaction implements ModelInterface, ArrayAccess 'user_agent_header' => 'userAgentHeader', 'user_failure_message' => 'userFailureMessage', 'user_interface_type' => 'userInterfaceType', - 'version' => 'version' + 'version' => 'version', + 'window_height' => 'windowHeight', + 'window_width' => 'windowWidth' ]; /** @@ -301,6 +319,7 @@ class Transaction implements ModelInterface, ArrayAccess 'internet_protocol_address' => 'setInternetProtocolAddress', 'internet_protocol_address_country' => 'setInternetProtocolAddressCountry', 'invoice_merchant_reference' => 'setInvoiceMerchantReference', + 'java_enabled' => 'setJavaEnabled', 'language' => 'setLanguage', 'line_items' => 'setLineItems', 'linked_space_id' => 'setLinkedSpaceId', @@ -311,6 +330,9 @@ class Transaction implements ModelInterface, ArrayAccess 'planned_purge_date' => 'setPlannedPurgeDate', 'processing_on' => 'setProcessingOn', 'refunded_amount' => 'setRefundedAmount', + 'screen_color_depth' => 'setScreenColorDepth', + 'screen_height' => 'setScreenHeight', + 'screen_width' => 'setScreenWidth', 'shipping_address' => 'setShippingAddress', 'shipping_method' => 'setShippingMethod', 'space_view_id' => 'setSpaceViewId', @@ -325,7 +347,9 @@ class Transaction implements ModelInterface, ArrayAccess 'user_agent_header' => 'setUserAgentHeader', 'user_failure_message' => 'setUserFailureMessage', 'user_interface_type' => 'setUserInterfaceType', - 'version' => 'setVersion' + 'version' => 'setVersion', + 'window_height' => 'setWindowHeight', + 'window_width' => 'setWindowWidth' ]; /** @@ -372,6 +396,7 @@ class Transaction implements ModelInterface, ArrayAccess 'internet_protocol_address' => 'getInternetProtocolAddress', 'internet_protocol_address_country' => 'getInternetProtocolAddressCountry', 'invoice_merchant_reference' => 'getInvoiceMerchantReference', + 'java_enabled' => 'getJavaEnabled', 'language' => 'getLanguage', 'line_items' => 'getLineItems', 'linked_space_id' => 'getLinkedSpaceId', @@ -382,6 +407,9 @@ class Transaction implements ModelInterface, ArrayAccess 'planned_purge_date' => 'getPlannedPurgeDate', 'processing_on' => 'getProcessingOn', 'refunded_amount' => 'getRefundedAmount', + 'screen_color_depth' => 'getScreenColorDepth', + 'screen_height' => 'getScreenHeight', + 'screen_width' => 'getScreenWidth', 'shipping_address' => 'getShippingAddress', 'shipping_method' => 'getShippingMethod', 'space_view_id' => 'getSpaceViewId', @@ -396,7 +424,9 @@ class Transaction implements ModelInterface, ArrayAccess 'user_agent_header' => 'getUserAgentHeader', 'user_failure_message' => 'getUserFailureMessage', 'user_interface_type' => 'getUserInterfaceType', - 'version' => 'getVersion' + 'version' => 'getVersion', + 'window_height' => 'getWindowHeight', + 'window_width' => 'getWindowWidth' ]; @@ -493,6 +523,8 @@ public function __construct(array $data = null) $this->container['invoice_merchant_reference'] = isset($data['invoice_merchant_reference']) ? $data['invoice_merchant_reference'] : null; + $this->container['java_enabled'] = isset($data['java_enabled']) ? $data['java_enabled'] : null; + $this->container['language'] = isset($data['language']) ? $data['language'] : null; $this->container['line_items'] = isset($data['line_items']) ? $data['line_items'] : null; @@ -513,6 +545,12 @@ public function __construct(array $data = null) $this->container['refunded_amount'] = isset($data['refunded_amount']) ? $data['refunded_amount'] : null; + $this->container['screen_color_depth'] = isset($data['screen_color_depth']) ? $data['screen_color_depth'] : null; + + $this->container['screen_height'] = isset($data['screen_height']) ? $data['screen_height'] : null; + + $this->container['screen_width'] = isset($data['screen_width']) ? $data['screen_width'] : null; + $this->container['shipping_address'] = isset($data['shipping_address']) ? $data['shipping_address'] : null; $this->container['shipping_method'] = isset($data['shipping_method']) ? $data['shipping_method'] : null; @@ -543,6 +581,10 @@ public function __construct(array $data = null) $this->container['version'] = isset($data['version']) ? $data['version'] : null; + $this->container['window_height'] = isset($data['window_height']) ? $data['window_height'] : null; + + $this->container['window_width'] = isset($data['window_width']) ? $data['window_width'] : null; + } /** @@ -1646,6 +1688,31 @@ public function setInvoiceMerchantReference($invoice_merchant_reference) } + /** + * Gets java_enabled + * + * @return bool + */ + public function getJavaEnabled() + { + return $this->container['java_enabled']; + } + + /** + * Sets java_enabled + * + * @param bool $java_enabled + * + * @return $this + */ + public function setJavaEnabled($java_enabled) + { + $this->container['java_enabled'] = $java_enabled; + + return $this; + } + + /** * Gets language * @@ -1900,6 +1967,81 @@ public function setRefundedAmount($refunded_amount) } + /** + * Gets screen_color_depth + * + * @return string + */ + public function getScreenColorDepth() + { + return $this->container['screen_color_depth']; + } + + /** + * Sets screen_color_depth + * + * @param string $screen_color_depth + * + * @return $this + */ + public function setScreenColorDepth($screen_color_depth) + { + $this->container['screen_color_depth'] = $screen_color_depth; + + return $this; + } + + + /** + * Gets screen_height + * + * @return string + */ + public function getScreenHeight() + { + return $this->container['screen_height']; + } + + /** + * Sets screen_height + * + * @param string $screen_height + * + * @return $this + */ + public function setScreenHeight($screen_height) + { + $this->container['screen_height'] = $screen_height; + + return $this; + } + + + /** + * Gets screen_width + * + * @return string + */ + public function getScreenWidth() + { + return $this->container['screen_width']; + } + + /** + * Sets screen_width + * + * @param string $screen_width + * + * @return $this + */ + public function setScreenWidth($screen_width) + { + $this->container['screen_width'] = $screen_width; + + return $this; + } + + /** * Gets shipping_address * @@ -2285,6 +2427,56 @@ public function setVersion($version) return $this; } + + /** + * Gets window_height + * + * @return string + */ + public function getWindowHeight() + { + return $this->container['window_height']; + } + + /** + * Sets window_height + * + * @param string $window_height + * + * @return $this + */ + public function setWindowHeight($window_height) + { + $this->container['window_height'] = $window_height; + + return $this; + } + + + /** + * Gets window_width + * + * @return string + */ + public function getWindowWidth() + { + return $this->container['window_width']; + } + + /** + * Sets window_width + * + * @param string $window_width + * + * @return $this + */ + public function setWindowWidth($window_width) + { + $this->container['window_width'] = $window_width; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TransactionCommentActive.php b/lib/Model/TransactionCommentActive.php index 25733e0..383a74c 100644 --- a/lib/Model/TransactionCommentActive.php +++ b/lib/Model/TransactionCommentActive.php @@ -121,6 +121,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/TransactionCommentCreate.php b/lib/Model/TransactionCommentCreate.php index d82bece..c31b304 100644 --- a/lib/Model/TransactionCommentCreate.php +++ b/lib/Model/TransactionCommentCreate.php @@ -114,6 +114,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['transaction'] === null) { $invalidProperties[] = "'transaction' can't be null"; } diff --git a/lib/Model/TransactionCompletion.php b/lib/Model/TransactionCompletion.php index b30113f..0e158f3 100644 --- a/lib/Model/TransactionCompletion.php +++ b/lib/Model/TransactionCompletion.php @@ -60,7 +60,6 @@ class TransactionCompletion extends TransactionAwareEntity 'last_completion' => 'bool', 'line_item_version' => '\PostFinanceCheckout\Sdk\Model\TransactionLineItemVersion', 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItem[]', - 'linked_space_id' => 'int', 'mode' => '\PostFinanceCheckout\Sdk\Model\TransactionCompletionMode', 'next_update_on' => '\DateTime', 'payment_information' => 'string', @@ -96,7 +95,6 @@ class TransactionCompletion extends TransactionAwareEntity 'last_completion' => null, 'line_item_version' => null, 'line_items' => null, - 'linked_space_id' => 'int64', 'mode' => null, 'next_update_on' => 'date-time', 'payment_information' => null, @@ -133,7 +131,6 @@ class TransactionCompletion extends TransactionAwareEntity 'last_completion' => 'lastCompletion', 'line_item_version' => 'lineItemVersion', 'line_items' => 'lineItems', - 'linked_space_id' => 'linkedSpaceId', 'mode' => 'mode', 'next_update_on' => 'nextUpdateOn', 'payment_information' => 'paymentInformation', @@ -169,7 +166,6 @@ class TransactionCompletion extends TransactionAwareEntity 'last_completion' => 'setLastCompletion', 'line_item_version' => 'setLineItemVersion', 'line_items' => 'setLineItems', - 'linked_space_id' => 'setLinkedSpaceId', 'mode' => 'setMode', 'next_update_on' => 'setNextUpdateOn', 'payment_information' => 'setPaymentInformation', @@ -205,7 +201,6 @@ class TransactionCompletion extends TransactionAwareEntity 'last_completion' => 'getLastCompletion', 'line_item_version' => 'getLineItemVersion', 'line_items' => 'getLineItems', - 'linked_space_id' => 'getLinkedSpaceId', 'mode' => 'getMode', 'next_update_on' => 'getNextUpdateOn', 'payment_information' => 'getPaymentInformation', @@ -262,8 +257,6 @@ public function __construct(array $data = null) $this->container['line_items'] = isset($data['line_items']) ? $data['line_items'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['mode'] = isset($data['mode']) ? $data['mode'] : null; $this->container['next_update_on'] = isset($data['next_update_on']) ? $data['next_update_on'] : null; @@ -731,31 +724,6 @@ public function setLineItems($line_items) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets mode * diff --git a/lib/Model/TransactionCreate.php b/lib/Model/TransactionCreate.php index fc82839..7ed2723 100644 --- a/lib/Model/TransactionCreate.php +++ b/lib/Model/TransactionCreate.php @@ -48,17 +48,13 @@ class TransactionCreate extends AbstractTransactionPending */ protected static $swaggerTypes = [ 'auto_confirmation_enabled' => 'bool', - 'billing_address' => '\PostFinanceCheckout\Sdk\Model\AddressCreate', 'charge_retry_enabled' => 'bool', 'customers_presence' => '\PostFinanceCheckout\Sdk\Model\CustomersPresence', 'device_session_identifier' => 'string', 'emails_disabled' => 'bool', 'environment' => '\PostFinanceCheckout\Sdk\Model\Environment', 'environment_selection_strategy' => '\PostFinanceCheckout\Sdk\Model\TransactionEnvironmentSelectionStrategy', - 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItemCreate[]', - 'shipping_address' => '\PostFinanceCheckout\Sdk\Model\AddressCreate', - 'space_view_id' => 'int', - 'token' => 'int' + 'space_view_id' => 'int' ]; /** @@ -68,17 +64,13 @@ class TransactionCreate extends AbstractTransactionPending */ protected static $swaggerFormats = [ 'auto_confirmation_enabled' => null, - 'billing_address' => null, 'charge_retry_enabled' => null, 'customers_presence' => null, 'device_session_identifier' => null, 'emails_disabled' => null, 'environment' => null, 'environment_selection_strategy' => null, - 'line_items' => null, - 'shipping_address' => null, - 'space_view_id' => 'int64', - 'token' => 'int64' + 'space_view_id' => 'int64' ]; /** @@ -89,17 +81,13 @@ class TransactionCreate extends AbstractTransactionPending */ protected static $attributeMap = [ 'auto_confirmation_enabled' => 'autoConfirmationEnabled', - 'billing_address' => 'billingAddress', 'charge_retry_enabled' => 'chargeRetryEnabled', 'customers_presence' => 'customersPresence', 'device_session_identifier' => 'deviceSessionIdentifier', 'emails_disabled' => 'emailsDisabled', 'environment' => 'environment', 'environment_selection_strategy' => 'environmentSelectionStrategy', - 'line_items' => 'lineItems', - 'shipping_address' => 'shippingAddress', - 'space_view_id' => 'spaceViewId', - 'token' => 'token' + 'space_view_id' => 'spaceViewId' ]; /** @@ -109,17 +97,13 @@ class TransactionCreate extends AbstractTransactionPending */ protected static $setters = [ 'auto_confirmation_enabled' => 'setAutoConfirmationEnabled', - 'billing_address' => 'setBillingAddress', 'charge_retry_enabled' => 'setChargeRetryEnabled', 'customers_presence' => 'setCustomersPresence', 'device_session_identifier' => 'setDeviceSessionIdentifier', 'emails_disabled' => 'setEmailsDisabled', 'environment' => 'setEnvironment', 'environment_selection_strategy' => 'setEnvironmentSelectionStrategy', - 'line_items' => 'setLineItems', - 'shipping_address' => 'setShippingAddress', - 'space_view_id' => 'setSpaceViewId', - 'token' => 'setToken' + 'space_view_id' => 'setSpaceViewId' ]; /** @@ -129,17 +113,13 @@ class TransactionCreate extends AbstractTransactionPending */ protected static $getters = [ 'auto_confirmation_enabled' => 'getAutoConfirmationEnabled', - 'billing_address' => 'getBillingAddress', 'charge_retry_enabled' => 'getChargeRetryEnabled', 'customers_presence' => 'getCustomersPresence', 'device_session_identifier' => 'getDeviceSessionIdentifier', 'emails_disabled' => 'getEmailsDisabled', 'environment' => 'getEnvironment', 'environment_selection_strategy' => 'getEnvironmentSelectionStrategy', - 'line_items' => 'getLineItems', - 'shipping_address' => 'getShippingAddress', - 'space_view_id' => 'getSpaceViewId', - 'token' => 'getToken' + 'space_view_id' => 'getSpaceViewId' ]; @@ -158,8 +138,6 @@ public function __construct(array $data = null) $this->container['auto_confirmation_enabled'] = isset($data['auto_confirmation_enabled']) ? $data['auto_confirmation_enabled'] : null; - $this->container['billing_address'] = isset($data['billing_address']) ? $data['billing_address'] : null; - $this->container['charge_retry_enabled'] = isset($data['charge_retry_enabled']) ? $data['charge_retry_enabled'] : null; $this->container['customers_presence'] = isset($data['customers_presence']) ? $data['customers_presence'] : null; @@ -172,14 +150,8 @@ public function __construct(array $data = null) $this->container['environment_selection_strategy'] = isset($data['environment_selection_strategy']) ? $data['environment_selection_strategy'] : null; - $this->container['line_items'] = isset($data['line_items']) ? $data['line_items'] : null; - - $this->container['shipping_address'] = isset($data['shipping_address']) ? $data['shipping_address'] : null; - $this->container['space_view_id'] = isset($data['space_view_id']) ? $data['space_view_id'] : null; - $this->container['token'] = isset($data['token']) ? $data['token'] : null; - } /** @@ -191,6 +163,41 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['customer_email_address']) && (mb_strlen($this->container['customer_email_address']) > 254)) { + $invalidProperties[] = "invalid value for 'customer_email_address', the character length must be smaller than or equal to 254."; + } + + if (!is_null($this->container['failed_url']) && (mb_strlen($this->container['failed_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'failed_url', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['failed_url']) && (mb_strlen($this->container['failed_url']) < 9)) { + $invalidProperties[] = "invalid value for 'failed_url', the character length must be bigger than or equal to 9."; + } + + if (!is_null($this->container['invoice_merchant_reference']) && (mb_strlen($this->container['invoice_merchant_reference']) > 100)) { + $invalidProperties[] = "invalid value for 'invoice_merchant_reference', the character length must be smaller than or equal to 100."; + } + + if ($this->container['line_items'] === null) { + $invalidProperties[] = "'line_items' can't be null"; + } + if (!is_null($this->container['merchant_reference']) && (mb_strlen($this->container['merchant_reference']) > 100)) { + $invalidProperties[] = "invalid value for 'merchant_reference', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['shipping_method']) && (mb_strlen($this->container['shipping_method']) > 200)) { + $invalidProperties[] = "invalid value for 'shipping_method', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['success_url']) && (mb_strlen($this->container['success_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'success_url', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['success_url']) && (mb_strlen($this->container['success_url']) < 9)) { + $invalidProperties[] = "invalid value for 'success_url', the character length must be bigger than or equal to 9."; + } + if (!is_null($this->container['device_session_identifier']) && (mb_strlen($this->container['device_session_identifier']) > 40)) { $invalidProperties[] = "invalid value for 'device_session_identifier', the character length must be smaller than or equal to 40."; } @@ -199,9 +206,6 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'device_session_identifier', the character length must be bigger than or equal to 10."; } - if ($this->container['line_items'] === null) { - $invalidProperties[] = "'line_items' can't be null"; - } return $invalidProperties; } @@ -307,31 +311,6 @@ public function setAutoConfirmationEnabled($auto_confirmation_enabled) } - /** - * Gets billing_address - * - * @return \PostFinanceCheckout\Sdk\Model\AddressCreate - */ - public function getBillingAddress() - { - return $this->container['billing_address']; - } - - /** - * Sets billing_address - * - * @param \PostFinanceCheckout\Sdk\Model\AddressCreate $billing_address - * - * @return $this - */ - public function setBillingAddress($billing_address) - { - $this->container['billing_address'] = $billing_address; - - return $this; - } - - /** * Gets charge_retry_enabled * @@ -489,56 +468,6 @@ public function setEnvironmentSelectionStrategy($environment_selection_strategy) } - /** - * Gets line_items - * - * @return \PostFinanceCheckout\Sdk\Model\LineItemCreate[] - */ - public function getLineItems() - { - return $this->container['line_items']; - } - - /** - * Sets line_items - * - * @param \PostFinanceCheckout\Sdk\Model\LineItemCreate[] $line_items - * - * @return $this - */ - public function setLineItems($line_items) - { - $this->container['line_items'] = $line_items; - - return $this; - } - - - /** - * Gets shipping_address - * - * @return \PostFinanceCheckout\Sdk\Model\AddressCreate - */ - public function getShippingAddress() - { - return $this->container['shipping_address']; - } - - /** - * Sets shipping_address - * - * @param \PostFinanceCheckout\Sdk\Model\AddressCreate $shipping_address - * - * @return $this - */ - public function setShippingAddress($shipping_address) - { - $this->container['shipping_address'] = $shipping_address; - - return $this; - } - - /** * Gets space_view_id * @@ -563,31 +492,6 @@ public function setSpaceViewId($space_view_id) return $this; } - - /** - * Gets token - * - * @return int - */ - public function getToken() - { - return $this->container['token']; - } - - /** - * Sets token - * - * @param int $token - * - * @return $this - */ - public function setToken($token) - { - $this->container['token'] = $token; - - return $this; - } - /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TransactionInvoice.php b/lib/Model/TransactionInvoice.php index 806202e..a04543b 100644 --- a/lib/Model/TransactionInvoice.php +++ b/lib/Model/TransactionInvoice.php @@ -58,7 +58,6 @@ class TransactionInvoice extends TransactionAwareEntity 'external_id' => 'string', 'language' => 'string', 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItem[]', - 'linked_space_id' => 'int', 'merchant_reference' => 'string', 'outstanding_amount' => 'float', 'paid_on' => '\DateTime', @@ -87,7 +86,6 @@ class TransactionInvoice extends TransactionAwareEntity 'external_id' => null, 'language' => null, 'line_items' => null, - 'linked_space_id' => 'int64', 'merchant_reference' => null, 'outstanding_amount' => null, 'paid_on' => 'date-time', @@ -117,7 +115,6 @@ class TransactionInvoice extends TransactionAwareEntity 'external_id' => 'externalId', 'language' => 'language', 'line_items' => 'lineItems', - 'linked_space_id' => 'linkedSpaceId', 'merchant_reference' => 'merchantReference', 'outstanding_amount' => 'outstandingAmount', 'paid_on' => 'paidOn', @@ -146,7 +143,6 @@ class TransactionInvoice extends TransactionAwareEntity 'external_id' => 'setExternalId', 'language' => 'setLanguage', 'line_items' => 'setLineItems', - 'linked_space_id' => 'setLinkedSpaceId', 'merchant_reference' => 'setMerchantReference', 'outstanding_amount' => 'setOutstandingAmount', 'paid_on' => 'setPaidOn', @@ -175,7 +171,6 @@ class TransactionInvoice extends TransactionAwareEntity 'external_id' => 'getExternalId', 'language' => 'getLanguage', 'line_items' => 'getLineItems', - 'linked_space_id' => 'getLinkedSpaceId', 'merchant_reference' => 'getMerchantReference', 'outstanding_amount' => 'getOutstandingAmount', 'paid_on' => 'getPaidOn', @@ -223,8 +218,6 @@ public function __construct(array $data = null) $this->container['line_items'] = isset($data['line_items']) ? $data['line_items'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['merchant_reference'] = isset($data['merchant_reference']) ? $data['merchant_reference'] : null; $this->container['outstanding_amount'] = isset($data['outstanding_amount']) ? $data['outstanding_amount'] : null; @@ -628,31 +621,6 @@ public function setLineItems($line_items) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets merchant_reference * diff --git a/lib/Model/TransactionInvoiceCommentActive.php b/lib/Model/TransactionInvoiceCommentActive.php index 2badc9b..81243db 100644 --- a/lib/Model/TransactionInvoiceCommentActive.php +++ b/lib/Model/TransactionInvoiceCommentActive.php @@ -121,6 +121,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/TransactionInvoiceCommentCreate.php b/lib/Model/TransactionInvoiceCommentCreate.php index 638483a..da4de0d 100644 --- a/lib/Model/TransactionInvoiceCommentCreate.php +++ b/lib/Model/TransactionInvoiceCommentCreate.php @@ -114,6 +114,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) { + $invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144."; + } + if ($this->container['transaction_invoice'] === null) { $invalidProperties[] = "'transaction_invoice' can't be null"; } diff --git a/lib/Model/TransactionLineItemVersion.php b/lib/Model/TransactionLineItemVersion.php index a921f1b..a94b7fe 100644 --- a/lib/Model/TransactionLineItemVersion.php +++ b/lib/Model/TransactionLineItemVersion.php @@ -52,7 +52,6 @@ class TransactionLineItemVersion extends TransactionAwareEntity 'created_on' => '\DateTime', 'language' => 'string', 'line_items' => '\PostFinanceCheckout\Sdk\Model\LineItem[]', - 'linked_space_id' => 'int', 'planned_purge_date' => '\DateTime', 'space_view_id' => 'int', 'tax_amount' => 'float', @@ -71,7 +70,6 @@ class TransactionLineItemVersion extends TransactionAwareEntity 'created_on' => 'date-time', 'language' => null, 'line_items' => null, - 'linked_space_id' => 'int64', 'planned_purge_date' => 'date-time', 'space_view_id' => 'int64', 'tax_amount' => null, @@ -91,7 +89,6 @@ class TransactionLineItemVersion extends TransactionAwareEntity 'created_on' => 'createdOn', 'language' => 'language', 'line_items' => 'lineItems', - 'linked_space_id' => 'linkedSpaceId', 'planned_purge_date' => 'plannedPurgeDate', 'space_view_id' => 'spaceViewId', 'tax_amount' => 'taxAmount', @@ -110,7 +107,6 @@ class TransactionLineItemVersion extends TransactionAwareEntity 'created_on' => 'setCreatedOn', 'language' => 'setLanguage', 'line_items' => 'setLineItems', - 'linked_space_id' => 'setLinkedSpaceId', 'planned_purge_date' => 'setPlannedPurgeDate', 'space_view_id' => 'setSpaceViewId', 'tax_amount' => 'setTaxAmount', @@ -129,7 +125,6 @@ class TransactionLineItemVersion extends TransactionAwareEntity 'created_on' => 'getCreatedOn', 'language' => 'getLanguage', 'line_items' => 'getLineItems', - 'linked_space_id' => 'getLinkedSpaceId', 'planned_purge_date' => 'getPlannedPurgeDate', 'space_view_id' => 'getSpaceViewId', 'tax_amount' => 'getTaxAmount', @@ -161,8 +156,6 @@ public function __construct(array $data = null) $this->container['line_items'] = isset($data['line_items']) ? $data['line_items'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; $this->container['space_view_id'] = isset($data['space_view_id']) ? $data['space_view_id'] : null; @@ -389,31 +382,6 @@ public function setLineItems($line_items) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets planned_purge_date * diff --git a/lib/Model/TransactionPending.php b/lib/Model/TransactionPending.php index 8a3a734..a110abe 100644 --- a/lib/Model/TransactionPending.php +++ b/lib/Model/TransactionPending.php @@ -121,6 +121,38 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['customer_email_address']) && (mb_strlen($this->container['customer_email_address']) > 254)) { + $invalidProperties[] = "invalid value for 'customer_email_address', the character length must be smaller than or equal to 254."; + } + + if (!is_null($this->container['failed_url']) && (mb_strlen($this->container['failed_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'failed_url', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['failed_url']) && (mb_strlen($this->container['failed_url']) < 9)) { + $invalidProperties[] = "invalid value for 'failed_url', the character length must be bigger than or equal to 9."; + } + + if (!is_null($this->container['invoice_merchant_reference']) && (mb_strlen($this->container['invoice_merchant_reference']) > 100)) { + $invalidProperties[] = "invalid value for 'invoice_merchant_reference', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['merchant_reference']) && (mb_strlen($this->container['merchant_reference']) > 100)) { + $invalidProperties[] = "invalid value for 'merchant_reference', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['shipping_method']) && (mb_strlen($this->container['shipping_method']) > 200)) { + $invalidProperties[] = "invalid value for 'shipping_method', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['success_url']) && (mb_strlen($this->container['success_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'success_url', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['success_url']) && (mb_strlen($this->container['success_url']) < 9)) { + $invalidProperties[] = "invalid value for 'success_url', the character length must be bigger than or equal to 9."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/TransactionVoid.php b/lib/Model/TransactionVoid.php index 56f08c1..9c7212e 100644 --- a/lib/Model/TransactionVoid.php +++ b/lib/Model/TransactionVoid.php @@ -53,7 +53,6 @@ class TransactionVoid extends TransactionAwareEntity 'failure_reason' => '\PostFinanceCheckout\Sdk\Model\FailureReason', 'labels' => '\PostFinanceCheckout\Sdk\Model\Label[]', 'language' => 'string', - 'linked_space_id' => 'int', 'mode' => '\PostFinanceCheckout\Sdk\Model\TransactionVoidMode', 'next_update_on' => '\DateTime', 'planned_purge_date' => '\DateTime', @@ -78,7 +77,6 @@ class TransactionVoid extends TransactionAwareEntity 'failure_reason' => null, 'labels' => null, 'language' => null, - 'linked_space_id' => 'int64', 'mode' => null, 'next_update_on' => 'date-time', 'planned_purge_date' => 'date-time', @@ -104,7 +102,6 @@ class TransactionVoid extends TransactionAwareEntity 'failure_reason' => 'failureReason', 'labels' => 'labels', 'language' => 'language', - 'linked_space_id' => 'linkedSpaceId', 'mode' => 'mode', 'next_update_on' => 'nextUpdateOn', 'planned_purge_date' => 'plannedPurgeDate', @@ -129,7 +126,6 @@ class TransactionVoid extends TransactionAwareEntity 'failure_reason' => 'setFailureReason', 'labels' => 'setLabels', 'language' => 'setLanguage', - 'linked_space_id' => 'setLinkedSpaceId', 'mode' => 'setMode', 'next_update_on' => 'setNextUpdateOn', 'planned_purge_date' => 'setPlannedPurgeDate', @@ -154,7 +150,6 @@ class TransactionVoid extends TransactionAwareEntity 'failure_reason' => 'getFailureReason', 'labels' => 'getLabels', 'language' => 'getLanguage', - 'linked_space_id' => 'getLinkedSpaceId', 'mode' => 'getMode', 'next_update_on' => 'getNextUpdateOn', 'planned_purge_date' => 'getPlannedPurgeDate', @@ -193,8 +188,6 @@ public function __construct(array $data = null) $this->container['language'] = isset($data['language']) ? $data['language'] : null; - $this->container['linked_space_id'] = isset($data['linked_space_id']) ? $data['linked_space_id'] : null; - $this->container['mode'] = isset($data['mode']) ? $data['mode'] : null; $this->container['next_update_on'] = isset($data['next_update_on']) ? $data['next_update_on'] : null; @@ -456,31 +449,6 @@ public function setLanguage($language) } - /** - * Gets linked_space_id - * - * @return int - */ - public function getLinkedSpaceId() - { - return $this->container['linked_space_id']; - } - - /** - * Sets linked_space_id - * - * @param int $linked_space_id The linked space id holds the ID of the space to which the entity belongs to. - * - * @return $this - */ - public function setLinkedSpaceId($linked_space_id) - { - $this->container['linked_space_id'] = $linked_space_id; - - return $this; - } - - /** * Gets mode * diff --git a/lib/Model/WebhookListenerCreate.php b/lib/Model/WebhookListenerCreate.php index 3f5714f..2140c39 100644 --- a/lib/Model/WebhookListenerCreate.php +++ b/lib/Model/WebhookListenerCreate.php @@ -128,6 +128,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + if ($this->container['entity'] === null) { $invalidProperties[] = "'entity' can't be null"; } diff --git a/lib/Model/WebhookListenerUpdate.php b/lib/Model/WebhookListenerUpdate.php index 8c7aa20..feb322c 100644 --- a/lib/Model/WebhookListenerUpdate.php +++ b/lib/Model/WebhookListenerUpdate.php @@ -121,6 +121,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/WebhookUrlCreate.php b/lib/Model/WebhookUrlCreate.php index bd40ed2..9a047e3 100644 --- a/lib/Model/WebhookUrlCreate.php +++ b/lib/Model/WebhookUrlCreate.php @@ -112,6 +112,18 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) > 500)) { + $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) < 9)) { + $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 9."; + } + return $invalidProperties; } diff --git a/lib/Model/WebhookUrlUpdate.php b/lib/Model/WebhookUrlUpdate.php index 638208c..d4d5549 100644 --- a/lib/Model/WebhookUrlUpdate.php +++ b/lib/Model/WebhookUrlUpdate.php @@ -121,6 +121,18 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 50)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 50."; + } + + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) > 500)) { + $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) < 9)) { + $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 9."; + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Service/TokenService.php b/lib/Service/TokenService.php index ad93294..b976f00 100644 --- a/lib/Service/TokenService.php +++ b/lib/Service/TokenService.php @@ -66,6 +66,119 @@ public function getApiClient() { } + /** + * Operation checkTokenCreationPossible + * + * Check If Token Creation Is Possible + * + * @param int $space_id (required) + * @param int $transaction_id The id of the transaction for which we want to check if the token can be created or not. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return bool + */ + public function checkTokenCreationPossible($space_id, $transaction_id) { + return $this->checkTokenCreationPossibleWithHttpInfo($space_id, $transaction_id)->getData(); + } + + /** + * Operation checkTokenCreationPossibleWithHttpInfo + * + * Check If Token Creation Is Possible + * + * @param int $space_id (required) + * @param int $transaction_id The id of the transaction for which we want to check if the token can be created or not. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function checkTokenCreationPossibleWithHttpInfo($space_id, $transaction_id) { + // verify the required parameter 'space_id' is set + if (is_null($space_id)) { + throw new \InvalidArgumentException('Missing the required parameter $space_id when calling checkTokenCreationPossible'); + } + // verify the required parameter 'transaction_id' is set + if (is_null($transaction_id)) { + throw new \InvalidArgumentException('Missing the required parameter $transaction_id when calling checkTokenCreationPossible'); + } + // header params + $headerParams = []; + $headerAccept = $this->apiClient->selectHeaderAccept([]); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType([]); + + // query params + $queryParams = []; + if (!is_null($space_id)) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($space_id); + } + if (!is_null($transaction_id)) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transaction_id); + } + + // path params + $resourcePath = '/token/check-token-creation-possible'; + // default format to json + $resourcePath = str_replace('{format}', 'json', $resourcePath); + + // form params + $formParams = []; + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (!empty($formParams)) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $this->apiClient->setConnectionTimeout(ApiClient::CONNECTION_TIMEOUT); + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'bool', + '/token/check-token-creation-possible' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'bool', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'bool', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 442: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\ClientError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 542: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\ServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + /** * Operation count * @@ -292,6 +405,119 @@ public function createWithHttpInfo($space_id, $entity) { } } + /** + * Operation createTokenBasedOnTransaction + * + * Create Token Based On Transaction + * + * @param int $space_id (required) + * @param int $transaction_id The id of the transaction for which we want to create the token. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return \PostFinanceCheckout\Sdk\Model\TokenVersion + */ + public function createTokenBasedOnTransaction($space_id, $transaction_id) { + return $this->createTokenBasedOnTransactionWithHttpInfo($space_id, $transaction_id)->getData(); + } + + /** + * Operation createTokenBasedOnTransactionWithHttpInfo + * + * Create Token Based On Transaction + * + * @param int $space_id (required) + * @param int $transaction_id The id of the transaction for which we want to create the token. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createTokenBasedOnTransactionWithHttpInfo($space_id, $transaction_id) { + // verify the required parameter 'space_id' is set + if (is_null($space_id)) { + throw new \InvalidArgumentException('Missing the required parameter $space_id when calling createTokenBasedOnTransaction'); + } + // verify the required parameter 'transaction_id' is set + if (is_null($transaction_id)) { + throw new \InvalidArgumentException('Missing the required parameter $transaction_id when calling createTokenBasedOnTransaction'); + } + // header params + $headerParams = []; + $headerAccept = $this->apiClient->selectHeaderAccept([]); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType([]); + + // query params + $queryParams = []; + if (!is_null($space_id)) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($space_id); + } + if (!is_null($transaction_id)) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transaction_id); + } + + // path params + $resourcePath = '/token/create-token-based-on-transaction'; + // default format to json + $resourcePath = str_replace('{format}', 'json', $resourcePath); + + // form params + $formParams = []; + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (!empty($formParams)) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $this->apiClient->setConnectionTimeout(ApiClient::CONNECTION_TIMEOUT); + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\PostFinanceCheckout\Sdk\Model\TokenVersion', + '/token/create-token-based-on-transaction' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\PostFinanceCheckout\Sdk\Model\TokenVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\TokenVersion', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 442: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\ClientError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 542: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\ServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + /** * Operation createTransactionForTokenUpdate * diff --git a/test/ApiClientTest.php b/test/ApiClientTest.php index 0ccea02..e3c0a0d 100644 --- a/test/ApiClientTest.php +++ b/test/ApiClientTest.php @@ -40,6 +40,11 @@ final class ApiClientTest extends TestCase * @var PostFinanceCheckout\Sdk\ApiClient */ protected $apiClient; + + /** + * @var int + */ + private $spaceId = 405; /** * Setup before running each test case @@ -101,8 +106,30 @@ public function testSocketHttpClient() public function testEnvClient() { putenv('PFC_HTTP_CLIENT=' . HttpClientFactory::TYPE_CURL); - echo getenv('PFC_HTTP_CLIENT') . PHP_EOL; - $this->callApi(); + $this->assertEquals(HttpClientFactory::getClient(HttpClientFactory::TYPE_CURL), HttpClientFactory::getClient()); + + putenv('PFC_HTTP_CLIENT=' . HttpClientFactory::TYPE_SOCKET); + $this->assertEquals(HttpClientFactory::getClient(HttpClientFactory::TYPE_SOCKET), HttpClientFactory::getClient()); + } + + /** + * Test case for an empty response + */ + public function testEmptyResponseWithSocketClient() + { + $this->apiClient->setHttpClientType(HttpClientFactory::TYPE_SOCKET); + $transactionRead = $this->apiClient->getTransactionService()->read($this->spaceId, 1); + $this->assertEquals(null, $transactionRead->getId()); + } + + /** + * Test case for an empty response + */ + public function testEmptyResponseWithCurlClient() + { + $this->apiClient->setHttpClientType(HttpClientFactory::TYPE_CURL); + $transactionRead = $this->apiClient->getTransactionService()->read($this->spaceId, 1); + $this->assertEquals(null, $transactionRead->getId()); } } diff --git a/test/RefundServiceTest.php b/test/RefundServiceTest.php index 75376f5..7e29668 100644 --- a/test/RefundServiceTest.php +++ b/test/RefundServiceTest.php @@ -140,6 +140,7 @@ private function getTransactionPayload() $this->transactionPayload->setAutoConfirmationEnabled(true); $this->transactionPayload->setBillingAddress($billingAddress); $this->transactionPayload->setShippingAddress($billingAddress); + $this->transactionPayload->setToken(767); } return $this->transactionPayload; } @@ -216,7 +217,7 @@ public function testRefund() if (in_array($transaction->getState(), [TransactionState::FULFILL, TransactionState::FAILED])) { break; } - sleep($i * 30); + sleep($i * 5); $transaction = $this->apiClient->getTransactionService()->read($this->spaceId, $transaction->getId()); } if (in_array($transaction->getState(), [TransactionState::FULFILL])) { diff --git a/test/TransactionCompletionServiceTest.php b/test/TransactionCompletionServiceTest.php index a28fb14..f8302f6 100644 --- a/test/TransactionCompletionServiceTest.php +++ b/test/TransactionCompletionServiceTest.php @@ -137,6 +137,7 @@ private function getTransactionPayload() $this->transactionPayload->setAutoConfirmationEnabled(true); $this->transactionPayload->setBillingAddress($billingAddress); $this->transactionPayload->setShippingAddress($billingAddress); + $this->transactionPayload->setToken(766); } return $this->transactionPayload; } @@ -157,7 +158,7 @@ public function testCompleteOffline() if ($transaction->getState() == TransactionState::AUTHORIZED) { break; } - sleep($i * 30); + sleep($i * 5); $transaction = $this->apiClient->getTransactionService()->read($this->spaceId, $transaction->getId()); } if ($transaction->getState() == TransactionState::AUTHORIZED) { diff --git a/test/TransactionServiceTest.php b/test/TransactionServiceTest.php index 8f1abee..59455ff 100644 --- a/test/TransactionServiceTest.php +++ b/test/TransactionServiceTest.php @@ -116,6 +116,7 @@ private function getTransactionPayload() $this->transactionPayload->setAutoConfirmationEnabled(true); $this->transactionPayload->setBillingAddress($billingAddress); $this->transactionPayload->setShippingAddress($billingAddress); + $this->transactionPayload->setToken(767); } return $this->transactionPayload; }