diff --git a/README.md b/README.md index df34f17..65f9b9c 100644 --- a/README.md +++ b/README.md @@ -108,9 +108,9 @@ $userId = 512; $secret = 'FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ='; // Setup API client -$client = new \PostFinanceCheckout\Sdk\Sdk\ApiClient($userId, $secret); +$client = new \PostFinanceCheckout\Sdk\ApiClient($userId, $secret); -$httpClientType = \PostFinanceCheckout\Sdk\Sdk\Http\HttpClientFactory::TYPE_CURL; // or \PostFinanceCheckout\Sdk\Sdk\Http\HttpClientFactory::TYPE_SOCKET +$httpClientType = \PostFinanceCheckout\Sdk\Http\HttpClientFactory::TYPE_CURL; // or \PostFinanceCheckout\Sdk\Http\HttpClientFactory::TYPE_SOCKET $client->setHttpClientType($httpClientType); ``` diff --git a/composer.json b/composer.json index fc52141..782057a 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "postfinancecheckout/sdk", - "version": "2.1.0", + "version": "2.1.1", "description": "PostFinance Checkout SDK for PHP", "keywords": [ "postfinancecheckout", diff --git a/lib/ApiClient.php b/lib/ApiClient.php index 627fbbd..351ff53 100644 --- a/lib/ApiClient.php +++ b/lib/ApiClient.php @@ -54,7 +54,7 @@ final class ApiClient { * * @var string */ - private $userAgent = 'PHP-Client/2.1.0/php'; + private $userAgent = 'PHP-Client/2.1.1/php'; /** * The path to the certificate authority file. @@ -895,6 +895,18 @@ public function getRefundService() { return $this->refundService; } + protected $shopifyTransactionService; + + /** + * @return \PostFinanceCheckout\Sdk\Service\ShopifyTransactionService + */ + public function getShopifyTransactionService() { + if(is_null($this->shopifyTransactionService)){ + $this->shopifyTransactionService = new \PostFinanceCheckout\Sdk\Service\ShopifyTransactionService($this); + } + return $this->shopifyTransactionService; + } + protected $spaceService; /** diff --git a/lib/Configuration.php b/lib/Configuration.php index bf099f7..a932cb1 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -80,7 +80,7 @@ class Configuration * * @var string */ - protected $userAgent = 'PostFinanceCheckout\Sdk/2.1.0/php'; + protected $userAgent = 'PostFinanceCheckout\Sdk/2.1.1/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.0' . PHP_EOL; - $report .= ' SDK Package Version: 2.1.0' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 2.1.1' . PHP_EOL; + $report .= ' SDK Package Version: 2.1.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/AbstractAccountUpdate.php b/lib/Model/AbstractAccountUpdate.php index c8b5cb5..f4391a7 100644 --- a/lib/Model/AbstractAccountUpdate.php +++ b/lib/Model/AbstractAccountUpdate.php @@ -126,6 +126,14 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -225,6 +233,13 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractAccountUpdate., must be smaller than or equal to 200.'); + } + if (!is_null($name) && (mb_strlen($name) < 3)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractAccountUpdate., must be bigger than or equal to 3.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/AbstractApplicationUserUpdate.php b/lib/Model/AbstractApplicationUserUpdate.php index 6667c96..5f07da8 100644 --- a/lib/Model/AbstractApplicationUserUpdate.php +++ b/lib/Model/AbstractApplicationUserUpdate.php @@ -133,6 +133,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -232,6 +236,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 256)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractApplicationUserUpdate., must be smaller than or equal to 256.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/AbstractCustomerActive.php b/lib/Model/AbstractCustomerActive.php index 1d22080..ccff13f 100644 --- a/lib/Model/AbstractCustomerActive.php +++ b/lib/Model/AbstractCustomerActive.php @@ -161,6 +161,22 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -260,6 +276,10 @@ public function getCustomerId() */ public function setCustomerId($customer_id) { + if (!is_null($customer_id) && (mb_strlen($customer_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $customer_id when calling AbstractCustomerActive., must be smaller than or equal to 100.'); + } + $this->container['customer_id'] = $customer_id; return $this; @@ -285,6 +305,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling AbstractCustomerActive., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -310,6 +334,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling AbstractCustomerActive., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -335,6 +363,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling AbstractCustomerActive., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; diff --git a/lib/Model/AbstractCustomerCommentActive.php b/lib/Model/AbstractCustomerCommentActive.php index 8a4de88..2ba9791 100644 --- a/lib/Model/AbstractCustomerCommentActive.php +++ b/lib/Model/AbstractCustomerCommentActive.php @@ -119,6 +119,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -218,6 +222,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling AbstractCustomerCommentActive., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; diff --git a/lib/Model/AbstractHumanUserUpdate.php b/lib/Model/AbstractHumanUserUpdate.php index 7e9c2b0..a6dbba3 100644 --- a/lib/Model/AbstractHumanUserUpdate.php +++ b/lib/Model/AbstractHumanUserUpdate.php @@ -168,6 +168,22 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -267,6 +283,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 128)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling AbstractHumanUserUpdate., must be smaller than or equal to 128.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -292,6 +312,10 @@ public function getFirstname() */ public function setFirstname($firstname) { + if (!is_null($firstname) && (mb_strlen($firstname) > 100)) { + throw new \InvalidArgumentException('invalid length for $firstname when calling AbstractHumanUserUpdate., must be smaller than or equal to 100.'); + } + $this->container['firstname'] = $firstname; return $this; @@ -342,6 +366,10 @@ public function getLastname() */ public function setLastname($lastname) { + if (!is_null($lastname) && (mb_strlen($lastname) > 100)) { + throw new \InvalidArgumentException('invalid length for $lastname when calling AbstractHumanUserUpdate., must be smaller than or equal to 100.'); + } + $this->container['lastname'] = $lastname; return $this; @@ -367,6 +395,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 30)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling AbstractHumanUserUpdate., must be smaller than or equal to 30.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; diff --git a/lib/Model/AbstractRefundCommentActive.php b/lib/Model/AbstractRefundCommentActive.php index f73074d..b276f1c 100644 --- a/lib/Model/AbstractRefundCommentActive.php +++ b/lib/Model/AbstractRefundCommentActive.php @@ -119,6 +119,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -218,6 +222,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling AbstractRefundCommentActive., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; diff --git a/lib/Model/AbstractSpaceUpdate.php b/lib/Model/AbstractSpaceUpdate.php index 6ad1aeb..19c0101 100644 --- a/lib/Model/AbstractSpaceUpdate.php +++ b/lib/Model/AbstractSpaceUpdate.php @@ -161,6 +161,14 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -260,6 +268,13 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractSpaceUpdate., must be smaller than or equal to 200.'); + } + if (!is_null($name) && (mb_strlen($name) < 3)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractSpaceUpdate., must be bigger than or equal to 3.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/AbstractTransactionCommentActive.php b/lib/Model/AbstractTransactionCommentActive.php index 88e2ace..0c58d59 100644 --- a/lib/Model/AbstractTransactionCommentActive.php +++ b/lib/Model/AbstractTransactionCommentActive.php @@ -119,6 +119,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -218,6 +222,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling AbstractTransactionCommentActive., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; diff --git a/lib/Model/AbstractTransactionInvoiceCommentActive.php b/lib/Model/AbstractTransactionInvoiceCommentActive.php index eb0883a..5ab9f5b 100644 --- a/lib/Model/AbstractTransactionInvoiceCommentActive.php +++ b/lib/Model/AbstractTransactionInvoiceCommentActive.php @@ -119,6 +119,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -218,6 +222,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling AbstractTransactionInvoiceCommentActive., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; diff --git a/lib/Model/AbstractTransactionPending.php b/lib/Model/AbstractTransactionPending.php index 5d1afdc..88d965b 100644 --- a/lib/Model/AbstractTransactionPending.php +++ b/lib/Model/AbstractTransactionPending.php @@ -238,6 +238,22 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['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."; + } + return $invalidProperties; } @@ -437,6 +453,10 @@ public function getCustomerEmailAddress() */ public function setCustomerEmailAddress($customer_email_address) { + if (!is_null($customer_email_address) && (mb_strlen($customer_email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $customer_email_address when calling AbstractTransactionPending., must be smaller than or equal to 254.'); + } + $this->container['customer_email_address'] = $customer_email_address; return $this; @@ -512,6 +532,10 @@ public function getInvoiceMerchantReference() */ public function setInvoiceMerchantReference($invoice_merchant_reference) { + if (!is_null($invoice_merchant_reference) && (mb_strlen($invoice_merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $invoice_merchant_reference when calling AbstractTransactionPending., must be smaller than or equal to 100.'); + } + $this->container['invoice_merchant_reference'] = $invoice_merchant_reference; return $this; @@ -587,6 +611,10 @@ public function getMerchantReference() */ public function setMerchantReference($merchant_reference) { + if (!is_null($merchant_reference) && (mb_strlen($merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $merchant_reference when calling AbstractTransactionPending., must be smaller than or equal to 100.'); + } + $this->container['merchant_reference'] = $merchant_reference; return $this; @@ -662,6 +690,10 @@ public function getShippingMethod() */ public function setShippingMethod($shipping_method) { + if (!is_null($shipping_method) && (mb_strlen($shipping_method) > 200)) { + throw new \InvalidArgumentException('invalid length for $shipping_method when calling AbstractTransactionPending., must be smaller than or equal to 200.'); + } + $this->container['shipping_method'] = $shipping_method; return $this; diff --git a/lib/Model/AbstractWebhookListenerUpdate.php b/lib/Model/AbstractWebhookListenerUpdate.php index 7c4e553..e752228 100644 --- a/lib/Model/AbstractWebhookListenerUpdate.php +++ b/lib/Model/AbstractWebhookListenerUpdate.php @@ -140,6 +140,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -264,6 +268,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractWebhookListenerUpdate., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/AbstractWebhookUrlUpdate.php b/lib/Model/AbstractWebhookUrlUpdate.php index 2cb5894..3f143e4 100644 --- a/lib/Model/AbstractWebhookUrlUpdate.php +++ b/lib/Model/AbstractWebhookUrlUpdate.php @@ -133,6 +133,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -232,6 +236,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new \InvalidArgumentException('invalid length for $name when calling AbstractWebhookUrlUpdate., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/Account.php b/lib/Model/Account.php index 46bd6c8..d4f5258 100644 --- a/lib/Model/Account.php +++ b/lib/Model/Account.php @@ -211,6 +211,14 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -435,6 +443,13 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling Account., must be smaller than or equal to 200.'); + } + if (!is_null($name) && (mb_strlen($name) < 3)) { + throw new \InvalidArgumentException('invalid length for $name when calling Account., must be bigger than or equal to 3.'); + } + $this->container['name'] = $name; 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/Address.php b/lib/Model/Address.php index 3d90d7d..ea4d270 100644 --- a/lib/Model/Address.php +++ b/lib/Model/Address.php @@ -253,6 +253,66 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 100)) { + $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['commercial_register_number']) && (mb_strlen($this->container['commercial_register_number']) > 100)) { + $invalidProperties[] = "invalid value for 'commercial_register_number', the character length must be smaller than or equal to 100."; + } + + 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['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 (!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['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 100)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['postcode']) && (mb_strlen($this->container['postcode']) > 40)) { + $invalidProperties[] = "invalid value for 'postcode', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['sales_tax_number']) && (mb_strlen($this->container['sales_tax_number']) > 100)) { + $invalidProperties[] = "invalid value for 'sales_tax_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['social_security_number']) && (mb_strlen($this->container['social_security_number']) > 100)) { + $invalidProperties[] = "invalid value for 'social_security_number', the character length must be smaller than or equal to 100."; + } + + 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."; + } + + if (!is_null($this->container['street']) && (mb_strlen($this->container['street']) > 300)) { + $invalidProperties[] = "invalid value for 'street', the character length must be smaller than or equal to 300."; + } + return $invalidProperties; } @@ -352,6 +412,10 @@ public function getCity() */ public function setCity($city) { + if (!is_null($city) && (mb_strlen($city) > 100)) { + throw new \InvalidArgumentException('invalid length for $city when calling Address., must be smaller than or equal to 100.'); + } + $this->container['city'] = $city; return $this; @@ -377,6 +441,10 @@ public function getCommercialRegisterNumber() */ public function setCommercialRegisterNumber($commercial_register_number) { + if (!is_null($commercial_register_number) && (mb_strlen($commercial_register_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $commercial_register_number when calling Address., must be smaller than or equal to 100.'); + } + $this->container['commercial_register_number'] = $commercial_register_number; return $this; @@ -452,6 +520,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling Address., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -477,6 +549,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling Address., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -502,6 +578,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling Address., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -552,6 +632,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling Address., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -602,6 +686,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling Address., must be smaller than or equal to 100.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; @@ -627,6 +715,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling Address., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -652,6 +744,10 @@ public function getPhoneNumber() */ public function setPhoneNumber($phone_number) { + if (!is_null($phone_number) && (mb_strlen($phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $phone_number when calling Address., must be smaller than or equal to 100.'); + } + $this->container['phone_number'] = $phone_number; return $this; @@ -702,6 +798,10 @@ public function getPostcode() */ public function setPostcode($postcode) { + if (!is_null($postcode) && (mb_strlen($postcode) > 40)) { + throw new \InvalidArgumentException('invalid length for $postcode when calling Address., must be smaller than or equal to 40.'); + } + $this->container['postcode'] = $postcode; return $this; @@ -727,6 +827,10 @@ public function getSalesTaxNumber() */ public function setSalesTaxNumber($sales_tax_number) { + if (!is_null($sales_tax_number) && (mb_strlen($sales_tax_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $sales_tax_number when calling Address., must be smaller than or equal to 100.'); + } + $this->container['sales_tax_number'] = $sales_tax_number; return $this; @@ -752,6 +856,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling Address., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -777,6 +885,10 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($social_security_number) { + if (!is_null($social_security_number) && (mb_strlen($social_security_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $social_security_number when calling Address., must be smaller than or equal to 100.'); + } + $this->container['social_security_number'] = $social_security_number; return $this; @@ -802,6 +914,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling Address., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; @@ -827,6 +943,10 @@ public function getStreet() */ public function setStreet($street) { + if (!is_null($street) && (mb_strlen($street) > 300)) { + throw new \InvalidArgumentException('invalid length for $street when calling Address., must be smaller than or equal to 300.'); + } + $this->container['street'] = $street; return $this; diff --git a/lib/Model/AddressCreate.php b/lib/Model/AddressCreate.php index e6d0e67..52f79b7 100644 --- a/lib/Model/AddressCreate.php +++ b/lib/Model/AddressCreate.php @@ -253,6 +253,66 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 100)) { + $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['commercial_register_number']) && (mb_strlen($this->container['commercial_register_number']) > 100)) { + $invalidProperties[] = "invalid value for 'commercial_register_number', the character length must be smaller than or equal to 100."; + } + + 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['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 (!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['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 100)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['postcode']) && (mb_strlen($this->container['postcode']) > 40)) { + $invalidProperties[] = "invalid value for 'postcode', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['sales_tax_number']) && (mb_strlen($this->container['sales_tax_number']) > 100)) { + $invalidProperties[] = "invalid value for 'sales_tax_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['social_security_number']) && (mb_strlen($this->container['social_security_number']) > 100)) { + $invalidProperties[] = "invalid value for 'social_security_number', the character length must be smaller than or equal to 100."; + } + + 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."; + } + + if (!is_null($this->container['street']) && (mb_strlen($this->container['street']) > 300)) { + $invalidProperties[] = "invalid value for 'street', the character length must be smaller than or equal to 300."; + } + return $invalidProperties; } @@ -352,6 +412,10 @@ public function getCity() */ public function setCity($city) { + if (!is_null($city) && (mb_strlen($city) > 100)) { + throw new \InvalidArgumentException('invalid length for $city when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['city'] = $city; return $this; @@ -377,6 +441,10 @@ public function getCommercialRegisterNumber() */ public function setCommercialRegisterNumber($commercial_register_number) { + if (!is_null($commercial_register_number) && (mb_strlen($commercial_register_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $commercial_register_number when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['commercial_register_number'] = $commercial_register_number; return $this; @@ -452,6 +520,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -477,6 +549,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling AddressCreate., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -502,6 +578,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -552,6 +632,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -602,6 +686,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; @@ -627,6 +715,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -652,6 +744,10 @@ public function getPhoneNumber() */ public function setPhoneNumber($phone_number) { + if (!is_null($phone_number) && (mb_strlen($phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $phone_number when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['phone_number'] = $phone_number; return $this; @@ -702,6 +798,10 @@ public function getPostcode() */ public function setPostcode($postcode) { + if (!is_null($postcode) && (mb_strlen($postcode) > 40)) { + throw new \InvalidArgumentException('invalid length for $postcode when calling AddressCreate., must be smaller than or equal to 40.'); + } + $this->container['postcode'] = $postcode; return $this; @@ -727,6 +827,10 @@ public function getSalesTaxNumber() */ public function setSalesTaxNumber($sales_tax_number) { + if (!is_null($sales_tax_number) && (mb_strlen($sales_tax_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $sales_tax_number when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['sales_tax_number'] = $sales_tax_number; return $this; @@ -752,6 +856,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling AddressCreate., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -777,6 +885,10 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($social_security_number) { + if (!is_null($social_security_number) && (mb_strlen($social_security_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $social_security_number when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['social_security_number'] = $social_security_number; return $this; @@ -802,6 +914,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling AddressCreate., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; @@ -827,6 +943,10 @@ public function getStreet() */ public function setStreet($street) { + if (!is_null($street) && (mb_strlen($street) > 300)) { + throw new \InvalidArgumentException('invalid length for $street when calling AddressCreate., must be smaller than or equal to 300.'); + } + $this->container['street'] = $street; return $this; diff --git a/lib/Model/ApplicationUser.php b/lib/Model/ApplicationUser.php index 7e4aecd..9fa6cfb 100644 --- a/lib/Model/ApplicationUser.php +++ b/lib/Model/ApplicationUser.php @@ -128,6 +128,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; } @@ -227,6 +231,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 256)) { + throw new \InvalidArgumentException('invalid length for $name when calling ApplicationUser., must be smaller than or equal to 256.'); + } + $this->container['name'] = $name; return $this; 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/ChargeAttempt.php b/lib/Model/ChargeAttempt.php index ca81053..d2d1bd0 100644 --- a/lib/Model/ChargeAttempt.php +++ b/lib/Model/ChargeAttempt.php @@ -268,6 +268,10 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['user_failure_message']) && (mb_strlen($this->container['user_failure_message']) > 2000)) { + $invalidProperties[] = "invalid value for 'user_failure_message', the character length must be smaller than or equal to 2000."; + } + return $invalidProperties; } @@ -892,6 +896,10 @@ public function getUserFailureMessage() */ public function setUserFailureMessage($user_failure_message) { + if (!is_null($user_failure_message) && (mb_strlen($user_failure_message) > 2000)) { + throw new \InvalidArgumentException('invalid length for $user_failure_message when calling ChargeAttempt., must be smaller than or equal to 2000.'); + } + $this->container['user_failure_message'] = $user_failure_message; return $this; diff --git a/lib/Model/ChargeFlowLevelConfiguration.php b/lib/Model/ChargeFlowLevelConfiguration.php index 36d38b7..2e98c08 100644 --- a/lib/Model/ChargeFlowLevelConfiguration.php +++ b/lib/Model/ChargeFlowLevelConfiguration.php @@ -183,6 +183,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -357,6 +361,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling ChargeFlowLevelConfiguration., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/CompletionLineItem.php b/lib/Model/CompletionLineItem.php index 602f001..f701320 100644 --- a/lib/Model/CompletionLineItem.php +++ b/lib/Model/CompletionLineItem.php @@ -134,6 +134,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['unique_id']) && (mb_strlen($this->container['unique_id']) > 200)) { + $invalidProperties[] = "invalid value for 'unique_id', the character length must be smaller than or equal to 200."; + } + return $invalidProperties; } @@ -283,6 +287,10 @@ public function getUniqueId() */ public function setUniqueId($unique_id) { + if (!is_null($unique_id) && (mb_strlen($unique_id) > 200)) { + throw new \InvalidArgumentException('invalid length for $unique_id when calling CompletionLineItem., must be smaller than or equal to 200.'); + } + $this->container['unique_id'] = $unique_id; return $this; diff --git a/lib/Model/CompletionLineItemCreate.php b/lib/Model/CompletionLineItemCreate.php index 951aa04..c09d5ad 100644 --- a/lib/Model/CompletionLineItemCreate.php +++ b/lib/Model/CompletionLineItemCreate.php @@ -143,6 +143,10 @@ public function listInvalidProperties() if ($this->container['unique_id'] === null) { $invalidProperties[] = "'unique_id' can't be null"; } + if ((mb_strlen($this->container['unique_id']) > 200)) { + $invalidProperties[] = "invalid value for 'unique_id', the character length must be smaller than or equal to 200."; + } + return $invalidProperties; } @@ -292,6 +296,10 @@ public function getUniqueId() */ public function setUniqueId($unique_id) { + if ((mb_strlen($unique_id) > 200)) { + throw new \InvalidArgumentException('invalid length for $unique_id when calling CompletionLineItemCreate., must be smaller than or equal to 200.'); + } + $this->container['unique_id'] = $unique_id; return $this; diff --git a/lib/Model/Condition.php b/lib/Model/Condition.php index d95a088..d9a8dc8 100644 --- a/lib/Model/Condition.php +++ b/lib/Model/Condition.php @@ -162,6 +162,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -336,6 +340,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling Condition., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/Customer.php b/lib/Model/Customer.php index 49ac627..3684257 100644 --- a/lib/Model/Customer.php +++ b/lib/Model/Customer.php @@ -190,6 +190,22 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -314,6 +330,10 @@ public function getCustomerId() */ public function setCustomerId($customer_id) { + if (!is_null($customer_id) && (mb_strlen($customer_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $customer_id when calling Customer., must be smaller than or equal to 100.'); + } + $this->container['customer_id'] = $customer_id; return $this; @@ -339,6 +359,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling Customer., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -364,6 +388,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling Customer., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -389,6 +417,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling Customer., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; 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/CustomerComment.php b/lib/Model/CustomerComment.php index eba4b88..88ce6f7 100644 --- a/lib/Model/CustomerComment.php +++ b/lib/Model/CustomerComment.php @@ -183,6 +183,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -282,6 +286,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling CustomerComment., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; 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/CustomerPostalAddress.php b/lib/Model/CustomerPostalAddress.php index bfcc414..34fcd1d 100644 --- a/lib/Model/CustomerPostalAddress.php +++ b/lib/Model/CustomerPostalAddress.php @@ -253,6 +253,66 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 100)) { + $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['commercial_register_number']) && (mb_strlen($this->container['commercial_register_number']) > 100)) { + $invalidProperties[] = "invalid value for 'commercial_register_number', the character length must be smaller than or equal to 100."; + } + + 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['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 (!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['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 100)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['postcode']) && (mb_strlen($this->container['postcode']) > 40)) { + $invalidProperties[] = "invalid value for 'postcode', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['sales_tax_number']) && (mb_strlen($this->container['sales_tax_number']) > 100)) { + $invalidProperties[] = "invalid value for 'sales_tax_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['social_security_number']) && (mb_strlen($this->container['social_security_number']) > 100)) { + $invalidProperties[] = "invalid value for 'social_security_number', the character length must be smaller than or equal to 100."; + } + + 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."; + } + + if (!is_null($this->container['street']) && (mb_strlen($this->container['street']) > 300)) { + $invalidProperties[] = "invalid value for 'street', the character length must be smaller than or equal to 300."; + } + return $invalidProperties; } @@ -352,6 +412,10 @@ public function getCity() */ public function setCity($city) { + if (!is_null($city) && (mb_strlen($city) > 100)) { + throw new \InvalidArgumentException('invalid length for $city when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['city'] = $city; return $this; @@ -377,6 +441,10 @@ public function getCommercialRegisterNumber() */ public function setCommercialRegisterNumber($commercial_register_number) { + if (!is_null($commercial_register_number) && (mb_strlen($commercial_register_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $commercial_register_number when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['commercial_register_number'] = $commercial_register_number; return $this; @@ -452,6 +520,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -477,6 +549,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling CustomerPostalAddress., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -502,6 +578,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -552,6 +632,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -602,6 +686,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; @@ -627,6 +715,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -652,6 +744,10 @@ public function getPhoneNumber() */ public function setPhoneNumber($phone_number) { + if (!is_null($phone_number) && (mb_strlen($phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $phone_number when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['phone_number'] = $phone_number; return $this; @@ -702,6 +798,10 @@ public function getPostcode() */ public function setPostcode($postcode) { + if (!is_null($postcode) && (mb_strlen($postcode) > 40)) { + throw new \InvalidArgumentException('invalid length for $postcode when calling CustomerPostalAddress., must be smaller than or equal to 40.'); + } + $this->container['postcode'] = $postcode; return $this; @@ -727,6 +827,10 @@ public function getSalesTaxNumber() */ public function setSalesTaxNumber($sales_tax_number) { + if (!is_null($sales_tax_number) && (mb_strlen($sales_tax_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $sales_tax_number when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['sales_tax_number'] = $sales_tax_number; return $this; @@ -752,6 +856,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling CustomerPostalAddress., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -777,6 +885,10 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($social_security_number) { + if (!is_null($social_security_number) && (mb_strlen($social_security_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $social_security_number when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['social_security_number'] = $social_security_number; return $this; @@ -802,6 +914,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling CustomerPostalAddress., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; @@ -827,6 +943,10 @@ public function getStreet() */ public function setStreet($street) { + if (!is_null($street) && (mb_strlen($street) > 300)) { + throw new \InvalidArgumentException('invalid length for $street when calling CustomerPostalAddress., must be smaller than or equal to 300.'); + } + $this->container['street'] = $street; return $this; diff --git a/lib/Model/CustomerPostalAddressCreate.php b/lib/Model/CustomerPostalAddressCreate.php index 194bf44..d616447 100644 --- a/lib/Model/CustomerPostalAddressCreate.php +++ b/lib/Model/CustomerPostalAddressCreate.php @@ -253,6 +253,66 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 100)) { + $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['commercial_register_number']) && (mb_strlen($this->container['commercial_register_number']) > 100)) { + $invalidProperties[] = "invalid value for 'commercial_register_number', the character length must be smaller than or equal to 100."; + } + + 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['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 (!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['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 100)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['postcode']) && (mb_strlen($this->container['postcode']) > 40)) { + $invalidProperties[] = "invalid value for 'postcode', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['sales_tax_number']) && (mb_strlen($this->container['sales_tax_number']) > 100)) { + $invalidProperties[] = "invalid value for 'sales_tax_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['social_security_number']) && (mb_strlen($this->container['social_security_number']) > 100)) { + $invalidProperties[] = "invalid value for 'social_security_number', the character length must be smaller than or equal to 100."; + } + + 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."; + } + + if (!is_null($this->container['street']) && (mb_strlen($this->container['street']) > 300)) { + $invalidProperties[] = "invalid value for 'street', the character length must be smaller than or equal to 300."; + } + return $invalidProperties; } @@ -352,6 +412,10 @@ public function getCity() */ public function setCity($city) { + if (!is_null($city) && (mb_strlen($city) > 100)) { + throw new \InvalidArgumentException('invalid length for $city when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['city'] = $city; return $this; @@ -377,6 +441,10 @@ public function getCommercialRegisterNumber() */ public function setCommercialRegisterNumber($commercial_register_number) { + if (!is_null($commercial_register_number) && (mb_strlen($commercial_register_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $commercial_register_number when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['commercial_register_number'] = $commercial_register_number; return $this; @@ -452,6 +520,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -477,6 +549,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling CustomerPostalAddressCreate., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -502,6 +578,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -552,6 +632,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -602,6 +686,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; @@ -627,6 +715,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -652,6 +744,10 @@ public function getPhoneNumber() */ public function setPhoneNumber($phone_number) { + if (!is_null($phone_number) && (mb_strlen($phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $phone_number when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['phone_number'] = $phone_number; return $this; @@ -702,6 +798,10 @@ public function getPostcode() */ public function setPostcode($postcode) { + if (!is_null($postcode) && (mb_strlen($postcode) > 40)) { + throw new \InvalidArgumentException('invalid length for $postcode when calling CustomerPostalAddressCreate., must be smaller than or equal to 40.'); + } + $this->container['postcode'] = $postcode; return $this; @@ -727,6 +827,10 @@ public function getSalesTaxNumber() */ public function setSalesTaxNumber($sales_tax_number) { + if (!is_null($sales_tax_number) && (mb_strlen($sales_tax_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $sales_tax_number when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['sales_tax_number'] = $sales_tax_number; return $this; @@ -752,6 +856,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling CustomerPostalAddressCreate., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -777,6 +885,10 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($social_security_number) { + if (!is_null($social_security_number) && (mb_strlen($social_security_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $social_security_number when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['social_security_number'] = $social_security_number; return $this; @@ -802,6 +914,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling CustomerPostalAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; @@ -827,6 +943,10 @@ public function getStreet() */ public function setStreet($street) { + if (!is_null($street) && (mb_strlen($street) > 300)) { + throw new \InvalidArgumentException('invalid length for $street when calling CustomerPostalAddressCreate., must be smaller than or equal to 300.'); + } + $this->container['street'] = $street; return $this; diff --git a/lib/Model/DatabaseTranslatedStringItem.php b/lib/Model/DatabaseTranslatedStringItem.php index 6b24738..e48afc6 100644 --- a/lib/Model/DatabaseTranslatedStringItem.php +++ b/lib/Model/DatabaseTranslatedStringItem.php @@ -134,6 +134,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['translation']) && (mb_strlen($this->container['translation']) > 16777216)) { + $invalidProperties[] = "invalid value for 'translation', the character length must be smaller than or equal to 16777216."; + } + return $invalidProperties; } @@ -283,6 +287,10 @@ public function getTranslation() */ public function setTranslation($translation) { + if (!is_null($translation) && (mb_strlen($translation) > 16777216)) { + throw new \InvalidArgumentException('invalid length for $translation when calling DatabaseTranslatedStringItem., must be smaller than or equal to 16777216.'); + } + $this->container['translation'] = $translation; return $this; diff --git a/lib/Model/HumanUser.php b/lib/Model/HumanUser.php index 4417020..8788fc1 100644 --- a/lib/Model/HumanUser.php +++ b/lib/Model/HumanUser.php @@ -197,6 +197,22 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -296,6 +312,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 128)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling HumanUser., must be smaller than or equal to 128.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -346,6 +366,10 @@ public function getFirstname() */ public function setFirstname($firstname) { + if (!is_null($firstname) && (mb_strlen($firstname) > 100)) { + throw new \InvalidArgumentException('invalid length for $firstname when calling HumanUser., must be smaller than or equal to 100.'); + } + $this->container['firstname'] = $firstname; return $this; @@ -396,6 +420,10 @@ public function getLastname() */ public function setLastname($lastname) { + if (!is_null($lastname) && (mb_strlen($lastname) > 100)) { + throw new \InvalidArgumentException('invalid length for $lastname when calling HumanUser., must be smaller than or equal to 100.'); + } + $this->container['lastname'] = $lastname; return $this; @@ -421,6 +449,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 30)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling HumanUser., must be smaller than or equal to 30.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; 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/LineItem.php b/lib/Model/LineItem.php index ec6605e..b857ca4 100644 --- a/lib/Model/LineItem.php +++ b/lib/Model/LineItem.php @@ -260,6 +260,22 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 150)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; + } + + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if (!is_null($this->container['sku']) && (mb_strlen($this->container['sku']) > 200)) { + $invalidProperties[] = "invalid value for 'sku', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['unique_id']) && (mb_strlen($this->container['unique_id']) > 200)) { + $invalidProperties[] = "invalid value for 'unique_id', the character length must be smaller than or equal to 200."; + } + return $invalidProperties; } @@ -509,6 +525,13 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 150)) { + throw new \InvalidArgumentException('invalid length for $name when calling LineItem., must be smaller than or equal to 150.'); + } + if (!is_null($name) && (mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling LineItem., must be bigger than or equal to 1.'); + } + $this->container['name'] = $name; return $this; @@ -584,6 +607,10 @@ public function getSku() */ public function setSku($sku) { + if (!is_null($sku) && (mb_strlen($sku) > 200)) { + throw new \InvalidArgumentException('invalid length for $sku when calling LineItem., must be smaller than or equal to 200.'); + } + $this->container['sku'] = $sku; return $this; @@ -809,6 +836,10 @@ public function getUniqueId() */ public function setUniqueId($unique_id) { + if (!is_null($unique_id) && (mb_strlen($unique_id) > 200)) { + throw new \InvalidArgumentException('invalid length for $unique_id when calling LineItem., must be smaller than or equal to 200.'); + } + $this->container['unique_id'] = $unique_id; return $this; diff --git a/lib/Model/LineItemAttribute.php b/lib/Model/LineItemAttribute.php index 2bc7404..818313c 100644 --- a/lib/Model/LineItemAttribute.php +++ b/lib/Model/LineItemAttribute.php @@ -127,6 +127,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['label']) && (mb_strlen($this->container['label']) > 512)) { + $invalidProperties[] = "invalid value for 'label', the character length must be smaller than or equal to 512."; + } + + if (!is_null($this->container['value']) && (mb_strlen($this->container['value']) > 512)) { + $invalidProperties[] = "invalid value for 'value', the character length must be smaller than or equal to 512."; + } + return $invalidProperties; } @@ -226,6 +234,10 @@ public function getLabel() */ public function setLabel($label) { + if (!is_null($label) && (mb_strlen($label) > 512)) { + throw new \InvalidArgumentException('invalid length for $label when calling LineItemAttribute., must be smaller than or equal to 512.'); + } + $this->container['label'] = $label; return $this; @@ -251,6 +263,10 @@ public function getValue() */ public function setValue($value) { + if (!is_null($value) && (mb_strlen($value) > 512)) { + throw new \InvalidArgumentException('invalid length for $value when calling LineItemAttribute., must be smaller than or equal to 512.'); + } + $this->container['value'] = $value; return $this; diff --git a/lib/Model/LineItemAttributeCreate.php b/lib/Model/LineItemAttributeCreate.php index e167619..ff4e1f7 100644 --- a/lib/Model/LineItemAttributeCreate.php +++ b/lib/Model/LineItemAttributeCreate.php @@ -130,9 +130,17 @@ public function listInvalidProperties() if ($this->container['label'] === null) { $invalidProperties[] = "'label' can't be null"; } + if ((mb_strlen($this->container['label']) > 512)) { + $invalidProperties[] = "invalid value for 'label', the character length must be smaller than or equal to 512."; + } + if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } + if ((mb_strlen($this->container['value']) > 512)) { + $invalidProperties[] = "invalid value for 'value', the character length must be smaller than or equal to 512."; + } + return $invalidProperties; } @@ -232,6 +240,10 @@ public function getLabel() */ public function setLabel($label) { + if ((mb_strlen($label) > 512)) { + throw new \InvalidArgumentException('invalid length for $label when calling LineItemAttributeCreate., must be smaller than or equal to 512.'); + } + $this->container['label'] = $label; return $this; @@ -257,6 +269,10 @@ public function getValue() */ public function setValue($value) { + if ((mb_strlen($value) > 512)) { + throw new \InvalidArgumentException('invalid length for $value when calling LineItemAttributeCreate., must be smaller than or equal to 512.'); + } + $this->container['value'] = $value; return $this; diff --git a/lib/Model/LineItemCreate.php b/lib/Model/LineItemCreate.php index cd09956..3ed7d96 100644 --- a/lib/Model/LineItemCreate.php +++ b/lib/Model/LineItemCreate.php @@ -189,15 +189,31 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if ((mb_strlen($this->container['name']) > 150)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + if ($this->container['quantity'] === null) { $invalidProperties[] = "'quantity' can't be null"; } + if (!is_null($this->container['sku']) && (mb_strlen($this->container['sku']) > 200)) { + $invalidProperties[] = "invalid value for 'sku', the character length must be smaller than or equal to 200."; + } + if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } if ($this->container['unique_id'] === null) { $invalidProperties[] = "'unique_id' can't be null"; } + if ((mb_strlen($this->container['unique_id']) > 200)) { + $invalidProperties[] = "invalid value for 'unique_id', the character length must be smaller than or equal to 200."; + } + return $invalidProperties; } @@ -372,6 +388,13 @@ public function getName() */ public function setName($name) { + if ((mb_strlen($name) > 150)) { + throw new \InvalidArgumentException('invalid length for $name when calling LineItemCreate., must be smaller than or equal to 150.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling LineItemCreate., must be bigger than or equal to 1.'); + } + $this->container['name'] = $name; return $this; @@ -447,6 +470,10 @@ public function getSku() */ public function setSku($sku) { + if (!is_null($sku) && (mb_strlen($sku) > 200)) { + throw new \InvalidArgumentException('invalid length for $sku when calling LineItemCreate., must be smaller than or equal to 200.'); + } + $this->container['sku'] = $sku; return $this; @@ -522,6 +549,10 @@ public function getUniqueId() */ public function setUniqueId($unique_id) { + if ((mb_strlen($unique_id) > 200)) { + throw new \InvalidArgumentException('invalid length for $unique_id when calling LineItemCreate., must be smaller than or equal to 200.'); + } + $this->container['unique_id'] = $unique_id; return $this; diff --git a/lib/Model/LineItemReduction.php b/lib/Model/LineItemReduction.php index c1077b8..08c6c5d 100644 --- a/lib/Model/LineItemReduction.php +++ b/lib/Model/LineItemReduction.php @@ -134,6 +134,10 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['line_item_unique_id']) && (mb_strlen($this->container['line_item_unique_id']) > 200)) { + $invalidProperties[] = "invalid value for 'line_item_unique_id', the character length must be smaller than or equal to 200."; + } + return $invalidProperties; } @@ -233,6 +237,10 @@ public function getLineItemUniqueId() */ public function setLineItemUniqueId($line_item_unique_id) { + if (!is_null($line_item_unique_id) && (mb_strlen($line_item_unique_id) > 200)) { + throw new \InvalidArgumentException('invalid length for $line_item_unique_id when calling LineItemReduction., must be smaller than or equal to 200.'); + } + $this->container['line_item_unique_id'] = $line_item_unique_id; return $this; diff --git a/lib/Model/LineItemReductionCreate.php b/lib/Model/LineItemReductionCreate.php index ea602ba..63f98e3 100644 --- a/lib/Model/LineItemReductionCreate.php +++ b/lib/Model/LineItemReductionCreate.php @@ -137,6 +137,10 @@ public function listInvalidProperties() if ($this->container['line_item_unique_id'] === null) { $invalidProperties[] = "'line_item_unique_id' can't be null"; } + if ((mb_strlen($this->container['line_item_unique_id']) > 200)) { + $invalidProperties[] = "invalid value for 'line_item_unique_id', the character length must be smaller than or equal to 200."; + } + if ($this->container['quantity_reduction'] === null) { $invalidProperties[] = "'quantity_reduction' can't be null"; } @@ -242,6 +246,10 @@ public function getLineItemUniqueId() */ public function setLineItemUniqueId($line_item_unique_id) { + if ((mb_strlen($line_item_unique_id) > 200)) { + throw new \InvalidArgumentException('invalid length for $line_item_unique_id when calling LineItemReductionCreate., must be smaller than or equal to 200.'); + } + $this->container['line_item_unique_id'] = $line_item_unique_id; return $this; diff --git a/lib/Model/ModelResourcePath.php b/lib/Model/ModelResourcePath.php index 6a1d1a2..6f0fcfb 100644 --- a/lib/Model/ModelResourcePath.php +++ b/lib/Model/ModelResourcePath.php @@ -162,6 +162,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['path']) && (mb_strlen($this->container['path']) > 500)) { + $invalidProperties[] = "invalid value for 'path', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['path']) && (mb_strlen($this->container['path']) < 4)) { + $invalidProperties[] = "invalid value for 'path', the character length must be bigger than or equal to 4."; + } + return $invalidProperties; } @@ -311,6 +319,13 @@ public function getPath() */ public function setPath($path) { + if (!is_null($path) && (mb_strlen($path) > 500)) { + throw new \InvalidArgumentException('invalid length for $path when calling ModelResourcePath., must be smaller than or equal to 500.'); + } + if (!is_null($path) && (mb_strlen($path) < 4)) { + throw new \InvalidArgumentException('invalid length for $path when calling ModelResourcePath., must be bigger than or equal to 4.'); + } + $this->container['path'] = $path; return $this; diff --git a/lib/Model/PaymentConnectorConfiguration.php b/lib/Model/PaymentConnectorConfiguration.php index e7bbfb9..cf495dc 100644 --- a/lib/Model/PaymentConnectorConfiguration.php +++ b/lib/Model/PaymentConnectorConfiguration.php @@ -204,6 +204,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -453,6 +457,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling PaymentConnectorConfiguration., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/PaymentContract.php b/lib/Model/PaymentContract.php index 0e2d2fe..f6936b3 100644 --- a/lib/Model/PaymentContract.php +++ b/lib/Model/PaymentContract.php @@ -218,6 +218,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -467,6 +475,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if (!is_null($external_id) && (mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling PaymentContract., must be smaller than or equal to 100.'); + } + if (!is_null($external_id) && (mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling PaymentContract., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; diff --git a/lib/Model/PaymentMethodConfiguration.php b/lib/Model/PaymentMethodConfiguration.php index aba54e0..0aa444c 100644 --- a/lib/Model/PaymentMethodConfiguration.php +++ b/lib/Model/PaymentMethodConfiguration.php @@ -232,6 +232,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -456,6 +460,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling PaymentMethodConfiguration., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/PaymentProcessorConfiguration.php b/lib/Model/PaymentProcessorConfiguration.php index c0ed99c..b0381d3 100644 --- a/lib/Model/PaymentProcessorConfiguration.php +++ b/lib/Model/PaymentProcessorConfiguration.php @@ -169,6 +169,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -343,6 +347,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling PaymentProcessorConfiguration., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/PaymentTerminal.php b/lib/Model/PaymentTerminal.php index efb4108..0805cd6 100644 --- a/lib/Model/PaymentTerminal.php +++ b/lib/Model/PaymentTerminal.php @@ -183,6 +183,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -407,6 +411,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling PaymentTerminal., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/PaymentTerminalAddress.php b/lib/Model/PaymentTerminalAddress.php index abb7c8f..cf11335 100644 --- a/lib/Model/PaymentTerminalAddress.php +++ b/lib/Model/PaymentTerminalAddress.php @@ -211,6 +211,42 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['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 (!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['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 100)) { + $invalidProperties[] = "invalid value for '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; } @@ -360,6 +396,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -385,6 +425,10 @@ public function getEmailAddress() */ public function setEmailAddress($email_address) { + if (!is_null($email_address) && (mb_strlen($email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $email_address when calling PaymentTerminalAddress., must be smaller than or equal to 254.'); + } + $this->container['email_address'] = $email_address; return $this; @@ -410,6 +454,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -435,6 +483,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -460,6 +512,10 @@ public function getMobilePhoneNumber() */ public function setMobilePhoneNumber($mobile_phone_number) { + if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['mobile_phone_number'] = $mobile_phone_number; return $this; @@ -485,6 +541,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -510,6 +570,10 @@ public function getPhoneNumber() */ public function setPhoneNumber($phone_number) { + if (!is_null($phone_number) && (mb_strlen($phone_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $phone_number when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['phone_number'] = $phone_number; return $this; @@ -585,6 +649,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling PaymentTerminalAddress., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -610,6 +678,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling PaymentTerminalAddress., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; diff --git a/lib/Model/PaymentTerminalConfiguration.php b/lib/Model/PaymentTerminalConfiguration.php index ea1b78c..33e607b 100644 --- a/lib/Model/PaymentTerminalConfiguration.php +++ b/lib/Model/PaymentTerminalConfiguration.php @@ -162,6 +162,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -311,6 +315,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling PaymentTerminalConfiguration., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/PaymentTerminalContactAddress.php b/lib/Model/PaymentTerminalContactAddress.php new file mode 100644 index 0000000..143c03b --- /dev/null +++ b/lib/Model/PaymentTerminalContactAddress.php @@ -0,0 +1,285 @@ +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; + } + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PaymentTerminalLocation.php b/lib/Model/PaymentTerminalLocation.php index af17547..5da6983 100644 --- a/lib/Model/PaymentTerminalLocation.php +++ b/lib/Model/PaymentTerminalLocation.php @@ -49,6 +49,7 @@ class PaymentTerminalLocation implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'contact_address' => '\PostFinanceCheckout\Sdk\Model\PaymentTerminalContactAddress', 'default_configuration' => '\PostFinanceCheckout\Sdk\Model\PaymentTerminalConfiguration', 'delivery_address' => '\PostFinanceCheckout\Sdk\Model\PaymentTerminalAddress', 'id' => 'int', @@ -65,6 +66,7 @@ class PaymentTerminalLocation implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'contact_address' => null, 'default_configuration' => null, 'delivery_address' => null, 'id' => 'int64', @@ -82,6 +84,7 @@ class PaymentTerminalLocation implements ModelInterface, ArrayAccess * @var string[] */ protected static $attributeMap = [ + 'contact_address' => 'contactAddress', 'default_configuration' => 'defaultConfiguration', 'delivery_address' => 'deliveryAddress', 'id' => 'id', @@ -98,6 +101,7 @@ class PaymentTerminalLocation implements ModelInterface, ArrayAccess * @var string[] */ protected static $setters = [ + 'contact_address' => 'setContactAddress', 'default_configuration' => 'setDefaultConfiguration', 'delivery_address' => 'setDeliveryAddress', 'id' => 'setId', @@ -114,6 +118,7 @@ class PaymentTerminalLocation implements ModelInterface, ArrayAccess * @var string[] */ protected static $getters = [ + 'contact_address' => 'getContactAddress', 'default_configuration' => 'getDefaultConfiguration', 'delivery_address' => 'getDeliveryAddress', 'id' => 'getId', @@ -142,6 +147,8 @@ class PaymentTerminalLocation implements ModelInterface, ArrayAccess public function __construct(array $data = null) { + $this->container['contact_address'] = isset($data['contact_address']) ? $data['contact_address'] : null; + $this->container['default_configuration'] = isset($data['default_configuration']) ? $data['default_configuration'] : null; $this->container['delivery_address'] = isset($data['delivery_address']) ? $data['delivery_address'] : null; @@ -169,6 +176,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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; } @@ -249,6 +260,31 @@ public function valid() + /** + * Gets contact_address + * + * @return \PostFinanceCheckout\Sdk\Model\PaymentTerminalContactAddress + */ + public function getContactAddress() + { + return $this->container['contact_address']; + } + + /** + * Sets contact_address + * + * @param \PostFinanceCheckout\Sdk\Model\PaymentTerminalContactAddress $contact_address + * + * @return $this + */ + public function setContactAddress($contact_address) + { + $this->container['contact_address'] = $contact_address; + + return $this; + } + + /** * Gets default_configuration * @@ -368,6 +404,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling PaymentTerminalLocation., must be smaller than or equal to 100.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/Refund.php b/lib/Model/Refund.php index dee42c5..cd74a59 100644 --- a/lib/Model/Refund.php +++ b/lib/Model/Refund.php @@ -75,6 +75,8 @@ class Refund implements ModelInterface, ArrayAccess 'taxes' => '\PostFinanceCheckout\Sdk\Model\Tax[]', 'time_zone' => 'string', 'timeout_on' => '\DateTime', + 'total_applied_fees' => 'float', + 'total_settled_amount' => 'float', 'transaction' => '\PostFinanceCheckout\Sdk\Model\Transaction', 'type' => '\PostFinanceCheckout\Sdk\Model\RefundType', 'updated_invoice' => 'int', @@ -113,6 +115,8 @@ class Refund implements ModelInterface, ArrayAccess 'taxes' => null, 'time_zone' => null, 'timeout_on' => 'date-time', + 'total_applied_fees' => null, + 'total_settled_amount' => null, 'transaction' => null, 'type' => null, 'updated_invoice' => 'int64', @@ -152,6 +156,8 @@ class Refund implements ModelInterface, ArrayAccess 'taxes' => 'taxes', 'time_zone' => 'timeZone', 'timeout_on' => 'timeoutOn', + 'total_applied_fees' => 'totalAppliedFees', + 'total_settled_amount' => 'totalSettledAmount', 'transaction' => 'transaction', 'type' => 'type', 'updated_invoice' => 'updatedInvoice', @@ -190,6 +196,8 @@ class Refund implements ModelInterface, ArrayAccess 'taxes' => 'setTaxes', 'time_zone' => 'setTimeZone', 'timeout_on' => 'setTimeoutOn', + 'total_applied_fees' => 'setTotalAppliedFees', + 'total_settled_amount' => 'setTotalSettledAmount', 'transaction' => 'setTransaction', 'type' => 'setType', 'updated_invoice' => 'setUpdatedInvoice', @@ -228,6 +236,8 @@ class Refund implements ModelInterface, ArrayAccess 'taxes' => 'getTaxes', 'time_zone' => 'getTimeZone', 'timeout_on' => 'getTimeoutOn', + 'total_applied_fees' => 'getTotalAppliedFees', + 'total_settled_amount' => 'getTotalSettledAmount', 'transaction' => 'getTransaction', 'type' => 'getType', 'updated_invoice' => 'getUpdatedInvoice', @@ -304,6 +314,10 @@ public function __construct(array $data = null) $this->container['timeout_on'] = isset($data['timeout_on']) ? $data['timeout_on'] : null; + $this->container['total_applied_fees'] = isset($data['total_applied_fees']) ? $data['total_applied_fees'] : null; + + $this->container['total_settled_amount'] = isset($data['total_settled_amount']) ? $data['total_settled_amount'] : null; + $this->container['transaction'] = isset($data['transaction']) ? $data['transaction'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; @@ -323,6 +337,22 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + + 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['processor_reference']) && (mb_strlen($this->container['processor_reference']) > 150)) { + $invalidProperties[] = "invalid value for 'processor_reference', the character length must be smaller than or equal to 150."; + } + return $invalidProperties; } @@ -572,6 +602,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if (!is_null($external_id) && (mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling Refund., must be smaller than or equal to 100.'); + } + if (!is_null($external_id) && (mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling Refund., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; @@ -772,6 +809,10 @@ public function getMerchantReference() */ public function setMerchantReference($merchant_reference) { + if (!is_null($merchant_reference) && (mb_strlen($merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $merchant_reference when calling Refund., must be smaller than or equal to 100.'); + } + $this->container['merchant_reference'] = $merchant_reference; return $this; @@ -872,6 +913,10 @@ public function getProcessorReference() */ public function setProcessorReference($processor_reference) { + if (!is_null($processor_reference) && (mb_strlen($processor_reference) > 150)) { + throw new \InvalidArgumentException('invalid length for $processor_reference when calling Refund., must be smaller than or equal to 150.'); + } + $this->container['processor_reference'] = $processor_reference; return $this; @@ -1053,6 +1098,56 @@ public function setTimeoutOn($timeout_on) } + /** + * Gets total_applied_fees + * + * @return float + */ + public function getTotalAppliedFees() + { + return $this->container['total_applied_fees']; + } + + /** + * Sets total_applied_fees + * + * @param float $total_applied_fees The total applied fees is the sum of all fees that have been applied so far. + * + * @return $this + */ + public function setTotalAppliedFees($total_applied_fees) + { + $this->container['total_applied_fees'] = $total_applied_fees; + + return $this; + } + + + /** + * Gets total_settled_amount + * + * @return float + */ + public function getTotalSettledAmount() + { + return $this->container['total_settled_amount']; + } + + /** + * Sets total_settled_amount + * + * @param float $total_settled_amount The total settled amount is the total amount which has been settled so far. + * + * @return $this + */ + public function setTotalSettledAmount($total_settled_amount) + { + $this->container['total_settled_amount'] = $total_settled_amount; + + return $this; + } + + /** * Gets transaction * diff --git a/lib/Model/RefundComment.php b/lib/Model/RefundComment.php index 7483aec..cb8c338 100644 --- a/lib/Model/RefundComment.php +++ b/lib/Model/RefundComment.php @@ -183,6 +183,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -282,6 +286,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling RefundComment., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; 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/RefundCreate.php b/lib/Model/RefundCreate.php index 0503588..beac338 100644 --- a/lib/Model/RefundCreate.php +++ b/lib/Model/RefundCreate.php @@ -165,6 +165,18 @@ public function listInvalidProperties() if ($this->container['external_id'] === null) { $invalidProperties[] = "'external_id' can't be null"; } + if ((mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if ((mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + + 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 ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -317,6 +329,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if ((mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling RefundCreate., must be smaller than or equal to 100.'); + } + if ((mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling RefundCreate., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; @@ -342,6 +361,10 @@ public function getMerchantReference() */ public function setMerchantReference($merchant_reference) { + if (!is_null($merchant_reference) && (mb_strlen($merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $merchant_reference when calling RefundCreate., must be smaller than or equal to 100.'); + } + $this->container['merchant_reference'] = $merchant_reference; return $this; diff --git a/lib/Model/Scope.php b/lib/Model/Scope.php index 934f685..aef3bfe 100644 --- a/lib/Model/Scope.php +++ b/lib/Model/Scope.php @@ -197,6 +197,18 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['domain_name']) && (mb_strlen($this->container['domain_name']) > 40)) { + $invalidProperties[] = "invalid value for 'domain_name', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['machine_name']) && (mb_strlen($this->container['machine_name']) > 50)) { + $invalidProperties[] = "invalid value for 'machine_name', the character length must be smaller than or equal to 50."; + } + + 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."; + } + return $invalidProperties; } @@ -296,6 +308,10 @@ public function getDomainName() */ public function setDomainName($domain_name) { + if (!is_null($domain_name) && (mb_strlen($domain_name) > 40)) { + throw new \InvalidArgumentException('invalid length for $domain_name when calling Scope., must be smaller than or equal to 40.'); + } + $this->container['domain_name'] = $domain_name; return $this; @@ -371,6 +387,10 @@ public function getMachineName() */ public function setMachineName($machine_name) { + if (!is_null($machine_name) && (mb_strlen($machine_name) > 50)) { + throw new \InvalidArgumentException('invalid length for $machine_name when calling Scope., must be smaller than or equal to 50.'); + } + $this->container['machine_name'] = $machine_name; return $this; @@ -396,6 +416,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new \InvalidArgumentException('invalid length for $name when calling Scope., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/ShopifyIntegration.php b/lib/Model/ShopifyIntegration.php new file mode 100644 index 0000000..31ad59a --- /dev/null +++ b/lib/Model/ShopifyIntegration.php @@ -0,0 +1,930 @@ + 'bool', + 'allowed_payment_method_configurations' => '\PostFinanceCheckout\Sdk\Model\PaymentMethodConfiguration[]', + 'app_version' => '\PostFinanceCheckout\Sdk\Model\ShopifyIntegrationAppVersion', + 'currency' => 'string', + 'id' => 'int', + 'installed' => 'bool', + 'integrated_payment_form_enabled' => 'bool', + 'language' => 'string', + 'login_name' => 'string', + 'name' => 'string', + 'planned_purge_date' => '\DateTime', + 'proxy_path' => 'string', + 'replace_payment_method_image' => 'bool', + 'shop_name' => 'string', + 'show_payment_information' => 'bool', + 'show_subscription_information' => 'bool', + 'space_id' => 'int', + 'space_view_id' => 'int', + 'state' => '\PostFinanceCheckout\Sdk\Model\CreationEntityState', + 'version' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'allow_invoice_download' => null, + 'allowed_payment_method_configurations' => null, + 'app_version' => null, + 'currency' => null, + 'id' => 'int64', + 'installed' => null, + 'integrated_payment_form_enabled' => null, + 'language' => null, + 'login_name' => null, + 'name' => null, + 'planned_purge_date' => 'date-time', + 'proxy_path' => null, + 'replace_payment_method_image' => null, + 'shop_name' => null, + 'show_payment_information' => null, + 'show_subscription_information' => null, + 'space_id' => 'int64', + 'space_view_id' => 'int64', + 'state' => null, + 'version' => 'int32' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'allow_invoice_download' => 'allowInvoiceDownload', + 'allowed_payment_method_configurations' => 'allowedPaymentMethodConfigurations', + 'app_version' => 'appVersion', + 'currency' => 'currency', + 'id' => 'id', + 'installed' => 'installed', + 'integrated_payment_form_enabled' => 'integratedPaymentFormEnabled', + 'language' => 'language', + 'login_name' => 'loginName', + 'name' => 'name', + 'planned_purge_date' => 'plannedPurgeDate', + 'proxy_path' => 'proxyPath', + 'replace_payment_method_image' => 'replacePaymentMethodImage', + 'shop_name' => 'shopName', + 'show_payment_information' => 'showPaymentInformation', + 'show_subscription_information' => 'showSubscriptionInformation', + 'space_id' => 'spaceId', + 'space_view_id' => 'spaceViewId', + 'state' => 'state', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'allow_invoice_download' => 'setAllowInvoiceDownload', + 'allowed_payment_method_configurations' => 'setAllowedPaymentMethodConfigurations', + 'app_version' => 'setAppVersion', + 'currency' => 'setCurrency', + 'id' => 'setId', + 'installed' => 'setInstalled', + 'integrated_payment_form_enabled' => 'setIntegratedPaymentFormEnabled', + 'language' => 'setLanguage', + 'login_name' => 'setLoginName', + 'name' => 'setName', + 'planned_purge_date' => 'setPlannedPurgeDate', + 'proxy_path' => 'setProxyPath', + 'replace_payment_method_image' => 'setReplacePaymentMethodImage', + 'shop_name' => 'setShopName', + 'show_payment_information' => 'setShowPaymentInformation', + 'show_subscription_information' => 'setShowSubscriptionInformation', + 'space_id' => 'setSpaceId', + 'space_view_id' => 'setSpaceViewId', + 'state' => 'setState', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'allow_invoice_download' => 'getAllowInvoiceDownload', + 'allowed_payment_method_configurations' => 'getAllowedPaymentMethodConfigurations', + 'app_version' => 'getAppVersion', + 'currency' => 'getCurrency', + 'id' => 'getId', + 'installed' => 'getInstalled', + 'integrated_payment_form_enabled' => 'getIntegratedPaymentFormEnabled', + 'language' => 'getLanguage', + 'login_name' => 'getLoginName', + 'name' => 'getName', + 'planned_purge_date' => 'getPlannedPurgeDate', + 'proxy_path' => 'getProxyPath', + 'replace_payment_method_image' => 'getReplacePaymentMethodImage', + 'shop_name' => 'getShopName', + 'show_payment_information' => 'getShowPaymentInformation', + 'show_subscription_information' => 'getShowSubscriptionInformation', + 'space_id' => 'getSpaceId', + 'space_view_id' => 'getSpaceViewId', + 'state' => 'getState', + 'version' => 'getVersion' + ]; + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + + $this->container['allow_invoice_download'] = isset($data['allow_invoice_download']) ? $data['allow_invoice_download'] : null; + + $this->container['allowed_payment_method_configurations'] = isset($data['allowed_payment_method_configurations']) ? $data['allowed_payment_method_configurations'] : null; + + $this->container['app_version'] = isset($data['app_version']) ? $data['app_version'] : null; + + $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; + + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + + $this->container['installed'] = isset($data['installed']) ? $data['installed'] : null; + + $this->container['integrated_payment_form_enabled'] = isset($data['integrated_payment_form_enabled']) ? $data['integrated_payment_form_enabled'] : null; + + $this->container['language'] = isset($data['language']) ? $data['language'] : null; + + $this->container['login_name'] = isset($data['login_name']) ? $data['login_name'] : null; + + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + + $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; + + $this->container['proxy_path'] = isset($data['proxy_path']) ? $data['proxy_path'] : null; + + $this->container['replace_payment_method_image'] = isset($data['replace_payment_method_image']) ? $data['replace_payment_method_image'] : null; + + $this->container['shop_name'] = isset($data['shop_name']) ? $data['shop_name'] : null; + + $this->container['show_payment_information'] = isset($data['show_payment_information']) ? $data['show_payment_information'] : null; + + $this->container['show_subscription_information'] = isset($data['show_subscription_information']) ? $data['show_subscription_information'] : null; + + $this->container['space_id'] = isset($data['space_id']) ? $data['space_id'] : null; + + $this->container['space_view_id'] = isset($data['space_view_id']) ? $data['space_view_id'] : null; + + $this->container['state'] = isset($data['state']) ? $data['state'] : null; + + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['login_name']) && (mb_strlen($this->container['login_name']) > 100)) { + $invalidProperties[] = "invalid value for 'login_name', the character length must be smaller than or equal to 100."; + } + + 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."; + } + + if (!is_null($this->container['shop_name']) && (mb_strlen($this->container['shop_name']) > 100)) { + $invalidProperties[] = "invalid value for 'shop_name', the character length must be smaller than or equal to 100."; + } + + return $invalidProperties; + } + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + + /** + * Gets allow_invoice_download + * + * @return bool + */ + public function getAllowInvoiceDownload() + { + return $this->container['allow_invoice_download']; + } + + /** + * Sets allow_invoice_download + * + * @param bool $allow_invoice_download + * + * @return $this + */ + public function setAllowInvoiceDownload($allow_invoice_download) + { + $this->container['allow_invoice_download'] = $allow_invoice_download; + + return $this; + } + + + /** + * Gets allowed_payment_method_configurations + * + * @return \PostFinanceCheckout\Sdk\Model\PaymentMethodConfiguration[] + */ + public function getAllowedPaymentMethodConfigurations() + { + return $this->container['allowed_payment_method_configurations']; + } + + /** + * Sets allowed_payment_method_configurations + * + * @param \PostFinanceCheckout\Sdk\Model\PaymentMethodConfiguration[] $allowed_payment_method_configurations + * + * @return $this + */ + public function setAllowedPaymentMethodConfigurations($allowed_payment_method_configurations) + { + $this->container['allowed_payment_method_configurations'] = $allowed_payment_method_configurations; + + return $this; + } + + + /** + * Gets app_version + * + * @return \PostFinanceCheckout\Sdk\Model\ShopifyIntegrationAppVersion + */ + public function getAppVersion() + { + return $this->container['app_version']; + } + + /** + * Sets app_version + * + * @param \PostFinanceCheckout\Sdk\Model\ShopifyIntegrationAppVersion $app_version + * + * @return $this + */ + public function setAppVersion($app_version) + { + $this->container['app_version'] = $app_version; + + return $this; + } + + + /** + * Gets currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency + * + * @return $this + */ + public function setCurrency($currency) + { + $this->container['currency'] = $currency; + + return $this; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + + /** + * Gets installed + * + * @return bool + */ + public function getInstalled() + { + return $this->container['installed']; + } + + /** + * Sets installed + * + * @param bool $installed + * + * @return $this + */ + public function setInstalled($installed) + { + $this->container['installed'] = $installed; + + return $this; + } + + + /** + * Gets integrated_payment_form_enabled + * + * @return bool + */ + public function getIntegratedPaymentFormEnabled() + { + return $this->container['integrated_payment_form_enabled']; + } + + /** + * Sets integrated_payment_form_enabled + * + * @param bool $integrated_payment_form_enabled Enabling the integrated payment form will embed the payment form in the Shopify shop. The app needs to be installed for this to be possible. + * + * @return $this + */ + public function setIntegratedPaymentFormEnabled($integrated_payment_form_enabled) + { + $this->container['integrated_payment_form_enabled'] = $integrated_payment_form_enabled; + + return $this; + } + + + /** + * Gets language + * + * @return string + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string $language The checkout language forces a specific language in the checkout. Without a checkout language the browser setting of the buyer is used to determine the language. + * + * @return $this + */ + public function setLanguage($language) + { + $this->container['language'] = $language; + + return $this; + } + + + /** + * Gets login_name + * + * @return string + */ + public function getLoginName() + { + return $this->container['login_name']; + } + + /** + * Sets login_name + * + * @param string $login_name The login name is used to link a specific Shopify payment gateway to this integration.This login name is to be filled into the appropriate field in the shops payment gateway configuration. + * + * @return $this + */ + public function setLoginName($login_name) + { + if (!is_null($login_name) && (mb_strlen($login_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $login_name when calling ShopifyIntegration., must be smaller than or equal to 100.'); + } + + $this->container['login_name'] = $login_name; + + return $this; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The integration name is used internally to identify a specific integration.For example the name is used withinsearch fields and hence it should be distinct and descriptive. + * + * @return $this + */ + public function setName($name) + { + if (!is_null($name) && (mb_strlen($name) > 100)) { + throw new \InvalidArgumentException('invalid length for $name when calling ShopifyIntegration., must be smaller than or equal to 100.'); + } + + $this->container['name'] = $name; + + return $this; + } + + + /** + * Gets planned_purge_date + * + * @return \DateTime + */ + public function getPlannedPurgeDate() + { + return $this->container['planned_purge_date']; + } + + /** + * Sets planned_purge_date + * + * @param \DateTime $planned_purge_date The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return $this + */ + public function setPlannedPurgeDate($planned_purge_date) + { + $this->container['planned_purge_date'] = $planned_purge_date; + + return $this; + } + + + /** + * Gets proxy_path + * + * @return string + */ + public function getProxyPath() + { + return $this->container['proxy_path']; + } + + /** + * Sets proxy_path + * + * @param string $proxy_path Define the path of the proxy URL. This only needs to be changed if the apps proxy URL is overwritten in the Shopify store. + * + * @return $this + */ + public function setProxyPath($proxy_path) + { + $this->container['proxy_path'] = $proxy_path; + + return $this; + } + + + /** + * Gets replace_payment_method_image + * + * @return bool + */ + public function getReplacePaymentMethodImage() + { + return $this->container['replace_payment_method_image']; + } + + /** + * Sets replace_payment_method_image + * + * @param bool $replace_payment_method_image + * + * @return $this + */ + public function setReplacePaymentMethodImage($replace_payment_method_image) + { + $this->container['replace_payment_method_image'] = $replace_payment_method_image; + + return $this; + } + + + /** + * Gets shop_name + * + * @return string + */ + public function getShopName() + { + return $this->container['shop_name']; + } + + /** + * Sets shop_name + * + * @param string $shop_name The store address is used to link a specific Shopify shop to this integration. This is the name used in the Shopifys admin URL: [storeAddress].myshopify.com + * + * @return $this + */ + public function setShopName($shop_name) + { + if (!is_null($shop_name) && (mb_strlen($shop_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $shop_name when calling ShopifyIntegration., must be smaller than or equal to 100.'); + } + + $this->container['shop_name'] = $shop_name; + + return $this; + } + + + /** + * Gets show_payment_information + * + * @return bool + */ + public function getShowPaymentInformation() + { + return $this->container['show_payment_information']; + } + + /** + * Sets show_payment_information + * + * @param bool $show_payment_information + * + * @return $this + */ + public function setShowPaymentInformation($show_payment_information) + { + $this->container['show_payment_information'] = $show_payment_information; + + return $this; + } + + + /** + * Gets show_subscription_information + * + * @return bool + */ + public function getShowSubscriptionInformation() + { + return $this->container['show_subscription_information']; + } + + /** + * Sets show_subscription_information + * + * @param bool $show_subscription_information + * + * @return $this + */ + public function setShowSubscriptionInformation($show_subscription_information) + { + $this->container['show_subscription_information'] = $show_subscription_information; + + return $this; + } + + + /** + * Gets space_id + * + * @return int + */ + public function getSpaceId() + { + return $this->container['space_id']; + } + + /** + * Sets space_id + * + * @param int $space_id + * + * @return $this + */ + public function setSpaceId($space_id) + { + $this->container['space_id'] = $space_id; + + return $this; + } + + + /** + * Gets space_view_id + * + * @return int + */ + public function getSpaceViewId() + { + return $this->container['space_view_id']; + } + + /** + * Sets space_view_id + * + * @param int $space_view_id + * + * @return $this + */ + public function setSpaceViewId($space_view_id) + { + $this->container['space_view_id'] = $space_view_id; + + return $this; + } + + + /** + * Gets state + * + * @return \PostFinanceCheckout\Sdk\Model\CreationEntityState + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param \PostFinanceCheckout\Sdk\Model\CreationEntityState $state + * + * @return $this + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + + + /** + * Gets version + * + * @return int + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int $version The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ShopifyIntegrationAppVersion.php b/lib/Model/ShopifyIntegrationAppVersion.php new file mode 100644 index 0000000..527858f --- /dev/null +++ b/lib/Model/ShopifyIntegrationAppVersion.php @@ -0,0 +1,56 @@ + 'string', + 'created_on' => '\DateTime', + 'integration' => '\PostFinanceCheckout\Sdk\Model\ShopifyIntegration', + 'order_id' => 'string', + 'order_name' => 'string', + 'planned_purge_date' => '\DateTime', + 'state' => '\PostFinanceCheckout\Sdk\Model\ShopifyTransactionState', + 'transaction' => '\PostFinanceCheckout\Sdk\Model\Transaction', + 'version' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'checkout_id' => null, + 'created_on' => 'date-time', + 'integration' => null, + 'order_id' => null, + 'order_name' => null, + 'planned_purge_date' => 'date-time', + 'state' => null, + 'transaction' => null, + 'version' => 'int32' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkout_id' => 'checkoutId', + 'created_on' => 'createdOn', + 'integration' => 'integration', + 'order_id' => 'orderId', + 'order_name' => 'orderName', + 'planned_purge_date' => 'plannedPurgeDate', + 'state' => 'state', + 'transaction' => 'transaction', + 'version' => 'version' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkout_id' => 'setCheckoutId', + 'created_on' => 'setCreatedOn', + 'integration' => 'setIntegration', + 'order_id' => 'setOrderId', + 'order_name' => 'setOrderName', + 'planned_purge_date' => 'setPlannedPurgeDate', + 'state' => 'setState', + 'transaction' => 'setTransaction', + 'version' => 'setVersion' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkout_id' => 'getCheckoutId', + 'created_on' => 'getCreatedOn', + 'integration' => 'getIntegration', + 'order_id' => 'getOrderId', + 'order_name' => 'getOrderName', + 'planned_purge_date' => 'getPlannedPurgeDate', + 'state' => 'getState', + 'transaction' => 'getTransaction', + 'version' => 'getVersion' + ]; + + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + + $this->container['checkout_id'] = isset($data['checkout_id']) ? $data['checkout_id'] : null; + + $this->container['created_on'] = isset($data['created_on']) ? $data['created_on'] : null; + + $this->container['integration'] = isset($data['integration']) ? $data['integration'] : 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; + + $this->container['planned_purge_date'] = isset($data['planned_purge_date']) ? $data['planned_purge_date'] : null; + + $this->container['state'] = isset($data['state']) ? $data['state'] : null; + + $this->container['transaction'] = isset($data['transaction']) ? $data['transaction'] : null; + + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + return $invalidProperties; + } + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats + parent::swaggerFormats(); + } + + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + + /** + * Gets checkout_id + * + * @return string + */ + public function getCheckoutId() + { + return $this->container['checkout_id']; + } + + /** + * Sets checkout_id + * + * @param string $checkout_id + * + * @return $this + */ + public function setCheckoutId($checkout_id) + { + $this->container['checkout_id'] = $checkout_id; + + return $this; + } + + + /** + * Gets created_on + * + * @return \DateTime + */ + public function getCreatedOn() + { + return $this->container['created_on']; + } + + /** + * Sets created_on + * + * @param \DateTime $created_on The created on date indicates the date on which the entity was stored into the database. + * + * @return $this + */ + public function setCreatedOn($created_on) + { + $this->container['created_on'] = $created_on; + + return $this; + } + + + /** + * Gets integration + * + * @return \PostFinanceCheckout\Sdk\Model\ShopifyIntegration + */ + public function getIntegration() + { + return $this->container['integration']; + } + + /** + * Sets integration + * + * @param \PostFinanceCheckout\Sdk\Model\ShopifyIntegration $integration + * + * @return $this + */ + public function setIntegration($integration) + { + $this->container['integration'] = $integration; + + return $this; + } + + + /** + * Gets order_id + * + * @return string + */ + public function getOrderId() + { + return $this->container['order_id']; + } + + /** + * Sets order_id + * + * @param string $order_id + * + * @return $this + */ + public function setOrderId($order_id) + { + $this->container['order_id'] = $order_id; + + return $this; + } + + + /** + * Gets order_name + * + * @return string + */ + public function getOrderName() + { + return $this->container['order_name']; + } + + /** + * Sets order_name + * + * @param string $order_name + * + * @return $this + */ + public function setOrderName($order_name) + { + $this->container['order_name'] = $order_name; + + return $this; + } + + + /** + * Gets planned_purge_date + * + * @return \DateTime + */ + public function getPlannedPurgeDate() + { + return $this->container['planned_purge_date']; + } + + /** + * Sets planned_purge_date + * + * @param \DateTime $planned_purge_date The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return $this + */ + public function setPlannedPurgeDate($planned_purge_date) + { + $this->container['planned_purge_date'] = $planned_purge_date; + + return $this; + } + + + /** + * Gets state + * + * @return \PostFinanceCheckout\Sdk\Model\ShopifyTransactionState + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param \PostFinanceCheckout\Sdk\Model\ShopifyTransactionState $state + * + * @return $this + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + + + /** + * Gets transaction + * + * @return \PostFinanceCheckout\Sdk\Model\Transaction + */ + public function getTransaction() + { + return $this->container['transaction']; + } + + /** + * Sets transaction + * + * @param \PostFinanceCheckout\Sdk\Model\Transaction $transaction + * + * @return $this + */ + public function setTransaction($transaction) + { + $this->container['transaction'] = $transaction; + + return $this; + } + + + /** + * Gets version + * + * @return int + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int $version The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return $this + */ + public function setVersion($version) + { + $this->container['version'] = $version; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ShopifyTransactionState.php b/lib/Model/ShopifyTransactionState.php new file mode 100644 index 0000000..bde397d --- /dev/null +++ b/lib/Model/ShopifyTransactionState.php @@ -0,0 +1,60 @@ +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."; + } + return $invalidProperties; } @@ -506,6 +514,13 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling Space., must be smaller than or equal to 200.'); + } + if (!is_null($name) && (mb_strlen($name) < 3)) { + throw new \InvalidArgumentException('invalid length for $name when calling Space., must be bigger than or equal to 3.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/SpaceAddress.php b/lib/Model/SpaceAddress.php index 85bf3bc..dd41bc9 100644 --- a/lib/Model/SpaceAddress.php +++ b/lib/Model/SpaceAddress.php @@ -204,6 +204,34 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['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 (!is_null($this->container['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['sales_tax_number']) && (mb_strlen($this->container['sales_tax_number']) > 100)) { + $invalidProperties[] = "invalid value for 'sales_tax_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; } @@ -353,6 +381,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling SpaceAddress., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -403,6 +435,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling SpaceAddress., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -428,6 +464,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling SpaceAddress., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -453,6 +493,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling SpaceAddress., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -528,6 +572,10 @@ public function getSalesTaxNumber() */ public function setSalesTaxNumber($sales_tax_number) { + if (!is_null($sales_tax_number) && (mb_strlen($sales_tax_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $sales_tax_number when calling SpaceAddress., must be smaller than or equal to 100.'); + } + $this->container['sales_tax_number'] = $sales_tax_number; return $this; @@ -553,6 +601,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling SpaceAddress., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -578,6 +630,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling SpaceAddress., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; diff --git a/lib/Model/SpaceAddressCreate.php b/lib/Model/SpaceAddressCreate.php index a3ae4ff..b294197 100644 --- a/lib/Model/SpaceAddressCreate.php +++ b/lib/Model/SpaceAddressCreate.php @@ -204,6 +204,34 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['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 (!is_null($this->container['organization_name']) && (mb_strlen($this->container['organization_name']) > 100)) { + $invalidProperties[] = "invalid value for 'organization_name', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['sales_tax_number']) && (mb_strlen($this->container['sales_tax_number']) > 100)) { + $invalidProperties[] = "invalid value for 'sales_tax_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; } @@ -353,6 +381,10 @@ public function getDependentLocality() */ public function setDependentLocality($dependent_locality) { + if (!is_null($dependent_locality) && (mb_strlen($dependent_locality) > 100)) { + throw new \InvalidArgumentException('invalid length for $dependent_locality when calling SpaceAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['dependent_locality'] = $dependent_locality; return $this; @@ -403,6 +435,10 @@ public function getFamilyName() */ public function setFamilyName($family_name) { + if (!is_null($family_name) && (mb_strlen($family_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $family_name when calling SpaceAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['family_name'] = $family_name; return $this; @@ -428,6 +464,10 @@ public function getGivenName() */ public function setGivenName($given_name) { + if (!is_null($given_name) && (mb_strlen($given_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $given_name when calling SpaceAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['given_name'] = $given_name; return $this; @@ -453,6 +493,10 @@ public function getOrganizationName() */ public function setOrganizationName($organization_name) { + if (!is_null($organization_name) && (mb_strlen($organization_name) > 100)) { + throw new \InvalidArgumentException('invalid length for $organization_name when calling SpaceAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['organization_name'] = $organization_name; return $this; @@ -528,6 +572,10 @@ public function getSalesTaxNumber() */ public function setSalesTaxNumber($sales_tax_number) { + if (!is_null($sales_tax_number) && (mb_strlen($sales_tax_number) > 100)) { + throw new \InvalidArgumentException('invalid length for $sales_tax_number when calling SpaceAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['sales_tax_number'] = $sales_tax_number; return $this; @@ -553,6 +601,10 @@ public function getSalutation() */ public function setSalutation($salutation) { + if (!is_null($salutation) && (mb_strlen($salutation) > 20)) { + throw new \InvalidArgumentException('invalid length for $salutation when calling SpaceAddressCreate., must be smaller than or equal to 20.'); + } + $this->container['salutation'] = $salutation; return $this; @@ -578,6 +630,10 @@ public function getSortingCode() */ public function setSortingCode($sorting_code) { + if (!is_null($sorting_code) && (mb_strlen($sorting_code) > 100)) { + throw new \InvalidArgumentException('invalid length for $sorting_code when calling SpaceAddressCreate., must be smaller than or equal to 100.'); + } + $this->container['sorting_code'] = $sorting_code; return $this; 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/SpaceView.php b/lib/Model/SpaceView.php index 727dd31..ccc4b29 100644 --- a/lib/Model/SpaceView.php +++ b/lib/Model/SpaceView.php @@ -162,6 +162,14 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -311,6 +319,13 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling SpaceView., must be smaller than or equal to 200.'); + } + if (!is_null($name) && (mb_strlen($name) < 3)) { + throw new \InvalidArgumentException('invalid length for $name when calling SpaceView., must be bigger than or equal to 3.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/Tax.php b/lib/Model/Tax.php index 145281f..c7ea89a 100644 --- a/lib/Model/Tax.php +++ b/lib/Model/Tax.php @@ -127,6 +127,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 40)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 40."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) < 2)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 2."; + } + return $invalidProperties; } @@ -251,6 +259,13 @@ public function getTitle() */ public function setTitle($title) { + if (!is_null($title) && (mb_strlen($title) > 40)) { + throw new \InvalidArgumentException('invalid length for $title when calling Tax., must be smaller than or equal to 40.'); + } + if (!is_null($title) && (mb_strlen($title) < 2)) { + throw new \InvalidArgumentException('invalid length for $title when calling Tax., must be bigger than or equal to 2.'); + } + $this->container['title'] = $title; return $this; diff --git a/lib/Model/TaxCreate.php b/lib/Model/TaxCreate.php index 65c1587..02fb28b 100644 --- a/lib/Model/TaxCreate.php +++ b/lib/Model/TaxCreate.php @@ -133,6 +133,14 @@ public function listInvalidProperties() if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } + if ((mb_strlen($this->container['title']) > 40)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 40."; + } + + if ((mb_strlen($this->container['title']) < 2)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 2."; + } + return $invalidProperties; } @@ -257,6 +265,13 @@ public function getTitle() */ public function setTitle($title) { + if ((mb_strlen($title) > 40)) { + throw new \InvalidArgumentException('invalid length for $title when calling TaxCreate., must be smaller than or equal to 40.'); + } + if ((mb_strlen($title) < 2)) { + throw new \InvalidArgumentException('invalid length for $title when calling TaxCreate., must be bigger than or equal to 2.'); + } + $this->container['title'] = $title; return $this; diff --git a/lib/Model/TenantDatabase.php b/lib/Model/TenantDatabase.php index 70612fb..125d2be 100644 --- a/lib/Model/TenantDatabase.php +++ b/lib/Model/TenantDatabase.php @@ -134,6 +134,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -258,6 +262,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 200)) { + throw new \InvalidArgumentException('invalid length for $name when calling TenantDatabase., must be smaller than or equal to 200.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/Token.php b/lib/Model/Token.php index 03c0a10..2c89b14 100644 --- a/lib/Model/Token.php +++ b/lib/Model/Token.php @@ -204,6 +204,22 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['external_id']) && (mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + + 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."; + } + return $invalidProperties; } @@ -328,6 +344,10 @@ public function getCustomerEmailAddress() */ public function setCustomerEmailAddress($customer_email_address) { + if (!is_null($customer_email_address) && (mb_strlen($customer_email_address) > 150)) { + throw new \InvalidArgumentException('invalid length for $customer_email_address when calling Token., must be smaller than or equal to 150.'); + } + $this->container['customer_email_address'] = $customer_email_address; return $this; @@ -403,6 +423,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if (!is_null($external_id) && (mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling Token., must be smaller than or equal to 100.'); + } + if (!is_null($external_id) && (mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling Token., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; @@ -578,6 +605,10 @@ public function getTokenReference() */ public function setTokenReference($token_reference) { + if (!is_null($token_reference) && (mb_strlen($token_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $token_reference when calling Token., must be smaller than or equal to 100.'); + } + $this->container['token_reference'] = $token_reference; return $this; diff --git a/lib/Model/TokenVersion.php b/lib/Model/TokenVersion.php index 6642896..c507b76 100644 --- a/lib/Model/TokenVersion.php +++ b/lib/Model/TokenVersion.php @@ -274,6 +274,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 150)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 150."; + } + + if (!is_null($this->container['processor_token']) && (mb_strlen($this->container['processor_token']) > 150)) { + $invalidProperties[] = "invalid value for 'processor_token', the character length must be smaller than or equal to 150."; + } + return $invalidProperties; } @@ -623,6 +631,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 150)) { + throw new \InvalidArgumentException('invalid length for $name when calling TokenVersion., must be smaller than or equal to 150.'); + } + $this->container['name'] = $name; return $this; @@ -798,6 +810,10 @@ public function getProcessorToken() */ public function setProcessorToken($processor_token) { + if (!is_null($processor_token) && (mb_strlen($processor_token) > 150)) { + throw new \InvalidArgumentException('invalid length for $processor_token when calling TokenVersion., must be smaller than or equal to 150.'); + } + $this->container['processor_token'] = $processor_token; return $this; diff --git a/lib/Model/Transaction.php b/lib/Model/Transaction.php index c1b3cc9..bbc9447 100644 --- a/lib/Model/Transaction.php +++ b/lib/Model/Transaction.php @@ -104,6 +104,8 @@ class Transaction implements ModelInterface, ArrayAccess 'time_zone' => 'string', 'token' => '\PostFinanceCheckout\Sdk\Model\Token', 'tokenization_mode' => '\PostFinanceCheckout\Sdk\Model\TokenizationMode', + 'total_applied_fees' => 'float', + 'total_settled_amount' => 'float', 'user_agent_header' => 'string', 'user_failure_message' => 'string', 'user_interface_type' => '\PostFinanceCheckout\Sdk\Model\TransactionUserInterfaceType', @@ -171,6 +173,8 @@ class Transaction implements ModelInterface, ArrayAccess 'time_zone' => null, 'token' => null, 'tokenization_mode' => null, + 'total_applied_fees' => null, + 'total_settled_amount' => null, 'user_agent_header' => null, 'user_failure_message' => null, 'user_interface_type' => null, @@ -239,6 +243,8 @@ class Transaction implements ModelInterface, ArrayAccess 'time_zone' => 'timeZone', 'token' => 'token', 'tokenization_mode' => 'tokenizationMode', + 'total_applied_fees' => 'totalAppliedFees', + 'total_settled_amount' => 'totalSettledAmount', 'user_agent_header' => 'userAgentHeader', 'user_failure_message' => 'userFailureMessage', 'user_interface_type' => 'userInterfaceType', @@ -306,6 +312,8 @@ class Transaction implements ModelInterface, ArrayAccess 'time_zone' => 'setTimeZone', 'token' => 'setToken', 'tokenization_mode' => 'setTokenizationMode', + 'total_applied_fees' => 'setTotalAppliedFees', + 'total_settled_amount' => 'setTotalSettledAmount', 'user_agent_header' => 'setUserAgentHeader', 'user_failure_message' => 'setUserFailureMessage', 'user_interface_type' => 'setUserInterfaceType', @@ -373,6 +381,8 @@ class Transaction implements ModelInterface, ArrayAccess 'time_zone' => 'getTimeZone', 'token' => 'getToken', 'tokenization_mode' => 'getTokenizationMode', + 'total_applied_fees' => 'getTotalAppliedFees', + 'total_settled_amount' => 'getTotalSettledAmount', 'user_agent_header' => 'getUserAgentHeader', 'user_failure_message' => 'getUserFailureMessage', 'user_interface_type' => 'getUserInterfaceType', @@ -507,6 +517,10 @@ public function __construct(array $data = null) $this->container['tokenization_mode'] = isset($data['tokenization_mode']) ? $data['tokenization_mode'] : null; + $this->container['total_applied_fees'] = isset($data['total_applied_fees']) ? $data['total_applied_fees'] : null; + + $this->container['total_settled_amount'] = isset($data['total_settled_amount']) ? $data['total_settled_amount'] : null; + $this->container['user_agent_header'] = isset($data['user_agent_header']) ? $data['user_agent_header'] : null; $this->container['user_failure_message'] = isset($data['user_failure_message']) ? $data['user_failure_message'] : null; @@ -526,6 +540,30 @@ public function listInvalidProperties() { $invalidProperties = []; + 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['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."; + } + + if (!is_null($this->container['device_session_identifier']) && (mb_strlen($this->container['device_session_identifier']) < 10)) { + $invalidProperties[] = "invalid value for 'device_session_identifier', the character length must be bigger than or equal to 10."; + } + + 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."; + } + return $invalidProperties; } @@ -1125,6 +1163,10 @@ public function getCustomerEmailAddress() */ public function setCustomerEmailAddress($customer_email_address) { + if (!is_null($customer_email_address) && (mb_strlen($customer_email_address) > 254)) { + throw new \InvalidArgumentException('invalid length for $customer_email_address when calling Transaction., must be smaller than or equal to 254.'); + } + $this->container['customer_email_address'] = $customer_email_address; return $this; @@ -1225,6 +1267,13 @@ public function getDeviceSessionIdentifier() */ public function setDeviceSessionIdentifier($device_session_identifier) { + if (!is_null($device_session_identifier) && (mb_strlen($device_session_identifier) > 40)) { + throw new \InvalidArgumentException('invalid length for $device_session_identifier when calling Transaction., must be smaller than or equal to 40.'); + } + if (!is_null($device_session_identifier) && (mb_strlen($device_session_identifier) < 10)) { + throw new \InvalidArgumentException('invalid length for $device_session_identifier when calling Transaction., must be bigger than or equal to 10.'); + } + $this->container['device_session_identifier'] = $device_session_identifier; return $this; @@ -1525,6 +1574,10 @@ public function getInvoiceMerchantReference() */ public function setInvoiceMerchantReference($invoice_merchant_reference) { + if (!is_null($invoice_merchant_reference) && (mb_strlen($invoice_merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $invoice_merchant_reference when calling Transaction., must be smaller than or equal to 100.'); + } + $this->container['invoice_merchant_reference'] = $invoice_merchant_reference; return $this; @@ -1625,6 +1678,10 @@ public function getMerchantReference() */ public function setMerchantReference($merchant_reference) { + if (!is_null($merchant_reference) && (mb_strlen($merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $merchant_reference when calling Transaction., must be smaller than or equal to 100.'); + } + $this->container['merchant_reference'] = $merchant_reference; return $this; @@ -1825,6 +1882,10 @@ public function getShippingMethod() */ public function setShippingMethod($shipping_method) { + if (!is_null($shipping_method) && (mb_strlen($shipping_method) > 200)) { + throw new \InvalidArgumentException('invalid length for $shipping_method when calling Transaction., must be smaller than or equal to 200.'); + } + $this->container['shipping_method'] = $shipping_method; return $this; @@ -1981,6 +2042,56 @@ public function setTokenizationMode($tokenization_mode) } + /** + * Gets total_applied_fees + * + * @return float + */ + public function getTotalAppliedFees() + { + return $this->container['total_applied_fees']; + } + + /** + * Sets total_applied_fees + * + * @param float $total_applied_fees The total applied fees is the sum of all fees that have been applied so far. + * + * @return $this + */ + public function setTotalAppliedFees($total_applied_fees) + { + $this->container['total_applied_fees'] = $total_applied_fees; + + return $this; + } + + + /** + * Gets total_settled_amount + * + * @return float + */ + public function getTotalSettledAmount() + { + return $this->container['total_settled_amount']; + } + + /** + * Sets total_settled_amount + * + * @param float $total_settled_amount The total settled amount is the total amount which has been settled so far. + * + * @return $this + */ + public function setTotalSettledAmount($total_settled_amount) + { + $this->container['total_settled_amount'] = $total_settled_amount; + + return $this; + } + + /** * Gets user_agent_header * diff --git a/lib/Model/TransactionComment.php b/lib/Model/TransactionComment.php index 07230ee..7957315 100644 --- a/lib/Model/TransactionComment.php +++ b/lib/Model/TransactionComment.php @@ -183,6 +183,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -282,6 +286,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling TransactionComment., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; 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 eb96db1..338ad7f 100644 --- a/lib/Model/TransactionCompletion.php +++ b/lib/Model/TransactionCompletion.php @@ -289,6 +289,14 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -488,6 +496,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if (!is_null($external_id) && (mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionCompletion., must be smaller than or equal to 100.'); + } + if (!is_null($external_id) && (mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionCompletion., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; diff --git a/lib/Model/TransactionCompletionRequest.php b/lib/Model/TransactionCompletionRequest.php index bbf0f96..5de14b9 100644 --- a/lib/Model/TransactionCompletionRequest.php +++ b/lib/Model/TransactionCompletionRequest.php @@ -144,6 +144,14 @@ public function listInvalidProperties() if ($this->container['external_id'] === null) { $invalidProperties[] = "'external_id' can't be null"; } + if ((mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if ((mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + if ($this->container['last_completion'] === null) { $invalidProperties[] = "'last_completion' can't be null"; } @@ -249,6 +257,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if ((mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionCompletionRequest., must be smaller than or equal to 100.'); + } + if ((mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionCompletionRequest., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; diff --git a/lib/Model/TransactionCreate.php b/lib/Model/TransactionCreate.php index 7c8cb3b..8ad2196 100644 --- a/lib/Model/TransactionCreate.php +++ b/lib/Model/TransactionCreate.php @@ -163,9 +163,33 @@ 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['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['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."; + } + + if (!is_null($this->container['device_session_identifier']) && (mb_strlen($this->container['device_session_identifier']) < 10)) { + $invalidProperties[] = "invalid value for 'device_session_identifier', the character length must be bigger than or equal to 10."; + } + return $invalidProperties; } @@ -340,6 +364,13 @@ public function getDeviceSessionIdentifier() */ public function setDeviceSessionIdentifier($device_session_identifier) { + if (!is_null($device_session_identifier) && (mb_strlen($device_session_identifier) > 40)) { + throw new \InvalidArgumentException('invalid length for $device_session_identifier when calling TransactionCreate., must be smaller than or equal to 40.'); + } + if (!is_null($device_session_identifier) && (mb_strlen($device_session_identifier) < 10)) { + throw new \InvalidArgumentException('invalid length for $device_session_identifier when calling TransactionCreate., must be bigger than or equal to 10.'); + } + $this->container['device_session_identifier'] = $device_session_identifier; return $this; diff --git a/lib/Model/TransactionGroup.php b/lib/Model/TransactionGroup.php index c101491..e70235c 100644 --- a/lib/Model/TransactionGroup.php +++ b/lib/Model/TransactionGroup.php @@ -169,6 +169,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -293,6 +297,10 @@ public function getCustomerId() */ public function setCustomerId($customer_id) { + if (!is_null($customer_id) && (mb_strlen($customer_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $customer_id when calling TransactionGroup., must be smaller than or equal to 100.'); + } + $this->container['customer_id'] = $customer_id; return $this; diff --git a/lib/Model/TransactionInvoice.php b/lib/Model/TransactionInvoice.php index 29fce91..a04543b 100644 --- a/lib/Model/TransactionInvoice.php +++ b/lib/Model/TransactionInvoice.php @@ -247,6 +247,18 @@ public function listInvalidProperties() { $invalidProperties = parent::listInvalidProperties(); + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if (!is_null($this->container['external_id']) && (mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + + 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."; + } + return $invalidProperties; } @@ -546,6 +558,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if (!is_null($external_id) && (mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionInvoice., must be smaller than or equal to 100.'); + } + if (!is_null($external_id) && (mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionInvoice., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; @@ -621,6 +640,10 @@ public function getMerchantReference() */ public function setMerchantReference($merchant_reference) { + if (!is_null($merchant_reference) && (mb_strlen($merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $merchant_reference when calling TransactionInvoice., must be smaller than or equal to 100.'); + } + $this->container['merchant_reference'] = $merchant_reference; return $this; diff --git a/lib/Model/TransactionInvoiceComment.php b/lib/Model/TransactionInvoiceComment.php index 33a1eab..2880e88 100644 --- a/lib/Model/TransactionInvoiceComment.php +++ b/lib/Model/TransactionInvoiceComment.php @@ -183,6 +183,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -282,6 +286,10 @@ public function getContent() */ public function setContent($content) { + if (!is_null($content) && (mb_strlen($content) > 262144)) { + throw new \InvalidArgumentException('invalid length for $content when calling TransactionInvoiceComment., must be smaller than or equal to 262144.'); + } + $this->container['content'] = $content; return $this; 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/TransactionInvoiceReplacement.php b/lib/Model/TransactionInvoiceReplacement.php index c713160..820e13b 100644 --- a/lib/Model/TransactionInvoiceReplacement.php +++ b/lib/Model/TransactionInvoiceReplacement.php @@ -158,9 +158,21 @@ public function listInvalidProperties() if ($this->container['external_id'] === null) { $invalidProperties[] = "'external_id' can't be null"; } + if ((mb_strlen($this->container['external_id']) > 100)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be smaller than or equal to 100."; + } + + if ((mb_strlen($this->container['external_id']) < 1)) { + $invalidProperties[] = "invalid value for 'external_id', the character length must be bigger than or equal to 1."; + } + 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."; + } + return $invalidProperties; } @@ -310,6 +322,13 @@ public function getExternalId() */ public function setExternalId($external_id) { + if ((mb_strlen($external_id) > 100)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionInvoiceReplacement., must be smaller than or equal to 100.'); + } + if ((mb_strlen($external_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $external_id when calling TransactionInvoiceReplacement., must be bigger than or equal to 1.'); + } + $this->container['external_id'] = $external_id; return $this; @@ -360,6 +379,10 @@ public function getMerchantReference() */ public function setMerchantReference($merchant_reference) { + if (!is_null($merchant_reference) && (mb_strlen($merchant_reference) > 100)) { + throw new \InvalidArgumentException('invalid length for $merchant_reference when calling TransactionInvoiceReplacement., must be smaller than or equal to 100.'); + } + $this->container['merchant_reference'] = $merchant_reference; return $this; diff --git a/lib/Model/TransactionPending.php b/lib/Model/TransactionPending.php index 8a3a734..2a7feb5 100644 --- a/lib/Model/TransactionPending.php +++ b/lib/Model/TransactionPending.php @@ -121,6 +121,22 @@ 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['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 ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } diff --git a/lib/Model/WebhookIdentity.php b/lib/Model/WebhookIdentity.php index 30dcf32..42167b3 100644 --- a/lib/Model/WebhookIdentity.php +++ b/lib/Model/WebhookIdentity.php @@ -155,6 +155,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -304,6 +308,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new \InvalidArgumentException('invalid length for $name when calling WebhookIdentity., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/WebhookListener.php b/lib/Model/WebhookListener.php index 7f592a4..0dd8754 100644 --- a/lib/Model/WebhookListener.php +++ b/lib/Model/WebhookListener.php @@ -190,6 +190,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -414,6 +418,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new \InvalidArgumentException('invalid length for $name when calling WebhookListener., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; 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/WebhookUrl.php b/lib/Model/WebhookUrl.php index a4a11c6..ee1efcf 100644 --- a/lib/Model/WebhookUrl.php +++ b/lib/Model/WebhookUrl.php @@ -162,6 +162,10 @@ public function listInvalidProperties() { $invalidProperties = []; + 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."; + } + return $invalidProperties; } @@ -311,6 +315,10 @@ public function getName() */ public function setName($name) { + if (!is_null($name) && (mb_strlen($name) > 50)) { + throw new \InvalidArgumentException('invalid length for $name when calling WebhookUrl., must be smaller than or equal to 50.'); + } + $this->container['name'] = $name; return $this; diff --git a/lib/Model/WebhookUrlCreate.php b/lib/Model/WebhookUrlCreate.php index bd40ed2..511578b 100644 --- a/lib/Model/WebhookUrlCreate.php +++ b/lib/Model/WebhookUrlCreate.php @@ -112,6 +112,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."; + } + return $invalidProperties; } diff --git a/lib/Model/WebhookUrlUpdate.php b/lib/Model/WebhookUrlUpdate.php index 638208c..0e20af9 100644 --- a/lib/Model/WebhookUrlUpdate.php +++ b/lib/Model/WebhookUrlUpdate.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/Service/AccountService.php b/lib/Service/AccountService.php index 6ba8117..fa0ef34 100644 --- a/lib/Service/AccountService.php +++ b/lib/Service/AccountService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/ApplicationUserService.php b/lib/Service/ApplicationUserService.php index deffadc..0cade8c 100644 --- a/lib/Service/ApplicationUserService.php +++ b/lib/Service/ApplicationUserService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/ChargeAttemptService.php b/lib/Service/ChargeAttemptService.php index 8fe7d9c..d7391f4 100644 --- a/lib/Service/ChargeAttemptService.php +++ b/lib/Service/ChargeAttemptService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/ChargeFlowLevelPaymentLinkService.php b/lib/Service/ChargeFlowLevelPaymentLinkService.php index 8c04db0..7f50046 100644 --- a/lib/Service/ChargeFlowLevelPaymentLinkService.php +++ b/lib/Service/ChargeFlowLevelPaymentLinkService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/ChargeFlowLevelService.php b/lib/Service/ChargeFlowLevelService.php index 509ab45..7a8e0e6 100644 --- a/lib/Service/ChargeFlowLevelService.php +++ b/lib/Service/ChargeFlowLevelService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/ChargeFlowService.php b/lib/Service/ChargeFlowService.php index f16464b..17a3bbe 100644 --- a/lib/Service/ChargeFlowService.php +++ b/lib/Service/ChargeFlowService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation applyFlow diff --git a/lib/Service/ConditionTypeService.php b/lib/Service/ConditionTypeService.php index f64a1dc..f7acf13 100644 --- a/lib/Service/ConditionTypeService.php +++ b/lib/Service/ConditionTypeService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/CountryService.php b/lib/Service/CountryService.php index ca12c4d..45a1e80 100644 --- a/lib/Service/CountryService.php +++ b/lib/Service/CountryService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/CountryStateService.php b/lib/Service/CountryStateService.php index 71a42ee..8554169 100644 --- a/lib/Service/CountryStateService.php +++ b/lib/Service/CountryStateService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/CurrencyService.php b/lib/Service/CurrencyService.php index 12bbf49..8b15c8f 100644 --- a/lib/Service/CurrencyService.php +++ b/lib/Service/CurrencyService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/CustomerAddressService.php b/lib/Service/CustomerAddressService.php index a8578d1..d305fd4 100644 --- a/lib/Service/CustomerAddressService.php +++ b/lib/Service/CustomerAddressService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/CustomerCommentService.php b/lib/Service/CustomerCommentService.php index fcb5ebe..d053750 100644 --- a/lib/Service/CustomerCommentService.php +++ b/lib/Service/CustomerCommentService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php index d4c4a03..1bbdafe 100644 --- a/lib/Service/CustomerService.php +++ b/lib/Service/CustomerService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/DeliveryIndicationService.php b/lib/Service/DeliveryIndicationService.php index c36ba44..7cba4a6 100644 --- a/lib/Service/DeliveryIndicationService.php +++ b/lib/Service/DeliveryIndicationService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/HumanUserService.php b/lib/Service/HumanUserService.php index 1a61643..a6ecf32 100644 --- a/lib/Service/HumanUserService.php +++ b/lib/Service/HumanUserService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/LabelDescriptionGroupService.php b/lib/Service/LabelDescriptionGroupService.php index 11d2bd1..db947ee 100644 --- a/lib/Service/LabelDescriptionGroupService.php +++ b/lib/Service/LabelDescriptionGroupService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/LabelDescriptionService.php b/lib/Service/LabelDescriptionService.php index 045486c..dc316cf 100644 --- a/lib/Service/LabelDescriptionService.php +++ b/lib/Service/LabelDescriptionService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/LanguageService.php b/lib/Service/LanguageService.php index f8a8657..762f0e6 100644 --- a/lib/Service/LanguageService.php +++ b/lib/Service/LanguageService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/LegalOrganizationFormService.php b/lib/Service/LegalOrganizationFormService.php index b4bbe7f..a5f5651 100644 --- a/lib/Service/LegalOrganizationFormService.php +++ b/lib/Service/LegalOrganizationFormService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/ManualTaskService.php b/lib/Service/ManualTaskService.php index 65903aa..ccb977a 100644 --- a/lib/Service/ManualTaskService.php +++ b/lib/Service/ManualTaskService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/PaymentConnectorConfigurationService.php b/lib/Service/PaymentConnectorConfigurationService.php index 81baeea..cd74ad1 100644 --- a/lib/Service/PaymentConnectorConfigurationService.php +++ b/lib/Service/PaymentConnectorConfigurationService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/PaymentConnectorService.php b/lib/Service/PaymentConnectorService.php index 862ba73..53ceb92 100644 --- a/lib/Service/PaymentConnectorService.php +++ b/lib/Service/PaymentConnectorService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/PaymentMethodBrandService.php b/lib/Service/PaymentMethodBrandService.php index ef89ee6..076c63d 100644 --- a/lib/Service/PaymentMethodBrandService.php +++ b/lib/Service/PaymentMethodBrandService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/PaymentMethodConfigurationService.php b/lib/Service/PaymentMethodConfigurationService.php index 8ce4ebc..edf4ac8 100644 --- a/lib/Service/PaymentMethodConfigurationService.php +++ b/lib/Service/PaymentMethodConfigurationService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/PaymentMethodService.php b/lib/Service/PaymentMethodService.php index 97d2850..60c6418 100644 --- a/lib/Service/PaymentMethodService.php +++ b/lib/Service/PaymentMethodService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/PaymentProcessorConfigurationService.php b/lib/Service/PaymentProcessorConfigurationService.php index 0e72fd2..06381bb 100644 --- a/lib/Service/PaymentProcessorConfigurationService.php +++ b/lib/Service/PaymentProcessorConfigurationService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/PaymentProcessorService.php b/lib/Service/PaymentProcessorService.php index 1a9296b..1d50ce0 100644 --- a/lib/Service/PaymentProcessorService.php +++ b/lib/Service/PaymentProcessorService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/PermissionService.php b/lib/Service/PermissionService.php index 9e25fa1..71abd66 100644 --- a/lib/Service/PermissionService.php +++ b/lib/Service/PermissionService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/RefundCommentService.php b/lib/Service/RefundCommentService.php index efd7b5f..4a672cb 100644 --- a/lib/Service/RefundCommentService.php +++ b/lib/Service/RefundCommentService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/RefundService.php b/lib/Service/RefundService.php index ee13a25..b1ee1e7 100644 --- a/lib/Service/RefundService.php +++ b/lib/Service/RefundService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/ShopifyTransactionService.php b/lib/Service/ShopifyTransactionService.php new file mode 100644 index 0000000..8b7d37e --- /dev/null +++ b/lib/Service/ShopifyTransactionService.php @@ -0,0 +1,405 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $space_id (required) + * @param \PostFinanceCheckout\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return int + */ + public function count($space_id, $filter = null) { + return $this->countWithHttpInfo($space_id, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $space_id (required) + * @param \PostFinanceCheckout\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($space_id, $filter = null) { + // verify the required parameter 'space_id' is set + if (is_null($space_id)) { + throw new \InvalidArgumentException('Missing the required parameter $space_id when calling count'); + } + // header params + $headerParams = []; + $headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8']); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(['application/json;charset=utf-8']); + + // query params + $queryParams = []; + if (!is_null($space_id)) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($space_id); + } + + // path params + $resourcePath = '/shopify-transaction/count'; + // default format to json + $resourcePath = str_replace('{format}', 'json', $resourcePath); + + // form params + $formParams = []; + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // 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 { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/shopify-transaction/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'int', + $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 read + * + * Read + * + * @param int $space_id (required) + * @param int $id The id of the Shopify transaction which should be returned. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return \PostFinanceCheckout\Sdk\Model\ShopifyTransaction + */ + public function read($space_id, $id) { + return $this->readWithHttpInfo($space_id, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $space_id (required) + * @param int $id The id of the Shopify transaction which should be returned. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($space_id, $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 read'); + } + // verify the required parameter 'id' is set + if (is_null($id)) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = []; + $headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8']); + 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($id)) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = '/shopify-transaction/read'; + // 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 { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\PostFinanceCheckout\Sdk\Model\ShopifyTransaction', + '/shopify-transaction/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\PostFinanceCheckout\Sdk\Model\ShopifyTransaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\ShopifyTransaction', + $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 search + * + * Search + * + * @param int $space_id (required) + * @param \PostFinanceCheckout\Sdk\Model\EntityQuery $query The query restricts the Shopify transactions which are returned by the search. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return \PostFinanceCheckout\Sdk\Model\ShopifyTransaction[] + */ + public function search($space_id, $query) { + return $this->searchWithHttpInfo($space_id, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $space_id (required) + * @param \PostFinanceCheckout\Sdk\Model\EntityQuery $query The query restricts the Shopify transactions which are returned by the search. (required) + * @throws \PostFinanceCheckout\Sdk\ApiException + * @throws \PostFinanceCheckout\Sdk\VersioningException + * @throws \PostFinanceCheckout\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($space_id, $query) { + // verify the required parameter 'space_id' is set + if (is_null($space_id)) { + throw new \InvalidArgumentException('Missing the required parameter $space_id when calling search'); + } + // verify the required parameter 'query' is set + if (is_null($query)) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = []; + $headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8']); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(['application/json;charset=utf-8']); + + // query params + $queryParams = []; + if (!is_null($space_id)) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($space_id); + } + + // path params + $resourcePath = '/shopify-transaction/search'; + // default format to json + $resourcePath = str_replace('{format}', 'json', $resourcePath); + + // form params + $formParams = []; + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // 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 { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\PostFinanceCheckout\Sdk\Model\ShopifyTransaction[]', + '/shopify-transaction/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\PostFinanceCheckout\Sdk\Model\ShopifyTransaction[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PostFinanceCheckout\Sdk\Model\ShopifyTransaction[]', + $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; + } + } + +} diff --git a/lib/Service/SpaceService.php b/lib/Service/SpaceService.php index f4119bd..67d69e5 100644 --- a/lib/Service/SpaceService.php +++ b/lib/Service/SpaceService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/StaticValueService.php b/lib/Service/StaticValueService.php index fda3ede..04b1eec 100644 --- a/lib/Service/StaticValueService.php +++ b/lib/Service/StaticValueService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/TransactionCommentService.php b/lib/Service/TransactionCommentService.php index 5831466..b875466 100644 --- a/lib/Service/TransactionCommentService.php +++ b/lib/Service/TransactionCommentService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/TransactionCompletionService.php b/lib/Service/TransactionCompletionService.php index c99b3ba..c957e9c 100644 --- a/lib/Service/TransactionCompletionService.php +++ b/lib/Service/TransactionCompletionService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation completeOffline diff --git a/lib/Service/TransactionIframeService.php b/lib/Service/TransactionIframeService.php index 5822619..919429d 100644 --- a/lib/Service/TransactionIframeService.php +++ b/lib/Service/TransactionIframeService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation javascriptUrl diff --git a/lib/Service/TransactionInvoiceCommentService.php b/lib/Service/TransactionInvoiceCommentService.php index 21869af..2ec1f00 100644 --- a/lib/Service/TransactionInvoiceCommentService.php +++ b/lib/Service/TransactionInvoiceCommentService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation all diff --git a/lib/Service/TransactionInvoiceService.php b/lib/Service/TransactionInvoiceService.php index 29007f1..404c65b 100644 --- a/lib/Service/TransactionInvoiceService.php +++ b/lib/Service/TransactionInvoiceService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/TransactionLightboxService.php b/lib/Service/TransactionLightboxService.php index a5588f1..ff7db7c 100644 --- a/lib/Service/TransactionLightboxService.php +++ b/lib/Service/TransactionLightboxService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation javascriptUrl diff --git a/lib/Service/TransactionMobileSdkService.php b/lib/Service/TransactionMobileSdkService.php index 2c84923..f8d7254 100644 --- a/lib/Service/TransactionMobileSdkService.php +++ b/lib/Service/TransactionMobileSdkService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation paymentFormUrl diff --git a/lib/Service/TransactionPaymentPageService.php b/lib/Service/TransactionPaymentPageService.php index 8270c77..c3ac62a 100644 --- a/lib/Service/TransactionPaymentPageService.php +++ b/lib/Service/TransactionPaymentPageService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation paymentPageUrl diff --git a/lib/Service/TransactionService.php b/lib/Service/TransactionService.php index f9d0859..4431e92 100644 --- a/lib/Service/TransactionService.php +++ b/lib/Service/TransactionService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation confirm diff --git a/lib/Service/TransactionVoidService.php b/lib/Service/TransactionVoidService.php index e91c5d7..2844fc0 100644 --- a/lib/Service/TransactionVoidService.php +++ b/lib/Service/TransactionVoidService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/UserAccountRoleService.php b/lib/Service/UserAccountRoleService.php index d85743c..f52662d 100644 --- a/lib/Service/UserAccountRoleService.php +++ b/lib/Service/UserAccountRoleService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation addRole diff --git a/lib/Service/UserSpaceRoleService.php b/lib/Service/UserSpaceRoleService.php index f7b6783..f0fdd27 100644 --- a/lib/Service/UserSpaceRoleService.php +++ b/lib/Service/UserSpaceRoleService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation addRole diff --git a/lib/Service/WebhookListenerService.php b/lib/Service/WebhookListenerService.php index 3dac8c3..14e2316 100644 --- a/lib/Service/WebhookListenerService.php +++ b/lib/Service/WebhookListenerService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/lib/Service/WebhookUrlService.php b/lib/Service/WebhookUrlService.php index 05c5a76..09082d7 100644 --- a/lib/Service/WebhookUrlService.php +++ b/lib/Service/WebhookUrlService.php @@ -56,6 +56,15 @@ public function __construct(ApiClient $apiClient) { $this->apiClient = $apiClient; } + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + /** * Operation count diff --git a/test/TransactionCompletionServiceTest.php b/test/TransactionCompletionServiceTest.php index b0766b9..a28fb14 100644 --- a/test/TransactionCompletionServiceTest.php +++ b/test/TransactionCompletionServiceTest.php @@ -28,6 +28,7 @@ use PostFinanceCheckout\Sdk\Model\LineItemType; use PostFinanceCheckout\Sdk\Model\TransactionCompletionState; use PostFinanceCheckout\Sdk\Model\TransactionCreate; +use PostFinanceCheckout\Sdk\Model\TransactionState; /** * This class tests the basic functionality of the SDK. @@ -150,8 +151,21 @@ public function testCompleteOffline() { $transaction = $this->apiClient->getTransactionService()->create($this->spaceId, $this->getTransactionPayload()); $this->apiClient->getTransactionService()->processWithoutUserInteraction($this->spaceId, $transaction->getId()); - $transactionCompletion = $this->apiClient->getTransactionCompletionService()->completeOffline($this->spaceId, $transaction->getId()); - $this->assertEquals(true, in_array($transactionCompletion->getState(), [TransactionCompletionState::SUCCESSFUL, TransactionCompletionState::PENDING])); + echo $transaction->getId() . PHP_EOL; + for ($i = 1; $i <= 5; $i++) { + echo $transaction->getState() . PHP_EOL; + if ($transaction->getState() == TransactionState::AUTHORIZED) { + break; + } + sleep($i * 30); + $transaction = $this->apiClient->getTransactionService()->read($this->spaceId, $transaction->getId()); + } + if ($transaction->getState() == TransactionState::AUTHORIZED) { + $transactionCompletion = $this->apiClient->getTransactionCompletionService()->completeOffline($this->spaceId, $transaction->getId()); + $this->assertEquals(true, in_array($transactionCompletion->getState(), [TransactionCompletionState::SUCCESSFUL, TransactionCompletionState::PENDING])); + } else { + $this->assertEquals(true, $transaction->getState() != TransactionState::AUTHORIZED); + } } /** diff --git a/test/TransactionServiceTest.php b/test/TransactionServiceTest.php index a540ba7..8f1abee 100644 --- a/test/TransactionServiceTest.php +++ b/test/TransactionServiceTest.php @@ -335,7 +335,7 @@ public function testProcessWithoutUserInteraction() $transaction = $this->apiClient->getTransactionService()->create($this->spaceId, $this->getTransactionPayload()); $this->assertEquals($transaction->getState(), TransactionState::PENDING); $transaction = $this->apiClient->getTransactionService()->processWithoutUserInteraction($this->spaceId, $transaction->getId()); - $this->assertEquals(true, in_array($transaction->getState(), [TransactionState::AUTHORIZED, TransactionState::FULFILL])); + $this->assertEquals(true, in_array($transaction->getState(), [TransactionState::AUTHORIZED, TransactionState::FULFILL, TransactionState::PROCESSING])); } /**