diff --git a/README.md b/README.md index 786f3c2..fa792d4 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,6 @@ engineering@conekta.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `2.1.0` - - Package version: `6.0.8` + - Package version: `6.0.9` - Generator version: `7.5.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/VERSION b/VERSION index 4b786f5..f1bb5eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.8 +6.0.9 diff --git a/composer.json b/composer.json index 900a0a2..f61201d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "conekta/conekta-php", - "version": "6.0.8", + "version": "6.0.9", "description": "Conekta PHP Library", "type": "library", "keywords": [ @@ -29,7 +29,7 @@ "require-dev": { "phpunit/phpunit": "^9.0 || ^10.0", "friendsofphp/php-cs-fixer": "^3.5", - "phpstan/phpstan": "1.12.5" + "phpstan/phpstan": "1.11.1" }, "autoload": { "psr-4": { "Conekta\\" : "lib/" } diff --git a/config-php.json b/config-php.json index da7e724..b440ff6 100644 --- a/config-php.json +++ b/config-php.json @@ -1,13 +1,13 @@ { "packageName": "conekta", "generateSourceCodeOnly": "false", - "artifactVersion": "6.0.8", + "artifactVersion": "6.0.9", "packageUrl": "https://developers.conekta.com/", "projectName": "conekta-php", "appDescriptionV2" : "Conekta PHP Library", "useOneOfDiscriminatorLookup" : true, "nonCompliantUseDiscriminatorIfCompositionFails" : false, - "httpUserAgent": "Conekta/v2 PhpBindings/6.0.8", + "httpUserAgent": "Conekta/v2 PhpBindings/6.0.9", "packageAuthors" : "engineering@conekta.com", "files": { "/local/CODE_OF_CONDUCT.md" : {}, diff --git a/docs/Model/ChargeOrderResponsePaymentMethod.md b/docs/Model/ChargeOrderResponsePaymentMethod.md index 4f98f3a..ef20498 100644 --- a/docs/Model/ChargeOrderResponsePaymentMethod.md +++ b/docs/Model/ChargeOrderResponsePaymentMethod.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **service_name** | **string** | | [optional] **store** | **string** | | [optional] **store_name** | **string** | | [optional] +**customer_ip_address** | **string** | | [optional] **account_type** | **string** | Account type of the card | [optional] **brand** | **string** | Brand of the card | [optional] **contract_id** | **string** | Id sent for recurrent charges. | [optional] diff --git a/docs/Model/ChargeRequestPaymentMethod.md b/docs/Model/ChargeRequestPaymentMethod.md index 86751bc..c279580 100644 --- a/docs/Model/ChargeRequestPaymentMethod.md +++ b/docs/Model/ChargeRequestPaymentMethod.md @@ -5,11 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **string** | Type of payment method | -**cvc** | **string** | Card security code | +**cvc** | **string** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants | **exp_month** | **string** | Card expiration month | **exp_year** | **string** | Card expiration year | **name** | **string** | Cardholder name | **number** | **string** | Card number | +**customer_ip_address** | **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] **expires_at** | **int** | Method expiration date as unix timestamp | [optional] **monthly_installments** | **int** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] **token_id** | **string** | | [optional] diff --git a/docs/Model/ChargeResponsePaymentMethod.md b/docs/Model/ChargeResponsePaymentMethod.md index e43fef9..c953aaf 100644 --- a/docs/Model/ChargeResponsePaymentMethod.md +++ b/docs/Model/ChargeResponsePaymentMethod.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **service_name** | **string** | | [optional] **store** | **string** | | [optional] **store_name** | **string** | | [optional] +**customer_ip_address** | **string** | | [optional] **account_type** | **string** | Account type of the card | [optional] **brand** | **string** | Brand of the card | [optional] **contract_id** | **string** | Id sent for recurrent charges. | [optional] diff --git a/docs/Model/Checkout.md b/docs/Model/Checkout.md index 3f5ab55..128db36 100644 --- a/docs/Model/Checkout.md +++ b/docs/Model/Checkout.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **expires_at** | **int** | It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) | **monthly_installments_enabled** | **bool** | This flag allows you to specify if months without interest will be active. | [optional] **monthly_installments_options** | **int[]** | This field allows you to specify the number of months without interest. | [optional] +**three_ds_mode** | **string** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional] **name** | **string** | Reason for charge | **needs_shipping_contact** | **bool** | This flag allows you to fill in the shipping information at checkout. | [optional] **on_demand_enabled** | **bool** | This flag allows you to specify if the link will be on demand. | [optional] diff --git a/docs/Model/OrderRequest.md b/docs/Model/OrderRequest.md index a32fd51..d1b4e06 100644 --- a/docs/Model/OrderRequest.md +++ b/docs/Model/OrderRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **needs_shipping_contact** | **bool** | Allows you to fill out the shipping information at checkout | [optional] **pre_authorize** | **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to false] **processing_mode** | **string** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] -**return_url** | **string** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] +**return_url** | **string** | Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter | [optional] **shipping_contact** | [**\Conekta\Model\CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] **shipping_lines** | [**\Conekta\Model\ShippingRequest[]**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] **tax_lines** | [**\Conekta\Model\OrderTaxRequest[]**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] diff --git a/docs/Model/PaymentMethodBankTransfer.md b/docs/Model/PaymentMethodBankTransfer.md index 5bd4f40..baa8de7 100644 --- a/docs/Model/PaymentMethodBankTransfer.md +++ b/docs/Model/PaymentMethodBankTransfer.md @@ -22,5 +22,6 @@ Name | Type | Description | Notes **receiving_account_tax_id** | **string** | | [optional] **reference_number** | **string** | | [optional] **tracking_code** | **string** | | [optional] +**customer_ip_address** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodCard.md b/docs/Model/PaymentMethodCard.md index 59b3eb0..b8cadbd 100644 --- a/docs/Model/PaymentMethodCard.md +++ b/docs/Model/PaymentMethodCard.md @@ -17,5 +17,6 @@ Name | Type | Description | Notes **issuer** | **string** | Issuer of the card | [optional] **last4** | **string** | Last 4 digits of the card | [optional] **name** | **string** | Name of the cardholder | [optional] +**customer_ip_address** | **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodCardRequest.md b/docs/Model/PaymentMethodCardRequest.md index fca4c16..b0014f0 100644 --- a/docs/Model/PaymentMethodCardRequest.md +++ b/docs/Model/PaymentMethodCardRequest.md @@ -10,5 +10,6 @@ Name | Type | Description | Notes **exp_year** | **string** | Card expiration year | **name** | **string** | Cardholder name | **number** | **string** | Card number | +**customer_ip_address** | **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodCash.md b/docs/Model/PaymentMethodCash.md index 3931f30..3d22ee9 100644 --- a/docs/Model/PaymentMethodCash.md +++ b/docs/Model/PaymentMethodCash.md @@ -14,5 +14,6 @@ Name | Type | Description | Notes **service_name** | **string** | | [optional] **store** | **string** | | [optional] **store_name** | **string** | | [optional] +**customer_ip_address** | **string** | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodGeneralRequest.md b/docs/Model/PaymentMethodGeneralRequest.md index 26a2e55..d6958eb 100644 --- a/docs/Model/PaymentMethodGeneralRequest.md +++ b/docs/Model/PaymentMethodGeneralRequest.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **type** | **string** | Type of payment method | **token_id** | **string** | | [optional] **payment_source_id** | **string** | | [optional] +**cvc** | **string** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants | [optional] **contract_id** | **string** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] +**customer_ip_address** | **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubscriptionResponse.md b/docs/Model/SubscriptionResponse.md index 2e42c4a..8e831ba 100644 --- a/docs/Model/SubscriptionResponse.md +++ b/docs/Model/SubscriptionResponse.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **billing_cycle_start** | **int** | | [optional] **billing_cycle_end** | **int** | | [optional] **canceled_at** | **int** | | [optional] +**canceled_reason** | **string** | Reason for cancellation. This field appears when the subscription status is 'canceled'. | [optional] **card_id** | **string** | | [optional] **charge_id** | **string** | | [optional] **created_at** | **int** | | [optional] diff --git a/lib/Configuration.php b/lib/Configuration.php index 1536ad1..05c010b 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -101,7 +101,7 @@ class Configuration * * @var string */ - protected $userAgent = 'Conekta/v2 PhpBindings/6.0.8'; + protected $userAgent = 'Conekta/v2 PhpBindings/6.0.9'; /** * Debug switch (default set to false) @@ -456,7 +456,7 @@ public static function toDebugReport() $report .= ' OS: ' . $uname . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 2.1.0' . PHP_EOL; - $report .= ' SDK Package Version: 6.0.8' . PHP_EOL; + $report .= ' SDK Package Version: 6.0.9' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index 4e2a6b0..cea76ae 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -262,7 +262,7 @@ public function getConektaUserAgent(): array $uname = $uname_disabled ? '(disabled)' : \php_uname(); $userAgent = [ - 'bindings_version' => "6.0.8", + 'bindings_version' => "6.0.9", 'lang' => 'php', 'lang_version' => phpversion(), 'publisher' => 'conekta', diff --git a/lib/Model/ChargeOrderResponsePaymentMethod.php b/lib/Model/ChargeOrderResponsePaymentMethod.php index 092bf19..ac30d1e 100644 --- a/lib/Model/ChargeOrderResponsePaymentMethod.php +++ b/lib/Model/ChargeOrderResponsePaymentMethod.php @@ -68,6 +68,7 @@ class ChargeOrderResponsePaymentMethod implements ModelInterface, ArrayAccess, \ 'service_name' => 'string', 'store' => 'string', 'store_name' => 'string', + 'customer_ip_address' => 'string', 'account_type' => 'string', 'brand' => 'string', 'contract_id' => 'string', @@ -113,6 +114,7 @@ class ChargeOrderResponsePaymentMethod implements ModelInterface, ArrayAccess, \ 'service_name' => null, 'store' => null, 'store_name' => null, + 'customer_ip_address' => null, 'account_type' => null, 'brand' => null, 'contract_id' => null, @@ -156,6 +158,7 @@ class ChargeOrderResponsePaymentMethod implements ModelInterface, ArrayAccess, \ 'service_name' => false, 'store' => true, 'store_name' => false, + 'customer_ip_address' => false, 'account_type' => false, 'brand' => false, 'contract_id' => false, @@ -279,6 +282,7 @@ public function isNullableSetToNull(string $property): bool 'service_name' => 'service_name', 'store' => 'store', 'store_name' => 'store_name', + 'customer_ip_address' => 'customer_ip_address', 'account_type' => 'account_type', 'brand' => 'brand', 'contract_id' => 'contract_id', @@ -322,6 +326,7 @@ public function isNullableSetToNull(string $property): bool 'service_name' => 'setServiceName', 'store' => 'setStore', 'store_name' => 'setStoreName', + 'customer_ip_address' => 'setCustomerIpAddress', 'account_type' => 'setAccountType', 'brand' => 'setBrand', 'contract_id' => 'setContractId', @@ -365,6 +370,7 @@ public function isNullableSetToNull(string $property): bool 'service_name' => 'getServiceName', 'store' => 'getStore', 'store_name' => 'getStoreName', + 'customer_ip_address' => 'getCustomerIpAddress', 'account_type' => 'getAccountType', 'brand' => 'getBrand', 'contract_id' => 'getContractId', @@ -459,6 +465,7 @@ public function __construct(array $data = null) $this->setIfExists('service_name', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('store_name', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); $this->setIfExists('account_type', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('contract_id', $data ?? [], null); @@ -818,6 +825,33 @@ public function setStoreName($store_name) return $this; } + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address customer_ip_address + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } + /** * Gets account_type * diff --git a/lib/Model/ChargeRequestPaymentMethod.php b/lib/Model/ChargeRequestPaymentMethod.php index ec7e997..4532138 100644 --- a/lib/Model/ChargeRequestPaymentMethod.php +++ b/lib/Model/ChargeRequestPaymentMethod.php @@ -64,6 +64,7 @@ class ChargeRequestPaymentMethod implements ModelInterface, ArrayAccess, \JsonSe 'exp_year' => 'string', 'name' => 'string', 'number' => 'string', + 'customer_ip_address' => 'string', 'expires_at' => 'int', 'monthly_installments' => 'int', 'token_id' => 'string', @@ -85,6 +86,7 @@ class ChargeRequestPaymentMethod implements ModelInterface, ArrayAccess, \JsonSe 'exp_year' => null, 'name' => null, 'number' => null, + 'customer_ip_address' => null, 'expires_at' => 'int64', 'monthly_installments' => 'int8', 'token_id' => null, @@ -104,6 +106,7 @@ class ChargeRequestPaymentMethod implements ModelInterface, ArrayAccess, \JsonSe 'exp_year' => false, 'name' => false, 'number' => false, + 'customer_ip_address' => false, 'expires_at' => false, 'monthly_installments' => false, 'token_id' => false, @@ -203,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'exp_year' => 'exp_year', 'name' => 'name', 'number' => 'number', + 'customer_ip_address' => 'customer_ip_address', 'expires_at' => 'expires_at', 'monthly_installments' => 'monthly_installments', 'token_id' => 'token_id', @@ -222,6 +226,7 @@ public function isNullableSetToNull(string $property): bool 'exp_year' => 'setExpYear', 'name' => 'setName', 'number' => 'setNumber', + 'customer_ip_address' => 'setCustomerIpAddress', 'expires_at' => 'setExpiresAt', 'monthly_installments' => 'setMonthlyInstallments', 'token_id' => 'setTokenId', @@ -241,6 +246,7 @@ public function isNullableSetToNull(string $property): bool 'exp_year' => 'getExpYear', 'name' => 'getName', 'number' => 'getNumber', + 'customer_ip_address' => 'getCustomerIpAddress', 'expires_at' => 'getExpiresAt', 'monthly_installments' => 'getMonthlyInstallments', 'token_id' => 'getTokenId', @@ -311,6 +317,7 @@ public function __construct(array $data = null) $this->setIfExists('exp_year', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); $this->setIfExists('expires_at', $data ?? [], null); $this->setIfExists('monthly_installments', $data ?? [], null); $this->setIfExists('token_id', $data ?? [], null); @@ -351,14 +358,6 @@ public function listInvalidProperties() if ($this->container['cvc'] === null) { $invalidProperties[] = "'cvc' can't be null"; } - if ((mb_strlen($this->container['cvc']) > 4)) { - $invalidProperties[] = "invalid value for 'cvc', the character length must be smaller than or equal to 4."; - } - - if ((mb_strlen($this->container['cvc']) < 3)) { - $invalidProperties[] = "invalid value for 'cvc', the character length must be bigger than or equal to 3."; - } - if ($this->container['exp_month'] === null) { $invalidProperties[] = "'exp_month' can't be null"; } @@ -442,7 +441,7 @@ public function getCvc() /** * Sets cvc * - * @param string $cvc Card security code + * @param string $cvc Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants * * @return self */ @@ -451,13 +450,6 @@ public function setCvc($cvc) if (is_null($cvc)) { throw new \InvalidArgumentException('non-nullable cvc cannot be null'); } - if ((mb_strlen($cvc) > 4)) { - throw new \InvalidArgumentException('invalid length for $cvc when calling ChargeRequestPaymentMethod., must be smaller than or equal to 4.'); - } - if ((mb_strlen($cvc) < 3)) { - throw new \InvalidArgumentException('invalid length for $cvc when calling ChargeRequestPaymentMethod., must be bigger than or equal to 3.'); - } - $this->container['cvc'] = $cvc; return $this; @@ -585,6 +577,33 @@ public function setNumber($number) return $this; } + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } + /** * Gets expires_at * diff --git a/lib/Model/ChargeResponsePaymentMethod.php b/lib/Model/ChargeResponsePaymentMethod.php index 7421d31..cd59537 100644 --- a/lib/Model/ChargeResponsePaymentMethod.php +++ b/lib/Model/ChargeResponsePaymentMethod.php @@ -68,6 +68,7 @@ class ChargeResponsePaymentMethod implements ModelInterface, ArrayAccess, \JsonS 'service_name' => 'string', 'store' => 'string', 'store_name' => 'string', + 'customer_ip_address' => 'string', 'account_type' => 'string', 'brand' => 'string', 'contract_id' => 'string', @@ -113,6 +114,7 @@ class ChargeResponsePaymentMethod implements ModelInterface, ArrayAccess, \JsonS 'service_name' => null, 'store' => null, 'store_name' => null, + 'customer_ip_address' => null, 'account_type' => null, 'brand' => null, 'contract_id' => null, @@ -156,6 +158,7 @@ class ChargeResponsePaymentMethod implements ModelInterface, ArrayAccess, \JsonS 'service_name' => false, 'store' => true, 'store_name' => false, + 'customer_ip_address' => false, 'account_type' => false, 'brand' => false, 'contract_id' => false, @@ -279,6 +282,7 @@ public function isNullableSetToNull(string $property): bool 'service_name' => 'service_name', 'store' => 'store', 'store_name' => 'store_name', + 'customer_ip_address' => 'customer_ip_address', 'account_type' => 'account_type', 'brand' => 'brand', 'contract_id' => 'contract_id', @@ -322,6 +326,7 @@ public function isNullableSetToNull(string $property): bool 'service_name' => 'setServiceName', 'store' => 'setStore', 'store_name' => 'setStoreName', + 'customer_ip_address' => 'setCustomerIpAddress', 'account_type' => 'setAccountType', 'brand' => 'setBrand', 'contract_id' => 'setContractId', @@ -365,6 +370,7 @@ public function isNullableSetToNull(string $property): bool 'service_name' => 'getServiceName', 'store' => 'getStore', 'store_name' => 'getStoreName', + 'customer_ip_address' => 'getCustomerIpAddress', 'account_type' => 'getAccountType', 'brand' => 'getBrand', 'contract_id' => 'getContractId', @@ -459,6 +465,7 @@ public function __construct(array $data = null) $this->setIfExists('service_name', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('store_name', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); $this->setIfExists('account_type', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('contract_id', $data ?? [], null); @@ -818,6 +825,33 @@ public function setStoreName($store_name) return $this; } + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address customer_ip_address + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } + /** * Gets account_type * diff --git a/lib/Model/Checkout.php b/lib/Model/Checkout.php index 9f46d8d..c39f5be 100644 --- a/lib/Model/Checkout.php +++ b/lib/Model/Checkout.php @@ -63,6 +63,7 @@ class Checkout implements ModelInterface, ArrayAccess, \JsonSerializable 'expires_at' => 'int', 'monthly_installments_enabled' => 'bool', 'monthly_installments_options' => 'int[]', + 'three_ds_mode' => 'string', 'name' => 'string', 'needs_shipping_contact' => 'bool', 'on_demand_enabled' => 'bool', @@ -84,6 +85,7 @@ class Checkout implements ModelInterface, ArrayAccess, \JsonSerializable 'expires_at' => 'int64', 'monthly_installments_enabled' => null, 'monthly_installments_options' => 'int8', + 'three_ds_mode' => null, 'name' => null, 'needs_shipping_contact' => null, 'on_demand_enabled' => null, @@ -103,6 +105,7 @@ class Checkout implements ModelInterface, ArrayAccess, \JsonSerializable 'expires_at' => false, 'monthly_installments_enabled' => false, 'monthly_installments_options' => false, + 'three_ds_mode' => false, 'name' => false, 'needs_shipping_contact' => false, 'on_demand_enabled' => true, @@ -202,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'expires_at' => 'expires_at', 'monthly_installments_enabled' => 'monthly_installments_enabled', 'monthly_installments_options' => 'monthly_installments_options', + 'three_ds_mode' => 'three_ds_mode', 'name' => 'name', 'needs_shipping_contact' => 'needs_shipping_contact', 'on_demand_enabled' => 'on_demand_enabled', @@ -221,6 +225,7 @@ public function isNullableSetToNull(string $property): bool 'expires_at' => 'setExpiresAt', 'monthly_installments_enabled' => 'setMonthlyInstallmentsEnabled', 'monthly_installments_options' => 'setMonthlyInstallmentsOptions', + 'three_ds_mode' => 'setThreeDsMode', 'name' => 'setName', 'needs_shipping_contact' => 'setNeedsShippingContact', 'on_demand_enabled' => 'setOnDemandEnabled', @@ -240,6 +245,7 @@ public function isNullableSetToNull(string $property): bool 'expires_at' => 'getExpiresAt', 'monthly_installments_enabled' => 'getMonthlyInstallmentsEnabled', 'monthly_installments_options' => 'getMonthlyInstallmentsOptions', + 'three_ds_mode' => 'getThreeDsMode', 'name' => 'getName', 'needs_shipping_contact' => 'getNeedsShippingContact', 'on_demand_enabled' => 'getOnDemandEnabled', @@ -310,6 +316,7 @@ public function __construct(array $data = null) $this->setIfExists('expires_at', $data ?? [], null); $this->setIfExists('monthly_installments_enabled', $data ?? [], null); $this->setIfExists('monthly_installments_options', $data ?? [], null); + $this->setIfExists('three_ds_mode', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('needs_shipping_contact', $data ?? [], null); $this->setIfExists('on_demand_enabled', $data ?? [], null); @@ -487,6 +494,33 @@ public function setMonthlyInstallmentsOptions($monthly_installments_options) return $this; } + /** + * Gets three_ds_mode + * + * @return string|null + */ + public function getThreeDsMode() + { + return $this->container['three_ds_mode']; + } + + /** + * Sets three_ds_mode + * + * @param string|null $three_ds_mode Indicates the 3DS2 mode for the order, either smart or strict. + * + * @return self + */ + public function setThreeDsMode($three_ds_mode) + { + if (is_null($three_ds_mode)) { + throw new \InvalidArgumentException('non-nullable three_ds_mode cannot be null'); + } + $this->container['three_ds_mode'] = $three_ds_mode; + + return $this; + } + /** * Gets name * diff --git a/lib/Model/OrderRequest.php b/lib/Model/OrderRequest.php index 89589d6..3aaf638 100644 --- a/lib/Model/OrderRequest.php +++ b/lib/Model/OrderRequest.php @@ -731,7 +731,7 @@ public function getReturnUrl() /** * Sets return_url * - * @param string|null $return_url Indicates the redirection callback upon completion of the 3DS2 flow. + * @param string|null $return_url Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter * * @return self */ diff --git a/lib/Model/PaymentMethodBankTransfer.php b/lib/Model/PaymentMethodBankTransfer.php index a26ec2c..1f1d80a 100644 --- a/lib/Model/PaymentMethodBankTransfer.php +++ b/lib/Model/PaymentMethodBankTransfer.php @@ -75,7 +75,8 @@ class PaymentMethodBankTransfer implements ModelInterface, ArrayAccess, \JsonSer 'receiving_account_bank' => 'string', 'receiving_account_tax_id' => 'string', 'reference_number' => 'string', - 'tracking_code' => 'string' + 'tracking_code' => 'string', + 'customer_ip_address' => 'string' ]; /** @@ -103,7 +104,8 @@ class PaymentMethodBankTransfer implements ModelInterface, ArrayAccess, \JsonSer 'receiving_account_bank' => null, 'receiving_account_tax_id' => null, 'reference_number' => null, - 'tracking_code' => null + 'tracking_code' => null, + 'customer_ip_address' => null ]; /** @@ -129,7 +131,8 @@ class PaymentMethodBankTransfer implements ModelInterface, ArrayAccess, \JsonSer 'receiving_account_bank' => false, 'receiving_account_tax_id' => true, 'reference_number' => true, - 'tracking_code' => true + 'tracking_code' => true, + 'customer_ip_address' => false ]; /** @@ -235,7 +238,8 @@ public function isNullableSetToNull(string $property): bool 'receiving_account_bank' => 'receiving_account_bank', 'receiving_account_tax_id' => 'receiving_account_tax_id', 'reference_number' => 'reference_number', - 'tracking_code' => 'tracking_code' + 'tracking_code' => 'tracking_code', + 'customer_ip_address' => 'customer_ip_address' ]; /** @@ -261,7 +265,8 @@ public function isNullableSetToNull(string $property): bool 'receiving_account_bank' => 'setReceivingAccountBank', 'receiving_account_tax_id' => 'setReceivingAccountTaxId', 'reference_number' => 'setReferenceNumber', - 'tracking_code' => 'setTrackingCode' + 'tracking_code' => 'setTrackingCode', + 'customer_ip_address' => 'setCustomerIpAddress' ]; /** @@ -287,7 +292,8 @@ public function isNullableSetToNull(string $property): bool 'receiving_account_bank' => 'getReceivingAccountBank', 'receiving_account_tax_id' => 'getReceivingAccountTaxId', 'reference_number' => 'getReferenceNumber', - 'tracking_code' => 'getTrackingCode' + 'tracking_code' => 'getTrackingCode', + 'customer_ip_address' => 'getCustomerIpAddress' ]; /** @@ -365,6 +371,7 @@ public function __construct(array $data = null) $this->setIfExists('receiving_account_tax_id', $data ?? [], null); $this->setIfExists('reference_number', $data ?? [], null); $this->setIfExists('tracking_code', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); } /** @@ -967,6 +974,33 @@ public function setTrackingCode($tracking_code) return $this; } + + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address customer_ip_address + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PaymentMethodCard.php b/lib/Model/PaymentMethodCard.php index a1a7550..3a518ca 100644 --- a/lib/Model/PaymentMethodCard.php +++ b/lib/Model/PaymentMethodCard.php @@ -70,7 +70,8 @@ class PaymentMethodCard implements ModelInterface, ArrayAccess, \JsonSerializabl 'fraud_indicators' => 'mixed[]', 'issuer' => 'string', 'last4' => 'string', - 'name' => 'string' + 'name' => 'string', + 'customer_ip_address' => 'string' ]; /** @@ -93,7 +94,8 @@ class PaymentMethodCard implements ModelInterface, ArrayAccess, \JsonSerializabl 'fraud_indicators' => null, 'issuer' => null, 'last4' => null, - 'name' => null + 'name' => null, + 'customer_ip_address' => null ]; /** @@ -114,7 +116,8 @@ class PaymentMethodCard implements ModelInterface, ArrayAccess, \JsonSerializabl 'fraud_indicators' => false, 'issuer' => false, 'last4' => false, - 'name' => false + 'name' => false, + 'customer_ip_address' => false ]; /** @@ -215,7 +218,8 @@ public function isNullableSetToNull(string $property): bool 'fraud_indicators' => 'fraud_indicators', 'issuer' => 'issuer', 'last4' => 'last4', - 'name' => 'name' + 'name' => 'name', + 'customer_ip_address' => 'customer_ip_address' ]; /** @@ -236,7 +240,8 @@ public function isNullableSetToNull(string $property): bool 'fraud_indicators' => 'setFraudIndicators', 'issuer' => 'setIssuer', 'last4' => 'setLast4', - 'name' => 'setName' + 'name' => 'setName', + 'customer_ip_address' => 'setCustomerIpAddress' ]; /** @@ -257,7 +262,8 @@ public function isNullableSetToNull(string $property): bool 'fraud_indicators' => 'getFraudIndicators', 'issuer' => 'getIssuer', 'last4' => 'getLast4', - 'name' => 'getName' + 'name' => 'getName', + 'customer_ip_address' => 'getCustomerIpAddress' ]; /** @@ -330,6 +336,7 @@ public function __construct(array $data = null) $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('last4', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); } /** @@ -727,6 +734,33 @@ public function setName($name) return $this; } + + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PaymentMethodCardRequest.php b/lib/Model/PaymentMethodCardRequest.php index 630d95a..afd8625 100644 --- a/lib/Model/PaymentMethodCardRequest.php +++ b/lib/Model/PaymentMethodCardRequest.php @@ -63,7 +63,8 @@ class PaymentMethodCardRequest implements ModelInterface, ArrayAccess, \JsonSeri 'exp_month' => 'string', 'exp_year' => 'string', 'name' => 'string', - 'number' => 'string' + 'number' => 'string', + 'customer_ip_address' => 'string' ]; /** @@ -79,7 +80,8 @@ class PaymentMethodCardRequest implements ModelInterface, ArrayAccess, \JsonSeri 'exp_month' => null, 'exp_year' => null, 'name' => null, - 'number' => null + 'number' => null, + 'customer_ip_address' => null ]; /** @@ -93,7 +95,8 @@ class PaymentMethodCardRequest implements ModelInterface, ArrayAccess, \JsonSeri 'exp_month' => false, 'exp_year' => false, 'name' => false, - 'number' => false + 'number' => false, + 'customer_ip_address' => false ]; /** @@ -187,7 +190,8 @@ public function isNullableSetToNull(string $property): bool 'exp_month' => 'exp_month', 'exp_year' => 'exp_year', 'name' => 'name', - 'number' => 'number' + 'number' => 'number', + 'customer_ip_address' => 'customer_ip_address' ]; /** @@ -201,7 +205,8 @@ public function isNullableSetToNull(string $property): bool 'exp_month' => 'setExpMonth', 'exp_year' => 'setExpYear', 'name' => 'setName', - 'number' => 'setNumber' + 'number' => 'setNumber', + 'customer_ip_address' => 'setCustomerIpAddress' ]; /** @@ -215,7 +220,8 @@ public function isNullableSetToNull(string $property): bool 'exp_month' => 'getExpMonth', 'exp_year' => 'getExpYear', 'name' => 'getName', - 'number' => 'getNumber' + 'number' => 'getNumber', + 'customer_ip_address' => 'getCustomerIpAddress' ]; /** @@ -281,6 +287,7 @@ public function __construct(array $data = null) $this->setIfExists('exp_year', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); } /** @@ -549,6 +556,33 @@ public function setNumber($number) return $this; } + + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PaymentMethodCash.php b/lib/Model/PaymentMethodCash.php index 578625a..7a3c931 100644 --- a/lib/Model/PaymentMethodCash.php +++ b/lib/Model/PaymentMethodCash.php @@ -67,7 +67,8 @@ class PaymentMethodCash implements ModelInterface, ArrayAccess, \JsonSerializabl 'expires_at' => 'int', 'service_name' => 'string', 'store' => 'string', - 'store_name' => 'string' + 'store_name' => 'string', + 'customer_ip_address' => 'string' ]; /** @@ -87,7 +88,8 @@ class PaymentMethodCash implements ModelInterface, ArrayAccess, \JsonSerializabl 'expires_at' => 'int64', 'service_name' => null, 'store' => null, - 'store_name' => null + 'store_name' => null, + 'customer_ip_address' => null ]; /** @@ -105,7 +107,8 @@ class PaymentMethodCash implements ModelInterface, ArrayAccess, \JsonSerializabl 'expires_at' => false, 'service_name' => false, 'store' => true, - 'store_name' => false + 'store_name' => false, + 'customer_ip_address' => false ]; /** @@ -203,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'expires_at' => 'expires_at', 'service_name' => 'service_name', 'store' => 'store', - 'store_name' => 'store_name' + 'store_name' => 'store_name', + 'customer_ip_address' => 'customer_ip_address' ]; /** @@ -221,7 +225,8 @@ public function isNullableSetToNull(string $property): bool 'expires_at' => 'setExpiresAt', 'service_name' => 'setServiceName', 'store' => 'setStore', - 'store_name' => 'setStoreName' + 'store_name' => 'setStoreName', + 'customer_ip_address' => 'setCustomerIpAddress' ]; /** @@ -239,7 +244,8 @@ public function isNullableSetToNull(string $property): bool 'expires_at' => 'getExpiresAt', 'service_name' => 'getServiceName', 'store' => 'getStore', - 'store_name' => 'getStoreName' + 'store_name' => 'getStoreName', + 'customer_ip_address' => 'getCustomerIpAddress' ]; /** @@ -309,6 +315,7 @@ public function __construct(array $data = null) $this->setIfExists('service_name', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('store_name', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); } /** @@ -646,6 +653,33 @@ public function setStoreName($store_name) return $this; } + + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address customer_ip_address + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PaymentMethodGeneralRequest.php b/lib/Model/PaymentMethodGeneralRequest.php index 9d22008..9d382f0 100644 --- a/lib/Model/PaymentMethodGeneralRequest.php +++ b/lib/Model/PaymentMethodGeneralRequest.php @@ -64,7 +64,9 @@ class PaymentMethodGeneralRequest implements ModelInterface, ArrayAccess, \JsonS 'type' => 'string', 'token_id' => 'string', 'payment_source_id' => 'string', - 'contract_id' => 'string' + 'cvc' => 'string', + 'contract_id' => 'string', + 'customer_ip_address' => 'string' ]; /** @@ -80,7 +82,9 @@ class PaymentMethodGeneralRequest implements ModelInterface, ArrayAccess, \JsonS 'type' => null, 'token_id' => null, 'payment_source_id' => null, - 'contract_id' => null + 'cvc' => null, + 'contract_id' => null, + 'customer_ip_address' => null ]; /** @@ -94,7 +98,9 @@ class PaymentMethodGeneralRequest implements ModelInterface, ArrayAccess, \JsonS 'type' => false, 'token_id' => false, 'payment_source_id' => false, - 'contract_id' => false + 'cvc' => false, + 'contract_id' => false, + 'customer_ip_address' => false ]; /** @@ -188,7 +194,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'token_id' => 'token_id', 'payment_source_id' => 'payment_source_id', - 'contract_id' => 'contract_id' + 'cvc' => 'cvc', + 'contract_id' => 'contract_id', + 'customer_ip_address' => 'customer_ip_address' ]; /** @@ -202,7 +210,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'token_id' => 'setTokenId', 'payment_source_id' => 'setPaymentSourceId', - 'contract_id' => 'setContractId' + 'cvc' => 'setCvc', + 'contract_id' => 'setContractId', + 'customer_ip_address' => 'setCustomerIpAddress' ]; /** @@ -216,7 +226,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'token_id' => 'getTokenId', 'payment_source_id' => 'getPaymentSourceId', - 'contract_id' => 'getContractId' + 'cvc' => 'getCvc', + 'contract_id' => 'getContractId', + 'customer_ip_address' => 'getCustomerIpAddress' ]; /** @@ -281,7 +293,9 @@ public function __construct(array $data = null) $this->setIfExists('type', $data ?? [], null); $this->setIfExists('token_id', $data ?? [], null); $this->setIfExists('payment_source_id', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); $this->setIfExists('contract_id', $data ?? [], null); + $this->setIfExists('customer_ip_address', $data ?? [], null); } /** @@ -464,6 +478,33 @@ public function setPaymentSourceId($payment_source_id) return $this; } + /** + * Gets cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants + * + * @return self + */ + public function setCvc($cvc) + { + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); + } + $this->container['cvc'] = $cvc; + + return $this; + } + /** * Gets contract_id * @@ -490,6 +531,33 @@ public function setContractId($contract_id) return $this; } + + /** + * Gets customer_ip_address + * + * @return string|null + */ + public function getCustomerIpAddress() + { + return $this->container['customer_ip_address']; + } + + /** + * Sets customer_ip_address + * + * @param string|null $customer_ip_address Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + * + * @return self + */ + public function setCustomerIpAddress($customer_ip_address) + { + if (is_null($customer_ip_address)) { + throw new \InvalidArgumentException('non-nullable customer_ip_address cannot be null'); + } + $this->container['customer_ip_address'] = $customer_ip_address; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/SubscriptionResponse.php b/lib/Model/SubscriptionResponse.php index 4636a98..8941d4a 100644 --- a/lib/Model/SubscriptionResponse.php +++ b/lib/Model/SubscriptionResponse.php @@ -62,6 +62,7 @@ class SubscriptionResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'billing_cycle_start' => 'int', 'billing_cycle_end' => 'int', 'canceled_at' => 'int', + 'canceled_reason' => 'string', 'card_id' => 'string', 'charge_id' => 'string', 'created_at' => 'int', @@ -89,6 +90,7 @@ class SubscriptionResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'billing_cycle_start' => 'int64', 'billing_cycle_end' => 'int64', 'canceled_at' => 'int64', + 'canceled_reason' => null, 'card_id' => null, 'charge_id' => null, 'created_at' => 'int64', @@ -114,6 +116,7 @@ class SubscriptionResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'billing_cycle_start' => true, 'billing_cycle_end' => true, 'canceled_at' => true, + 'canceled_reason' => false, 'card_id' => false, 'charge_id' => true, 'created_at' => false, @@ -219,6 +222,7 @@ public function isNullableSetToNull(string $property): bool 'billing_cycle_start' => 'billing_cycle_start', 'billing_cycle_end' => 'billing_cycle_end', 'canceled_at' => 'canceled_at', + 'canceled_reason' => 'canceled_reason', 'card_id' => 'card_id', 'charge_id' => 'charge_id', 'created_at' => 'created_at', @@ -244,6 +248,7 @@ public function isNullableSetToNull(string $property): bool 'billing_cycle_start' => 'setBillingCycleStart', 'billing_cycle_end' => 'setBillingCycleEnd', 'canceled_at' => 'setCanceledAt', + 'canceled_reason' => 'setCanceledReason', 'card_id' => 'setCardId', 'charge_id' => 'setChargeId', 'created_at' => 'setCreatedAt', @@ -269,6 +274,7 @@ public function isNullableSetToNull(string $property): bool 'billing_cycle_start' => 'getBillingCycleStart', 'billing_cycle_end' => 'getBillingCycleEnd', 'canceled_at' => 'getCanceledAt', + 'canceled_reason' => 'getCanceledReason', 'card_id' => 'getCardId', 'charge_id' => 'getChargeId', 'created_at' => 'getCreatedAt', @@ -345,6 +351,7 @@ public function __construct(array $data = null) $this->setIfExists('billing_cycle_start', $data ?? [], null); $this->setIfExists('billing_cycle_end', $data ?? [], null); $this->setIfExists('canceled_at', $data ?? [], null); + $this->setIfExists('canceled_reason', $data ?? [], null); $this->setIfExists('card_id', $data ?? [], null); $this->setIfExists('charge_id', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); @@ -505,6 +512,33 @@ public function setCanceledAt($canceled_at) return $this; } + /** + * Gets canceled_reason + * + * @return string|null + */ + public function getCanceledReason() + { + return $this->container['canceled_reason']; + } + + /** + * Sets canceled_reason + * + * @param string|null $canceled_reason Reason for cancellation. This field appears when the subscription status is 'canceled'. + * + * @return self + */ + public function setCanceledReason($canceled_reason) + { + if (is_null($canceled_reason)) { + throw new \InvalidArgumentException('non-nullable canceled_reason cannot be null'); + } + $this->container['canceled_reason'] = $canceled_reason; + + return $this; + } + /** * Gets card_id *