From 1f714ebfe373c9a8d67bd3d327839b563a255c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Nicol=C3=A1s=20Cedr=C3=B3n?= Date: Tue, 17 Dec 2024 19:33:47 -0300 Subject: [PATCH] AI-123: Regenerate SDK (#310) --- README.md | 44 +++++++++------------ docs/Model/Customer.md | 2 + docs/Model/CustomerResponse.md | 2 + docs/Model/UpdateCustomer.md | 2 + lib/Model/Customer.php | 68 ++++++++++++++++++++++++++++++++ lib/Model/CustomerResponse.php | 68 ++++++++++++++++++++++++++++++++ lib/Model/OrderRefundRequest.php | 11 +----- lib/Model/UpdateCustomer.php | 68 ++++++++++++++++++++++++++++++++ 8 files changed, 231 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index be83809..b9b4e81 100644 --- a/README.md +++ b/README.md @@ -48,34 +48,28 @@ Please follow the [installation procedure](#installation--usage) and then run th setAccessToken($apiKey); - -$apiInstance = new CustomersApi(null, $config); -$rq = new Customer([ - 'name' => 'Franklin carrero', - 'email'=> 'mm@gmail.com', - 'phone' => '+5218181818181' -]); + + +// Configure Bearer authorization: bearerAuth +$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Conekta\Api\AntifraudApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$create_risk_rules_data = new \Conekta\Model\CreateRiskRulesData(); // \Conekta\Model\CreateRiskRulesData | requested field for blacklist rule +$accept_language = es; // string | Use for knowing which language to use + try { - $result = $apiInstance->createCustomer($rq); - $json_string = json_encode($result, JSON_PRETTY_PRINT); - print_r($json_string); -} catch (ApiException $e) { - echo 'Exception when calling CustomersApi->createCustomer: ', $e->getMessage(), PHP_EOL; + $result = $apiInstance->createRuleBlacklist($create_risk_rules_data, $accept_language); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AntifraudApi->createRuleBlacklist: ', $e->getMessage(), PHP_EOL; } - ``` ## API Endpoints diff --git a/docs/Model/Customer.md b/docs/Model/Customer.md index fcb73e1..1c93d9b 100644 --- a/docs/Model/Customer.md +++ b/docs/Model/Customer.md @@ -7,12 +7,14 @@ Name | Type | Description | Notes **antifraud_info** | [**\Conekta\Model\CustomerAntifraudInfo**](CustomerAntifraudInfo.md) | | [optional] **corporate** | **bool** | It is a value that allows identifying if the email is corporate or not. | [optional] [default to false] **custom_reference** | **string** | It is an undefined value. | [optional] +**date_of_birth** | **string** | It is a parameter that allows to identify the date of birth of the client. | [optional] **email** | **string** | An email address is a series of customizable characters followed by a universal Internet symbol, the at symbol (@), the name of a host server, and a web domain ending (.mx, .com, .org, . net, etc). | **default_payment_source_id** | **string** | It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id) | [optional] **default_shipping_contact_id** | **string** | It is a parameter that allows to identify in the response, the Conekta ID of the shipping address (shipping_contact) | [optional] **fiscal_entities** | [**\Conekta\Model\CustomerFiscalEntitiesRequest[]**](CustomerFiscalEntitiesRequest.md) | | [optional] **metadata** | **array** | | [optional] **name** | **string** | Client's name | +**national_id** | **string** | It is a parameter that allows to identify the national identification number of the client. | [optional] **payment_sources** | [**\Conekta\Model\CustomerPaymentMethodsRequest[]**](CustomerPaymentMethodsRequest.md) | Contains details of the payment methods that the customer has active or has used in Conekta | [optional] **phone** | **string** | Is the customer's phone number | **plan_id** | **string** | Contains the ID of a plan, which could together with name, email and phone create a client directly to a subscription | [optional] diff --git a/docs/Model/CustomerResponse.md b/docs/Model/CustomerResponse.md index 32c34b3..c80d139 100644 --- a/docs/Model/CustomerResponse.md +++ b/docs/Model/CustomerResponse.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **corporate** | **bool** | true if the customer is a company | [optional] **created_at** | **int** | Creation date of the object | **custom_reference** | **string** | Custom reference | [optional] +**date_of_birth** | **string** | It is a parameter that allows to identify the date of birth of the client. | [optional] **default_fiscal_entity_id** | **string** | | [optional] **default_shipping_contact_id** | **string** | | [optional] **default_payment_source_id** | **string** | | [optional] @@ -16,6 +17,7 @@ Name | Type | Description | Notes **id** | **string** | Customer's ID | **livemode** | **bool** | true if the object exists in live mode or the value false if the object exists in test mode | **name** | **string** | Customer's name | +**national_id** | **string** | It is a parameter that allows to identify the national identification number of the client. | [optional] **metadata** | **array** | | [optional] **object** | **string** | | **payment_sources** | [**\Conekta\Model\CustomerPaymentMethodsResponse**](CustomerPaymentMethodsResponse.md) | | [optional] diff --git a/docs/Model/UpdateCustomer.md b/docs/Model/UpdateCustomer.md index d9f9eb2..6de567d 100644 --- a/docs/Model/UpdateCustomer.md +++ b/docs/Model/UpdateCustomer.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | [**\Conekta\Model\UpdateCustomerAntifraudInfo**](UpdateCustomerAntifraudInfo.md) | | [optional] +**date_of_birth** | **string** | It is a parameter that allows to identify the date of birth of the client. | [optional] **default_payment_source_id** | **string** | It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id) | [optional] **email** | **string** | An email address is a series of customizable characters followed by a universal Internet symbol, the at symbol (@), the name of a host server, and a web domain ending (.mx, .com, .org, . net, etc). | [optional] **name** | **string** | Client's name | [optional] @@ -15,6 +16,7 @@ Name | Type | Description | Notes **custom_reference** | **string** | It is an undefined value. | [optional] **fiscal_entities** | [**\Conekta\Model\CustomerFiscalEntitiesRequest[]**](CustomerFiscalEntitiesRequest.md) | | [optional] **metadata** | **array** | | [optional] +**national_id** | **string** | It is a parameter that allows to identify the national identification number of the client. | [optional] **payment_sources** | [**\Conekta\Model\CustomerPaymentMethodsRequest[]**](CustomerPaymentMethodsRequest.md) | Contains details of the payment methods that the customer has active or has used in Conekta | [optional] **shipping_contacts** | [**\Conekta\Model\CustomerShippingContacts[]**](CustomerShippingContacts.md) | Contains the detail of the shipping addresses that the client has active or has used in Conekta | [optional] **subscription** | [**\Conekta\Model\SubscriptionRequest**](SubscriptionRequest.md) | | [optional] diff --git a/lib/Model/Customer.php b/lib/Model/Customer.php index 0f0e304..a9e0329 100644 --- a/lib/Model/Customer.php +++ b/lib/Model/Customer.php @@ -62,12 +62,14 @@ class Customer implements ModelInterface, ArrayAccess, \JsonSerializable 'antifraud_info' => '\Conekta\Model\CustomerAntifraudInfo', 'corporate' => 'bool', 'custom_reference' => 'string', + 'date_of_birth' => 'string', 'email' => 'string', 'default_payment_source_id' => 'string', 'default_shipping_contact_id' => 'string', 'fiscal_entities' => '\Conekta\Model\CustomerFiscalEntitiesRequest[]', 'metadata' => 'array', 'name' => 'string', + 'national_id' => 'string', 'payment_sources' => '\Conekta\Model\CustomerPaymentMethodsRequest[]', 'phone' => 'string', 'plan_id' => 'string', @@ -86,12 +88,14 @@ class Customer implements ModelInterface, ArrayAccess, \JsonSerializable 'antifraud_info' => null, 'corporate' => null, 'custom_reference' => null, + 'date_of_birth' => null, 'email' => 'email', 'default_payment_source_id' => null, 'default_shipping_contact_id' => null, 'fiscal_entities' => null, 'metadata' => null, 'name' => null, + 'national_id' => null, 'payment_sources' => null, 'phone' => null, 'plan_id' => null, @@ -108,12 +112,14 @@ class Customer implements ModelInterface, ArrayAccess, \JsonSerializable 'antifraud_info' => true, 'corporate' => false, 'custom_reference' => false, + 'date_of_birth' => false, 'email' => false, 'default_payment_source_id' => false, 'default_shipping_contact_id' => false, 'fiscal_entities' => false, 'metadata' => false, 'name' => false, + 'national_id' => false, 'payment_sources' => false, 'phone' => false, 'plan_id' => false, @@ -210,12 +216,14 @@ public function isNullableSetToNull(string $property): bool 'antifraud_info' => 'antifraud_info', 'corporate' => 'corporate', 'custom_reference' => 'custom_reference', + 'date_of_birth' => 'date_of_birth', 'email' => 'email', 'default_payment_source_id' => 'default_payment_source_id', 'default_shipping_contact_id' => 'default_shipping_contact_id', 'fiscal_entities' => 'fiscal_entities', 'metadata' => 'metadata', 'name' => 'name', + 'national_id' => 'national_id', 'payment_sources' => 'payment_sources', 'phone' => 'phone', 'plan_id' => 'plan_id', @@ -232,12 +240,14 @@ public function isNullableSetToNull(string $property): bool 'antifraud_info' => 'setAntifraudInfo', 'corporate' => 'setCorporate', 'custom_reference' => 'setCustomReference', + 'date_of_birth' => 'setDateOfBirth', 'email' => 'setEmail', 'default_payment_source_id' => 'setDefaultPaymentSourceId', 'default_shipping_contact_id' => 'setDefaultShippingContactId', 'fiscal_entities' => 'setFiscalEntities', 'metadata' => 'setMetadata', 'name' => 'setName', + 'national_id' => 'setNationalId', 'payment_sources' => 'setPaymentSources', 'phone' => 'setPhone', 'plan_id' => 'setPlanId', @@ -254,12 +264,14 @@ public function isNullableSetToNull(string $property): bool 'antifraud_info' => 'getAntifraudInfo', 'corporate' => 'getCorporate', 'custom_reference' => 'getCustomReference', + 'date_of_birth' => 'getDateOfBirth', 'email' => 'getEmail', 'default_payment_source_id' => 'getDefaultPaymentSourceId', 'default_shipping_contact_id' => 'getDefaultShippingContactId', 'fiscal_entities' => 'getFiscalEntities', 'metadata' => 'getMetadata', 'name' => 'getName', + 'national_id' => 'getNationalId', 'payment_sources' => 'getPaymentSources', 'phone' => 'getPhone', 'plan_id' => 'getPlanId', @@ -327,12 +339,14 @@ public function __construct(array $data = null) $this->setIfExists('antifraud_info', $data ?? [], null); $this->setIfExists('corporate', $data ?? [], false); $this->setIfExists('custom_reference', $data ?? [], null); + $this->setIfExists('date_of_birth', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('default_payment_source_id', $data ?? [], null); $this->setIfExists('default_shipping_contact_id', $data ?? [], null); $this->setIfExists('fiscal_entities', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('national_id', $data ?? [], null); $this->setIfExists('payment_sources', $data ?? [], null); $this->setIfExists('phone', $data ?? [], null); $this->setIfExists('plan_id', $data ?? [], null); @@ -483,6 +497,33 @@ public function setCustomReference($custom_reference) return $this; } + /** + * Gets date_of_birth + * + * @return string|null + */ + public function getDateOfBirth() + { + return $this->container['date_of_birth']; + } + + /** + * Sets date_of_birth + * + * @param string|null $date_of_birth It is a parameter that allows to identify the date of birth of the client. + * + * @return self + */ + public function setDateOfBirth($date_of_birth) + { + if (is_null($date_of_birth)) { + throw new \InvalidArgumentException('non-nullable date_of_birth cannot be null'); + } + $this->container['date_of_birth'] = $date_of_birth; + + return $this; + } + /** * Gets email * @@ -649,6 +690,33 @@ public function setName($name) return $this; } + /** + * Gets national_id + * + * @return string|null + */ + public function getNationalId() + { + return $this->container['national_id']; + } + + /** + * Sets national_id + * + * @param string|null $national_id It is a parameter that allows to identify the national identification number of the client. + * + * @return self + */ + public function setNationalId($national_id) + { + if (is_null($national_id)) { + throw new \InvalidArgumentException('non-nullable national_id cannot be null'); + } + $this->container['national_id'] = $national_id; + + return $this; + } + /** * Gets payment_sources * diff --git a/lib/Model/CustomerResponse.php b/lib/Model/CustomerResponse.php index 30ecff7..5d75c6c 100644 --- a/lib/Model/CustomerResponse.php +++ b/lib/Model/CustomerResponse.php @@ -63,6 +63,7 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'corporate' => 'bool', 'created_at' => 'int', 'custom_reference' => 'string', + 'date_of_birth' => 'string', 'default_fiscal_entity_id' => 'string', 'default_shipping_contact_id' => 'string', 'default_payment_source_id' => 'string', @@ -71,6 +72,7 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => 'string', 'livemode' => 'bool', 'name' => 'string', + 'national_id' => 'string', 'metadata' => 'array', 'object' => 'string', 'payment_sources' => '\Conekta\Model\CustomerPaymentMethodsResponse', @@ -91,6 +93,7 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'corporate' => null, 'created_at' => 'int64', 'custom_reference' => null, + 'date_of_birth' => null, 'default_fiscal_entity_id' => null, 'default_shipping_contact_id' => null, 'default_payment_source_id' => null, @@ -99,6 +102,7 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => null, 'livemode' => null, 'name' => null, + 'national_id' => null, 'metadata' => null, 'object' => null, 'payment_sources' => null, @@ -117,6 +121,7 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'corporate' => false, 'created_at' => false, 'custom_reference' => false, + 'date_of_birth' => false, 'default_fiscal_entity_id' => true, 'default_shipping_contact_id' => false, 'default_payment_source_id' => true, @@ -125,6 +130,7 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'id' => false, 'livemode' => false, 'name' => false, + 'national_id' => false, 'metadata' => false, 'object' => false, 'payment_sources' => false, @@ -223,6 +229,7 @@ public function isNullableSetToNull(string $property): bool 'corporate' => 'corporate', 'created_at' => 'created_at', 'custom_reference' => 'custom_reference', + 'date_of_birth' => 'date_of_birth', 'default_fiscal_entity_id' => 'default_fiscal_entity_id', 'default_shipping_contact_id' => 'default_shipping_contact_id', 'default_payment_source_id' => 'default_payment_source_id', @@ -231,6 +238,7 @@ public function isNullableSetToNull(string $property): bool 'id' => 'id', 'livemode' => 'livemode', 'name' => 'name', + 'national_id' => 'national_id', 'metadata' => 'metadata', 'object' => 'object', 'payment_sources' => 'payment_sources', @@ -249,6 +257,7 @@ public function isNullableSetToNull(string $property): bool 'corporate' => 'setCorporate', 'created_at' => 'setCreatedAt', 'custom_reference' => 'setCustomReference', + 'date_of_birth' => 'setDateOfBirth', 'default_fiscal_entity_id' => 'setDefaultFiscalEntityId', 'default_shipping_contact_id' => 'setDefaultShippingContactId', 'default_payment_source_id' => 'setDefaultPaymentSourceId', @@ -257,6 +266,7 @@ public function isNullableSetToNull(string $property): bool 'id' => 'setId', 'livemode' => 'setLivemode', 'name' => 'setName', + 'national_id' => 'setNationalId', 'metadata' => 'setMetadata', 'object' => 'setObject', 'payment_sources' => 'setPaymentSources', @@ -275,6 +285,7 @@ public function isNullableSetToNull(string $property): bool 'corporate' => 'getCorporate', 'created_at' => 'getCreatedAt', 'custom_reference' => 'getCustomReference', + 'date_of_birth' => 'getDateOfBirth', 'default_fiscal_entity_id' => 'getDefaultFiscalEntityId', 'default_shipping_contact_id' => 'getDefaultShippingContactId', 'default_payment_source_id' => 'getDefaultPaymentSourceId', @@ -283,6 +294,7 @@ public function isNullableSetToNull(string $property): bool 'id' => 'getId', 'livemode' => 'getLivemode', 'name' => 'getName', + 'national_id' => 'getNationalId', 'metadata' => 'getMetadata', 'object' => 'getObject', 'payment_sources' => 'getPaymentSources', @@ -352,6 +364,7 @@ public function __construct(array $data = null) $this->setIfExists('corporate', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('custom_reference', $data ?? [], null); + $this->setIfExists('date_of_birth', $data ?? [], null); $this->setIfExists('default_fiscal_entity_id', $data ?? [], null); $this->setIfExists('default_shipping_contact_id', $data ?? [], null); $this->setIfExists('default_payment_source_id', $data ?? [], null); @@ -360,6 +373,7 @@ public function __construct(array $data = null) $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('national_id', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('object', $data ?? [], null); $this->setIfExists('payment_sources', $data ?? [], null); @@ -544,6 +558,33 @@ public function setCustomReference($custom_reference) return $this; } + /** + * Gets date_of_birth + * + * @return string|null + */ + public function getDateOfBirth() + { + return $this->container['date_of_birth']; + } + + /** + * Sets date_of_birth + * + * @param string|null $date_of_birth It is a parameter that allows to identify the date of birth of the client. + * + * @return self + */ + public function setDateOfBirth($date_of_birth) + { + if (is_null($date_of_birth)) { + throw new \InvalidArgumentException('non-nullable date_of_birth cannot be null'); + } + $this->container['date_of_birth'] = $date_of_birth; + + return $this; + } + /** * Gets default_fiscal_entity_id * @@ -774,6 +815,33 @@ public function setName($name) return $this; } + /** + * Gets national_id + * + * @return string|null + */ + public function getNationalId() + { + return $this->container['national_id']; + } + + /** + * Sets national_id + * + * @param string|null $national_id It is a parameter that allows to identify the national identification number of the client. + * + * @return self + */ + public function setNationalId($national_id) + { + if (is_null($national_id)) { + throw new \InvalidArgumentException('non-nullable national_id cannot be null'); + } + $this->container['national_id'] = $national_id; + + return $this; + } + /** * Gets metadata * diff --git a/lib/Model/OrderRefundRequest.php b/lib/Model/OrderRefundRequest.php index aa90803..60b73e9 100644 --- a/lib/Model/OrderRefundRequest.php +++ b/lib/Model/OrderRefundRequest.php @@ -83,7 +83,7 @@ class OrderRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static array $openAPINullables = [ 'amount' => false, - 'expires_at' => true, + 'expires_at' => false, 'reason' => false ]; @@ -357,14 +357,7 @@ public function getExpiresAt() public function setExpiresAt($expires_at) { if (is_null($expires_at)) { - array_push($this->openAPINullablesSetToNull, 'expires_at'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('expires_at', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); } $this->container['expires_at'] = $expires_at; diff --git a/lib/Model/UpdateCustomer.php b/lib/Model/UpdateCustomer.php index 8364c2f..58a9d73 100644 --- a/lib/Model/UpdateCustomer.php +++ b/lib/Model/UpdateCustomer.php @@ -60,6 +60,7 @@ class UpdateCustomer implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'antifraud_info' => '\Conekta\Model\UpdateCustomerAntifraudInfo', + 'date_of_birth' => 'string', 'default_payment_source_id' => 'string', 'email' => 'string', 'name' => 'string', @@ -70,6 +71,7 @@ class UpdateCustomer implements ModelInterface, ArrayAccess, \JsonSerializable 'custom_reference' => 'string', 'fiscal_entities' => '\Conekta\Model\CustomerFiscalEntitiesRequest[]', 'metadata' => 'array', + 'national_id' => 'string', 'payment_sources' => '\Conekta\Model\CustomerPaymentMethodsRequest[]', 'shipping_contacts' => '\Conekta\Model\CustomerShippingContacts[]', 'subscription' => '\Conekta\Model\SubscriptionRequest' @@ -84,6 +86,7 @@ class UpdateCustomer implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'antifraud_info' => null, + 'date_of_birth' => null, 'default_payment_source_id' => null, 'email' => null, 'name' => null, @@ -94,6 +97,7 @@ class UpdateCustomer implements ModelInterface, ArrayAccess, \JsonSerializable 'custom_reference' => null, 'fiscal_entities' => null, 'metadata' => null, + 'national_id' => null, 'payment_sources' => null, 'shipping_contacts' => null, 'subscription' => null @@ -106,6 +110,7 @@ class UpdateCustomer implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'antifraud_info' => true, + 'date_of_birth' => false, 'default_payment_source_id' => false, 'email' => false, 'name' => false, @@ -116,6 +121,7 @@ class UpdateCustomer implements ModelInterface, ArrayAccess, \JsonSerializable 'custom_reference' => false, 'fiscal_entities' => false, 'metadata' => false, + 'national_id' => false, 'payment_sources' => false, 'shipping_contacts' => false, 'subscription' => false @@ -208,6 +214,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'antifraud_info' => 'antifraud_info', + 'date_of_birth' => 'date_of_birth', 'default_payment_source_id' => 'default_payment_source_id', 'email' => 'email', 'name' => 'name', @@ -218,6 +225,7 @@ public function isNullableSetToNull(string $property): bool 'custom_reference' => 'custom_reference', 'fiscal_entities' => 'fiscal_entities', 'metadata' => 'metadata', + 'national_id' => 'national_id', 'payment_sources' => 'payment_sources', 'shipping_contacts' => 'shipping_contacts', 'subscription' => 'subscription' @@ -230,6 +238,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'antifraud_info' => 'setAntifraudInfo', + 'date_of_birth' => 'setDateOfBirth', 'default_payment_source_id' => 'setDefaultPaymentSourceId', 'email' => 'setEmail', 'name' => 'setName', @@ -240,6 +249,7 @@ public function isNullableSetToNull(string $property): bool 'custom_reference' => 'setCustomReference', 'fiscal_entities' => 'setFiscalEntities', 'metadata' => 'setMetadata', + 'national_id' => 'setNationalId', 'payment_sources' => 'setPaymentSources', 'shipping_contacts' => 'setShippingContacts', 'subscription' => 'setSubscription' @@ -252,6 +262,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'antifraud_info' => 'getAntifraudInfo', + 'date_of_birth' => 'getDateOfBirth', 'default_payment_source_id' => 'getDefaultPaymentSourceId', 'email' => 'getEmail', 'name' => 'getName', @@ -262,6 +273,7 @@ public function isNullableSetToNull(string $property): bool 'custom_reference' => 'getCustomReference', 'fiscal_entities' => 'getFiscalEntities', 'metadata' => 'getMetadata', + 'national_id' => 'getNationalId', 'payment_sources' => 'getPaymentSources', 'shipping_contacts' => 'getShippingContacts', 'subscription' => 'getSubscription' @@ -325,6 +337,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('antifraud_info', $data ?? [], null); + $this->setIfExists('date_of_birth', $data ?? [], null); $this->setIfExists('default_payment_source_id', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -335,6 +348,7 @@ public function __construct(array $data = null) $this->setIfExists('custom_reference', $data ?? [], null); $this->setIfExists('fiscal_entities', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('national_id', $data ?? [], null); $this->setIfExists('payment_sources', $data ?? [], null); $this->setIfExists('shipping_contacts', $data ?? [], null); $this->setIfExists('subscription', $data ?? [], null); @@ -420,6 +434,33 @@ public function setAntifraudInfo($antifraud_info) return $this; } + /** + * Gets date_of_birth + * + * @return string|null + */ + public function getDateOfBirth() + { + return $this->container['date_of_birth']; + } + + /** + * Sets date_of_birth + * + * @param string|null $date_of_birth It is a parameter that allows to identify the date of birth of the client. + * + * @return self + */ + public function setDateOfBirth($date_of_birth) + { + if (is_null($date_of_birth)) { + throw new \InvalidArgumentException('non-nullable date_of_birth cannot be null'); + } + $this->container['date_of_birth'] = $date_of_birth; + + return $this; + } + /** * Gets default_payment_source_id * @@ -694,6 +735,33 @@ public function setMetadata($metadata) return $this; } + /** + * Gets national_id + * + * @return string|null + */ + public function getNationalId() + { + return $this->container['national_id']; + } + + /** + * Sets national_id + * + * @param string|null $national_id It is a parameter that allows to identify the national identification number of the client. + * + * @return self + */ + public function setNationalId($national_id) + { + if (is_null($national_id)) { + throw new \InvalidArgumentException('non-nullable national_id cannot be null'); + } + $this->container['national_id'] = $national_id; + + return $this; + } + /** * Gets payment_sources *