diff --git a/Makefile b/Makefile index 88ca05f0b..dce77209f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ openapi-generator-jar:=target/openapi-generator-cli.jar openapi-generator-cli:=java -jar $(openapi-generator-jar) generator:=php -modelGen:=AcsWebhooks BalanceControl BalancePlatform Checkout ConfigurationWebhooks Disputes Payments Payout Management ManagementWebhooks LegalEntityManagement TransferWebhooks Transfers BinLookup StoredValue POSTerminalManagement Recurring ReportWebhooks +modelGen:=AcsWebhooks BalanceControl BalancePlatform Checkout ConfigurationWebhooks Disputes Payments Payout Management ManagementWebhooks LegalEntityManagement TransactionWebhooks TransferWebhooks Transfers BinLookup StoredValue POSTerminalManagement Recurring ReportWebhooks models:=src/Adyen/Model output:=target/out @@ -14,7 +14,7 @@ models: $(modelGen) BalanceControl: spec=BalanceControlService-v1 BalancePlatform: spec=BalancePlatformService-v2 BinLookup: spec=BinLookupService-v54 -Checkout: spec=CheckoutService-v70 +Checkout: spec=CheckoutService-v71 Disputes: spec=DisputeService-v30 DataProtection: spec=DataProtectionService-v1 StoredValue: spec=StoredValueService-v46 @@ -31,6 +31,7 @@ AcsWebhooks: spec=BalancePlatformAcsNotification-v1 ConfigurationWebhooks: spec=BalancePlatformConfigurationNotification-v1 ReportWebhooks: spec=BalancePlatformReportNotification-v1 TransferWebhooks: spec=BalancePlatformTransferNotification-v4 +TransactionWebhooks: spec=BalancePlatformTransactionNotification-v4 # ManagementWebhooks ManagementWebhooks: spec=ManagementNotificationService-v3 @@ -48,7 +49,8 @@ $(modelGen): target/spec $(openapi-generator-jar) -g $(generator) \ -o $(output) \ -t ./templates \ - --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --model-package Model\\$@ \ --api-package Service\\$@ \ --reserved-words-mappings configuration=configuration \ @@ -74,7 +76,8 @@ $(Services): target/spec $(openapi-generator-jar) -g $(generator) \ -o $(output) \ -t ./templates \ - --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --model-package Model\\$@ \ --api-package Service\\$@ \ --inline-schema-name-mappings BankAccountInfo_accountIdentification=BankAccount \ @@ -98,7 +101,8 @@ $(SingleFileServices): target/spec $(openapi-generator-jar) -c templates/config.yaml \ --model-package Model\\$@ \ --api-package Service\\$@ \ - --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --reserved-words-mappings configuration=configuration \ --skip-validate-spec \ --additional-properties variableNamingConvention=camelCase \ diff --git a/README.md b/README.md index a7b07b3cf..834e36547 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The library supports all APIs under the following services: |------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|--------------------------| | [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [Binlookup](src/Adyen/Service/BinLookupApi.php) | **v54** | | [Capital API](https://docs.adyen.com/api-explorer/capital/3/overview) | Adyen Capital allows you to build an embedded financing offering for your users to serve their operational needs. | [Capital](src/Adyen/Service/CapitalApi.php) | **v3** | -| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). | [Checkout](src/Adyen/Service/Checkout) | **v70** | +| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/71/overview) | Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). | [Checkout](src/Adyen/Service/Checkout) | **v71** | | [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](src/Adyen/Service/BalancePlatform/) | **v2** | | [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](src/Adyen/Service/DataProtectionApi.php) | **v1** | | [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](src/Adyen/Service/Management/) | **v3** | @@ -31,18 +31,19 @@ The library supports all APIs under the following services: | [Terminal API (Cloud communications)](https://docs.adyen.com/point-of-sale/choose-your-architecture/cloud) | Our point-of-sale integration. | [Cloud-based Terminal API](src/Adyen/Service/PosPayment.php) | Cloud-based Terminal API | | | [Terminal API (Local communications)](https://docs.adyen.com/point-of-sale/choose-your-architecture/local) | Our point-of-sale integration. | [Local-based Terminal API](src/Adyen/Service/PosPayment.php) | Local-based Terminal API | | | [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | This API provides endpoints for managing your point-of-sale (POS) payment terminals. You can use the API to obtain information about a specific terminal, retrieve overviews of your terminals and stores, and assign terminals to a merchant account or store. | [POSTerminalManagement](src/Adyen/Service/POSTerminalManagementApi.php) | **v1** | -| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](src/Adyen/Service/DisputesApi.php) | **v30** | +| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](src/Adyen/Service/DisputesApi.php) | **v30** | ## Supported Webhook versions The library supports all webhooks under the following model directories: -| Webhooks | Description | Model Name | Supported Version | -|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|-------------------| -| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [AcsWebhooks](src/Adyen/Model/AcsWebhooks) | **v1** | -| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationWebhooks](src/Adyen/Model/ConfigurationWebhooks) | **v1** | -| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/4/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferWebhooks](src/Adyen/Model/TransferWebhooks) | **v4** | -| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportWebhooks](src/Adyen/Model/ReportWebhooks) | **v1** | -| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/3/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API. | [ManagementWebhooks](src/Adyen/Model/ManagementWebhooks) | **v3** | -| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/Adyen/Service/Notification.php) | **v1** | +| Webhooks | Description | Model Name | Supported Version | +|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|-------------------| +| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [AcsWebhooks](src/Adyen/Model/AcsWebhooks) | **v1** | +| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationWebhooks](src/Adyen/Model/ConfigurationWebhooks) | **v1** | +| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/4/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferWebhooks](src/Adyen/Model/TransferWebhooks) | **v4** | +| [Transaction Webhooks](https://docs.adyen.com/api-explorer/transaction-webhooks/4/overview) | Adyen sends webhooks to inform your system about incoming and outgoing transfers in your platform. You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransactionWebhooks](src/Adyen/Model/TransactionWebhooks) | **v4** | +| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportWebhooks](src/Adyen/Model/ReportWebhooks) | **v1** | +| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/3/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API. | [ManagementWebhooks](src/Adyen/Model/ManagementWebhooks) | **v3** | +| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/Adyen/Service/Notification.php) | **v1** | For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/). diff --git a/src/Adyen/Client.php b/src/Adyen/Client.php index 866c44acc..3b3d61dbf 100644 --- a/src/Adyen/Client.php +++ b/src/Adyen/Client.php @@ -7,7 +7,7 @@ class Client { - const LIB_VERSION = "16.0.0-beta"; + const LIB_VERSION = "16.0.0"; const LIB_NAME = "adyen-php-api-library"; const USER_AGENT_SUFFIX = "adyen-php-api-library/"; const ENDPOINT_TEST = "https://pal-test.adyen.com"; diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index 2ef327c28..d8456e950 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -446,7 +446,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index ba7373e31..a82948bbf 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -412,7 +412,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index 29f07c3fd..bccfbacd4 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -368,7 +368,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index e97f31c21..e477f881a 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -45,7 +45,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPITypes = [ 'accountHolderId' => 'string', - 'defaultCurrencyCode' => 'string', 'description' => 'string', 'metadata' => 'array', 'platformPaymentConfiguration' => '\Adyen\Model\BalancePlatform\PlatformPaymentConfiguration', @@ -63,7 +62,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPIFormats = [ 'accountHolderId' => null, - 'defaultCurrencyCode' => null, 'description' => null, 'metadata' => null, 'platformPaymentConfiguration' => null, @@ -79,7 +77,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPINullables = [ 'accountHolderId' => false, - 'defaultCurrencyCode' => false, 'description' => false, 'metadata' => false, 'platformPaymentConfiguration' => false, @@ -175,7 +172,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountHolderId' => 'accountHolderId', - 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', 'metadata' => 'metadata', 'platformPaymentConfiguration' => 'platformPaymentConfiguration', @@ -191,7 +187,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountHolderId' => 'setAccountHolderId', - 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', 'metadata' => 'setMetadata', 'platformPaymentConfiguration' => 'setPlatformPaymentConfiguration', @@ -207,7 +202,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountHolderId' => 'getAccountHolderId', - 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', 'metadata' => 'getMetadata', 'platformPaymentConfiguration' => 'getPlatformPaymentConfiguration', @@ -292,7 +286,6 @@ public function getStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountHolderId', $data ?? [], null); - $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('platformPaymentConfiguration', $data ?? [], null); @@ -379,33 +372,6 @@ public function setAccountHolderId($accountHolderId) return $this; } - /** - * Gets defaultCurrencyCode - * - * @return string|null - */ - public function getDefaultCurrencyCode() - { - return $this->container['defaultCurrencyCode']; - } - - /** - * Sets defaultCurrencyCode - * - * @param string|null $defaultCurrencyCode The default currency code of this balance account, in three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) format. The default value is **EUR**. - * - * @return self - */ - public function setDefaultCurrencyCode($defaultCurrencyCode) - { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } - $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; - - return $this; - } - /** * Gets description * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index df53ff3db..d808045d8 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -55,7 +55,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => 'string', 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -81,7 +80,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => null, 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -105,7 +103,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => false, 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -209,7 +206,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'transitNumber', 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -233,7 +229,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'setTransitNumber', 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -257,7 +252,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'getTransitNumber', 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -331,7 +325,6 @@ public function __construct(array $data = null) $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -395,9 +388,6 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -519,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -695,33 +685,6 @@ public function setIban($iban) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index 6fc6e0d3f..13cf1319c 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -55,7 +55,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => 'string', 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -81,7 +80,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => null, 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -105,7 +103,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => false, 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -209,7 +206,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'transitNumber', 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -233,7 +229,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'setTransitNumber', 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -257,7 +252,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'getTransitNumber', 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -331,7 +325,6 @@ public function __construct(array $data = null) $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -395,9 +388,6 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -519,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -695,33 +685,6 @@ public function setIban($iban) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/BalancePlatform/BankIdentification.php b/src/Adyen/Model/BalancePlatform/BankIdentification.php new file mode 100644 index 000000000..cff25d900 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/BankIdentification.php @@ -0,0 +1,485 @@ + + */ +class BankIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'country' => 'string', + 'identification' => 'string', + 'identificationType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'country' => null, + 'identification' => null, + 'identificationType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'country' => false, + 'identification' => false, + 'identificationType' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'country' => 'country', + 'identification' => 'identification', + 'identificationType' => 'identificationType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'country' => 'setCountry', + 'identification' => 'setIdentification', + 'identificationType' => 'setIdentificationType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'country' => 'getCountry', + 'identification' => 'getIdentification', + 'identificationType' => 'getIdentificationType' + ]; + + /** + * 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::$openAPIModelName; + } + + public const IDENTIFICATION_TYPE_IBAN = 'iban'; + public const IDENTIFICATION_TYPE_ROUTING_NUMBER = 'routingNumber'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIdentificationTypeAllowableValues() + { + return [ + self::IDENTIFICATION_TYPE_IBAN, + self::IDENTIFICATION_TYPE_ROUTING_NUMBER, + ]; + } + /** + * 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->setIfExists('country', $data ?? [], null); + $this->setIfExists('identification', $data ?? [], null); + $this->setIfExists('identificationType', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getIdentificationTypeAllowableValues(); + if (!is_null($this->container['identificationType']) && !in_array($this->container['identificationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'identificationType', must be one of '%s'", + $this->container['identificationType'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets identification + * + * @return string|null + */ + public function getIdentification() + { + return $this->container['identification']; + } + + /** + * Sets identification + * + * @param string|null $identification identification + * + * @return self + */ + public function setIdentification($identification) + { + if (is_null($identification)) { + throw new \InvalidArgumentException('non-nullable identification cannot be null'); + } + $this->container['identification'] = $identification; + + return $this; + } + + /** + * Gets identificationType + * + * @return string|null + */ + public function getIdentificationType() + { + return $this->container['identificationType']; + } + + /** + * Sets identificationType + * + * @param string|null $identificationType identificationType + * + * @return self + */ + public function setIdentificationType($identificationType) + { + if (is_null($identificationType)) { + throw new \InvalidArgumentException('non-nullable identificationType cannot be null'); + } + $allowedValues = $this->getIdentificationTypeAllowableValues(); + if (!in_array($identificationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'identificationType', must be one of '%s'", + $identificationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['identificationType'] = $identificationType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php new file mode 100644 index 000000000..fbf6f1f19 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -0,0 +1,421 @@ + + */ +class CounterpartyBankRestriction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CounterpartyBankRestriction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'operation' => 'string', + 'value' => '\Adyen\Model\BalancePlatform\BankIdentification[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'operation' => null, + 'value' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'operation' => false, + 'value' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'operation' => 'operation', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'operation' => 'setOperation', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'operation' => 'getOperation', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * 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->setIfExists('operation', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['operation'] === null) { + $invalidProperties[] = "'operation' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets operation + * + * @return string + */ + public function getOperation() + { + return $this->container['operation']; + } + + /** + * Sets operation + * + * @param string $operation Defines how the condition must be evaluated. + * + * @return self + */ + public function setOperation($operation) + { + if (is_null($operation)) { + throw new \InvalidArgumentException('non-nullable operation cannot be null'); + } + $this->container['operation'] = $operation; + + return $this; + } + + /** + * Gets value + * + * @return \Adyen\Model\BalancePlatform\BankIdentification[]|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param \Adyen\Model\BalancePlatform\BankIdentification[]|null $value List of counterparty Bank Institutions and the operation. + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 9a0404822..805603649 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -285,7 +285,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -293,16 +292,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -331,7 +333,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -349,16 +350,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/Disputes/DownloadDefenseDocumentResponse.php b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php similarity index 80% rename from src/Adyen/Model/Disputes/DownloadDefenseDocumentResponse.php rename to src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php index 1951854be..ea3df25eb 100644 --- a/src/Adyen/Model/Disputes/DownloadDefenseDocumentResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php @@ -1,9 +1,9 @@ */ -class DownloadDefenseDocumentResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class GetTaxFormResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class DownloadDefenseDocumentResponse implements ModelInterface, ArrayAccess, \J * * @var string */ - protected static $openAPIModelName = 'DownloadDefenseDocumentResponse'; + protected static $openAPIModelName = 'GetTaxFormResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -45,8 +45,7 @@ class DownloadDefenseDocumentResponse implements ModelInterface, ArrayAccess, \J */ protected static $openAPITypes = [ 'content' => 'string', - 'contentType' => 'string', - 'disputeServiceResult' => '\Adyen\Model\Disputes\DisputeServiceResult' + 'contentType' => 'string' ]; /** @@ -58,8 +57,7 @@ class DownloadDefenseDocumentResponse implements ModelInterface, ArrayAccess, \J */ protected static $openAPIFormats = [ 'content' => 'byte', - 'contentType' => null, - 'disputeServiceResult' => null + 'contentType' => null ]; /** @@ -69,8 +67,7 @@ class DownloadDefenseDocumentResponse implements ModelInterface, ArrayAccess, \J */ protected static $openAPINullables = [ 'content' => false, - 'contentType' => false, - 'disputeServiceResult' => false + 'contentType' => false ]; /** @@ -160,8 +157,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'content' => 'content', - 'contentType' => 'contentType', - 'disputeServiceResult' => 'disputeServiceResult' + 'contentType' => 'contentType' ]; /** @@ -171,8 +167,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'content' => 'setContent', - 'contentType' => 'setContentType', - 'disputeServiceResult' => 'setDisputeServiceResult' + 'contentType' => 'setContentType' ]; /** @@ -182,8 +177,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'content' => 'getContent', - 'contentType' => 'getContentType', - 'disputeServiceResult' => 'getDisputeServiceResult' + 'contentType' => 'getContentType' ]; /** @@ -227,7 +221,19 @@ public function getModelName() return self::$openAPIModelName; } + public const CONTENT_TYPE_APPLICATION_PDF = 'application/pdf'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getContentTypeAllowableValues() + { + return [ + self::CONTENT_TYPE_APPLICATION_PDF, + ]; + } /** * Associative array for storing property values * @@ -245,7 +251,6 @@ public function __construct(array $data = null) { $this->setIfExists('content', $data ?? [], null); $this->setIfExists('contentType', $data ?? [], null); - $this->setIfExists('disputeServiceResult', $data ?? [], null); } /** @@ -275,9 +280,18 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['disputeServiceResult'] === null) { - $invalidProperties[] = "'disputeServiceResult' can't be null"; + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + $allowedValues = $this->getContentTypeAllowableValues(); + if (!is_null($this->container['contentType']) && !in_array($this->container['contentType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'contentType', must be one of '%s'", + $this->container['contentType'], + implode("', '", $allowedValues) + ); } + return $invalidProperties; } @@ -296,7 +310,7 @@ public function valid() /** * Gets content * - * @return string|null + * @return string */ public function getContent() { @@ -306,7 +320,7 @@ public function getContent() /** * Sets content * - * @param string|null $content The content of the defense document in Base64 binary format. Must be encoded in the format that is specified in the `contentType` field. + * @param string $content The content of the tax form in Base64 format. * * @return self */ @@ -333,7 +347,7 @@ public function getContentType() /** * Sets contentType * - * @param string|null $contentType The content type of the dispute defense document. Possible values: * **image/jpg** * **image/jpeg** * **image/tiff** * **application/pdf** + * @param string|null $contentType The content type of the tax form. Possible values: * **application/pdf** * * @return self */ @@ -342,34 +356,17 @@ public function setContentType($contentType) if (is_null($contentType)) { throw new \InvalidArgumentException('non-nullable contentType cannot be null'); } - $this->container['contentType'] = $contentType; - - return $this; - } - - /** - * Gets disputeServiceResult - * - * @return \Adyen\Model\Disputes\DisputeServiceResult - */ - public function getDisputeServiceResult() - { - return $this->container['disputeServiceResult']; - } - - /** - * Sets disputeServiceResult - * - * @param \Adyen\Model\Disputes\DisputeServiceResult $disputeServiceResult disputeServiceResult - * - * @return self - */ - public function setDisputeServiceResult($disputeServiceResult) - { - if (is_null($disputeServiceResult)) { - throw new \InvalidArgumentException('non-nullable disputeServiceResult cannot be null'); + $allowedValues = $this->getContentTypeAllowableValues(); + if (!in_array($contentType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'contentType', must be one of '%s'", + $contentType, + implode("', '", $allowedValues) + ) + ); } - $this->container['disputeServiceResult'] = $disputeServiceResult; + $this->container['contentType'] = $contentType; return $this; } diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 561d32201..262c9de65 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * @param string $accountNumber The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index 0df909d2b..ff1b67d47 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -45,8 +45,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'accountSuffix' => 'string', - 'bankCode' => 'string', 'type' => 'string' ]; @@ -59,8 +57,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'accountSuffix' => null, - 'bankCode' => null, 'type' => null ]; @@ -71,8 +67,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'accountSuffix' => false, - 'bankCode' => false, 'type' => false ]; @@ -163,8 +157,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'accountSuffix' => 'accountSuffix', - 'bankCode' => 'bankCode', 'type' => 'type' ]; @@ -175,8 +167,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'accountSuffix' => 'setAccountSuffix', - 'bankCode' => 'setBankCode', 'type' => 'setType' ]; @@ -187,8 +177,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'accountSuffix' => 'getAccountSuffix', - 'bankCode' => 'getBankCode', 'type' => 'getType' ]; @@ -262,8 +250,6 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'nzLocal'); } @@ -297,12 +283,6 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -343,7 +323,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 7-digit bank account number, without separators or whitespace. + * @param string $accountNumber The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * * @return self */ @@ -357,60 +337,6 @@ public function setAccountNumber($accountNumber) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - - /** - * Gets bankCode - * - * @return string - */ - public function getBankCode() - { - return $this->container['bankCode']; - } - - /** - * Sets bankCode - * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * - * @return self - */ - public function setBankCode($bankCode) - { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } - $this->container['bankCode'] = $bankCode; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index 83d3719c2..00fd465f4 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -46,6 +46,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'description' => 'string', 'issuingCountryCode' => 'string', + 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string', 'type' => 'string' ]; @@ -60,6 +61,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'description' => null, 'issuingCountryCode' => null, + 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'description' => false, 'issuingCountryCode' => false, + 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false, 'type' => false ]; @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'description' => 'description', 'issuingCountryCode' => 'issuingCountryCode', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType', 'type' => 'type' ]; @@ -176,6 +180,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'description' => 'setDescription', 'issuingCountryCode' => 'setIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType', 'type' => 'setType' ]; @@ -188,6 +193,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'description' => 'getDescription', 'issuingCountryCode' => 'getIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType', 'type' => 'getType' ]; @@ -277,6 +283,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); } @@ -398,6 +405,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + /** * Gets paymentInstrumentType * diff --git a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php index d5f3759b0..0ea45c5c8 100644 --- a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php @@ -296,7 +296,7 @@ public function getSalesDayClosingTime() /** * Sets salesDayClosingTime * - * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * * @return self */ @@ -323,7 +323,7 @@ public function getSettlementDelayDays() /** * Sets settlementDelayDays * - * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 78b0ea9f3..9a5e1b56e 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -291,7 +291,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -299,16 +298,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -337,7 +339,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -355,16 +356,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 11cad0321..04a403188 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -46,6 +46,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'activeNetworkTokens' => '\Adyen\Model\BalancePlatform\ActiveNetworkTokensRestriction', 'brandVariants' => '\Adyen\Model\BalancePlatform\BrandVariantsRestriction', + 'counterpartyBank' => '\Adyen\Model\BalancePlatform\CounterpartyBankRestriction', 'countries' => '\Adyen\Model\BalancePlatform\CountriesRestriction', 'dayOfWeek' => '\Adyen\Model\BalancePlatform\DayOfWeekRestriction', 'differentCurrencies' => '\Adyen\Model\BalancePlatform\DifferentCurrenciesRestriction', @@ -70,6 +71,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'activeNetworkTokens' => null, 'brandVariants' => null, + 'counterpartyBank' => null, 'countries' => null, 'dayOfWeek' => null, 'differentCurrencies' => null, @@ -92,6 +94,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPINullables = [ 'activeNetworkTokens' => false, 'brandVariants' => false, + 'counterpartyBank' => false, 'countries' => false, 'dayOfWeek' => false, 'differentCurrencies' => false, @@ -194,6 +197,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'activeNetworkTokens' => 'activeNetworkTokens', 'brandVariants' => 'brandVariants', + 'counterpartyBank' => 'counterpartyBank', 'countries' => 'countries', 'dayOfWeek' => 'dayOfWeek', 'differentCurrencies' => 'differentCurrencies', @@ -216,6 +220,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'activeNetworkTokens' => 'setActiveNetworkTokens', 'brandVariants' => 'setBrandVariants', + 'counterpartyBank' => 'setCounterpartyBank', 'countries' => 'setCountries', 'dayOfWeek' => 'setDayOfWeek', 'differentCurrencies' => 'setDifferentCurrencies', @@ -238,6 +243,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'activeNetworkTokens' => 'getActiveNetworkTokens', 'brandVariants' => 'getBrandVariants', + 'counterpartyBank' => 'getCounterpartyBank', 'countries' => 'getCountries', 'dayOfWeek' => 'getDayOfWeek', 'differentCurrencies' => 'getDifferentCurrencies', @@ -311,6 +317,7 @@ public function __construct(array $data = null) { $this->setIfExists('activeNetworkTokens', $data ?? [], null); $this->setIfExists('brandVariants', $data ?? [], null); + $this->setIfExists('counterpartyBank', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('dayOfWeek', $data ?? [], null); $this->setIfExists('differentCurrencies', $data ?? [], null); @@ -421,6 +428,33 @@ public function setBrandVariants($brandVariants) return $this; } + /** + * Gets counterpartyBank + * + * @return \Adyen\Model\BalancePlatform\CounterpartyBankRestriction|null + */ + public function getCounterpartyBank() + { + return $this->container['counterpartyBank']; + } + + /** + * Sets counterpartyBank + * + * @param \Adyen\Model\BalancePlatform\CounterpartyBankRestriction|null $counterpartyBank counterpartyBank + * + * @return self + */ + public function setCounterpartyBank($counterpartyBank) + { + if (is_null($counterpartyBank)) { + throw new \InvalidArgumentException('non-nullable counterpartyBank cannot be null'); + } + $this->container['counterpartyBank'] = $counterpartyBank; + + return $this; + } + /** * Gets countries * diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index 0d7c123c7..e72c147ca 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -44,7 +44,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'balancePlatform' => 'string', 'category' => 'string', 'country' => 'string', 'currency' => 'string', @@ -60,7 +59,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'balancePlatform' => null, 'category' => null, 'country' => null, 'currency' => null, @@ -74,7 +72,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'balancePlatform' => false, 'category' => false, 'country' => false, 'currency' => false, @@ -168,7 +165,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'balancePlatform' => 'balancePlatform', 'category' => 'category', 'country' => 'country', 'currency' => 'currency', @@ -182,7 +178,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'balancePlatform' => 'setBalancePlatform', 'category' => 'setCategory', 'country' => 'setCountry', 'currency' => 'setCurrency', @@ -196,7 +191,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'balancePlatform' => 'getBalancePlatform', 'category' => 'getCategory', 'country' => 'getCountry', 'currency' => 'getCurrency', @@ -252,6 +246,7 @@ public function getModelName() public const CATEGORY_ISSUED_CARD = 'issuedCard'; public const CATEGORY_MIGRATION = 'migration'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; + public const CATEGORY_UPGRADE = 'upgrade'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_FAST = 'fast'; public const PRIORITY_INSTANT = 'instant'; @@ -274,6 +269,7 @@ public function getCategoryAllowableValues() self::CATEGORY_ISSUED_CARD, self::CATEGORY_MIGRATION, self::CATEGORY_PLATFORM_PAYMENT, + self::CATEGORY_UPGRADE, ]; } /** @@ -307,7 +303,6 @@ public function getPriorityAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('balancePlatform', $data ?? [], null); $this->setIfExists('category', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); @@ -375,33 +370,6 @@ public function valid() } - /** - * Gets balancePlatform - * - * @return string|null - */ - public function getBalancePlatform() - { - return $this->container['balancePlatform']; - } - - /** - * Sets balancePlatform - * - * @param string|null $balancePlatform The unique identifier assigned to the balance platform associated with the account holder. - * - * @return self - */ - public function setBalancePlatform($balancePlatform) - { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } - $this->container['balancePlatform'] = $balancePlatform; - - return $this; - } - /** * Gets category * diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php index 6039b0908..74f39f20d 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php @@ -52,6 +52,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => 'int', 'bankAccountIdentificationTypes' => 'string[]', 'issuingCountryCode' => 'string', + 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string' ]; @@ -70,6 +71,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => 'int64', 'bankAccountIdentificationTypes' => null, 'issuingCountryCode' => null, + 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null ]; @@ -86,6 +88,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => false, 'bankAccountIdentificationTypes' => false, 'issuingCountryCode' => false, + 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false ]; @@ -182,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'min', 'bankAccountIdentificationTypes' => 'bankAccountIdentificationTypes', 'issuingCountryCode' => 'issuingCountryCode', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType' ]; @@ -198,6 +202,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'setMin', 'bankAccountIdentificationTypes' => 'setBankAccountIdentificationTypes', 'issuingCountryCode' => 'setIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType' ]; @@ -214,6 +219,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'getMin', 'bankAccountIdentificationTypes' => 'getBankAccountIdentificationTypes', 'issuingCountryCode' => 'getIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType' ]; @@ -280,6 +286,7 @@ public function __construct(array $data = null) $this->setIfExists('min', $data ?? [], null); $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); } @@ -519,6 +526,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + /** * Gets paymentInstrumentType * diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index eaedc36f7..f728eba4b 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -291,7 +291,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -299,16 +298,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -337,7 +339,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -355,16 +356,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 2f4cdc052..52c30a926 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -47,7 +47,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => 'string', 'directoryServerId' => 'string', 'fromSDKVersion' => 'string', - 'publicKey' => 'string' + 'publicKey' => 'string', + 'rootCertificates' => 'string' ]; /** @@ -61,7 +62,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => null, 'directoryServerId' => null, 'fromSDKVersion' => null, - 'publicKey' => 'byte' + 'publicKey' => 'byte', + 'rootCertificates' => null ]; /** @@ -73,7 +75,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => false, 'directoryServerId' => false, 'fromSDKVersion' => false, - 'publicKey' => false + 'publicKey' => false, + 'rootCertificates' => false ]; /** @@ -165,7 +168,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'brand', 'directoryServerId' => 'directoryServerId', 'fromSDKVersion' => 'fromSDKVersion', - 'publicKey' => 'publicKey' + 'publicKey' => 'publicKey', + 'rootCertificates' => 'rootCertificates' ]; /** @@ -177,7 +181,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'setBrand', 'directoryServerId' => 'setDirectoryServerId', 'fromSDKVersion' => 'setFromSDKVersion', - 'publicKey' => 'setPublicKey' + 'publicKey' => 'setPublicKey', + 'rootCertificates' => 'setRootCertificates' ]; /** @@ -189,7 +194,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'getBrand', 'directoryServerId' => 'getDirectoryServerId', 'fromSDKVersion' => 'getFromSDKVersion', - 'publicKey' => 'getPublicKey' + 'publicKey' => 'getPublicKey', + 'rootCertificates' => 'getRootCertificates' ]; /** @@ -253,6 +259,7 @@ public function __construct(array $data = null) $this->setIfExists('directoryServerId', $data ?? [], null); $this->setIfExists('fromSDKVersion', $data ?? [], null); $this->setIfExists('publicKey', $data ?? [], null); + $this->setIfExists('rootCertificates', $data ?? [], null); } /** @@ -404,6 +411,33 @@ public function setPublicKey($publicKey) return $this; } + + /** + * Gets rootCertificates + * + * @return string|null + */ + public function getRootCertificates() + { + return $this->container['rootCertificates']; + } + + /** + * Sets rootCertificates + * + * @param string|null $rootCertificates Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + * + * @return self + */ + public function setRootCertificates($rootCertificates) + { + if (is_null($rootCertificates)) { + throw new \InvalidArgumentException('non-nullable rootCertificates cannot be null'); + } + $this->container['rootCertificates'] = $rootCertificates; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index 29a586afd..a7bf98bdd 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/Checkout/AccountInfo.php b/src/Adyen/Model/Checkout/AccountInfo.php index 598ee0166..706aef35d 100644 --- a/src/Adyen/Model/Checkout/AccountInfo.php +++ b/src/Adyen/Model/Checkout/AccountInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AcctInfo.php b/src/Adyen/Model/Checkout/AcctInfo.php index 4d16a1b48..e4c7f8261 100644 --- a/src/Adyen/Model/Checkout/AcctInfo.php +++ b/src/Adyen/Model/Checkout/AcctInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index 08456134a..d76671d9a 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index 32b71fb6c..6820a19f8 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataAirline.php b/src/Adyen/Model/Checkout/AdditionalDataAirline.php index ca3f4e5d3..f9a2a0cd7 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataAirline.php +++ b/src/Adyen/Model/Checkout/AdditionalDataAirline.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php index b44f31e58..46581be72 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataCommon.php b/src/Adyen/Model/Checkout/AdditionalDataCommon.php index 094ebf4e2..c5a1daba4 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCommon.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index 37d0ac382..ef41a31d2 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataLodging.php b/src/Adyen/Model/Checkout/AdditionalDataLodging.php index 77ce11cf3..10c346cc3 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLodging.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLodging.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php b/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php index 42a330966..8a8c29dd0 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php +++ b/src/Adyen/Model/Checkout/AdditionalDataOpenInvoice.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataOpi.php b/src/Adyen/Model/Checkout/AdditionalDataOpi.php index 3bfc256a7..2db0d1d6f 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataOpi.php +++ b/src/Adyen/Model/Checkout/AdditionalDataOpi.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataRatepay.php b/src/Adyen/Model/Checkout/AdditionalDataRatepay.php index fca7710ec..8d7ce42e7 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRatepay.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRatepay.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataRetry.php b/src/Adyen/Model/Checkout/AdditionalDataRetry.php index 911c2472c..5060355af 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRetry.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRetry.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataRisk.php b/src/Adyen/Model/Checkout/AdditionalDataRisk.php index 9d0d93558..423796d69 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRisk.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRisk.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php b/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php index d48335155..612b2ddd8 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php +++ b/src/Adyen/Model/Checkout/AdditionalDataRiskStandalone.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php index 46474ee25..6f5c8cdb7 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php index c57dc7fbe..7ee94ef05 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AdditionalDataWallets.php b/src/Adyen/Model/Checkout/AdditionalDataWallets.php index 84ee52f8d..52c553276 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataWallets.php +++ b/src/Adyen/Model/Checkout/AdditionalDataWallets.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Address.php b/src/Adyen/Model/Checkout/Address.php index f17b3d55b..319a35e6e 100644 --- a/src/Adyen/Model/Checkout/Address.php +++ b/src/Adyen/Model/Checkout/Address.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index b4b02d494..9e4634e00 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AmazonPayDetails.php b/src/Adyen/Model/Checkout/AmazonPayDetails.php index 24a9ae0c3..20cad0c7f 100644 --- a/src/Adyen/Model/Checkout/AmazonPayDetails.php +++ b/src/Adyen/Model/Checkout/AmazonPayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Amount.php b/src/Adyen/Model/Checkout/Amount.php index 43a38df02..dd41d2056 100644 --- a/src/Adyen/Model/Checkout/Amount.php +++ b/src/Adyen/Model/Checkout/Amount.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AndroidPayDetails.php b/src/Adyen/Model/Checkout/AndroidPayDetails.php index 371a8bd11..0d8a98089 100644 --- a/src/Adyen/Model/Checkout/AndroidPayDetails.php +++ b/src/Adyen/Model/Checkout/AndroidPayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index 68a9d1cb6..b62c260e8 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ApplePaySessionRequest.php b/src/Adyen/Model/Checkout/ApplePaySessionRequest.php index 310d1c7b0..b0c9bfc7a 100644 --- a/src/Adyen/Model/Checkout/ApplePaySessionRequest.php +++ b/src/Adyen/Model/Checkout/ApplePaySessionRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ApplePaySessionResponse.php b/src/Adyen/Model/Checkout/ApplePaySessionResponse.php index c21c18e86..096115eb0 100644 --- a/src/Adyen/Model/Checkout/ApplePaySessionResponse.php +++ b/src/Adyen/Model/Checkout/ApplePaySessionResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ApplicationInfo.php b/src/Adyen/Model/Checkout/ApplicationInfo.php index 644f92d6b..718886c97 100644 --- a/src/Adyen/Model/Checkout/ApplicationInfo.php +++ b/src/Adyen/Model/Checkout/ApplicationInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/AuthenticationData.php b/src/Adyen/Model/Checkout/AuthenticationData.php index 5a6e7d23c..4c7027a8d 100644 --- a/src/Adyen/Model/Checkout/AuthenticationData.php +++ b/src/Adyen/Model/Checkout/AuthenticationData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Avs.php b/src/Adyen/Model/Checkout/Avs.php index 2936dd6e1..5fcf2dacb 100644 --- a/src/Adyen/Model/Checkout/Avs.php +++ b/src/Adyen/Model/Checkout/Avs.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index 66e6621fd..c1ec35741 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index ff890aee1..599a485a8 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BalanceCheckResponse.php b/src/Adyen/Model/Checkout/BalanceCheckResponse.php index 651ce8efe..cb54f6e1b 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckResponse.php +++ b/src/Adyen/Model/Checkout/BalanceCheckResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BankAccount.php b/src/Adyen/Model/Checkout/BankAccount.php index f461fe036..1a3cc3e5c 100644 --- a/src/Adyen/Model/Checkout/BankAccount.php +++ b/src/Adyen/Model/Checkout/BankAccount.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BillDeskDetails.php b/src/Adyen/Model/Checkout/BillDeskDetails.php index 3638e5e46..e5b94af6a 100644 --- a/src/Adyen/Model/Checkout/BillDeskDetails.php +++ b/src/Adyen/Model/Checkout/BillDeskDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BillingAddress.php b/src/Adyen/Model/Checkout/BillingAddress.php new file mode 100644 index 000000000..a6e3c3cce --- /dev/null +++ b/src/Adyen/Model/Checkout/BillingAddress.php @@ -0,0 +1,569 @@ + + */ +class BillingAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BillingAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'houseNumberOrName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'houseNumberOrName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'houseNumberOrName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'city' => 'city', + 'country' => 'country', + 'houseNumberOrName' => 'houseNumberOrName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/BlikDetails.php b/src/Adyen/Model/Checkout/BlikDetails.php index a1c65e7a6..26e91d75b 100644 --- a/src/Adyen/Model/Checkout/BlikDetails.php +++ b/src/Adyen/Model/Checkout/BlikDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/BrowserInfo.php b/src/Adyen/Model/Checkout/BrowserInfo.php index 8fc841a8c..b6cef3e06 100644 --- a/src/Adyen/Model/Checkout/BrowserInfo.php +++ b/src/Adyen/Model/Checkout/BrowserInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CancelOrderRequest.php b/src/Adyen/Model/Checkout/CancelOrderRequest.php index 4578ff26c..6aa4f5fec 100644 --- a/src/Adyen/Model/Checkout/CancelOrderRequest.php +++ b/src/Adyen/Model/Checkout/CancelOrderRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CancelOrderResponse.php b/src/Adyen/Model/Checkout/CancelOrderResponse.php index 422526618..76a1a6662 100644 --- a/src/Adyen/Model/Checkout/CancelOrderResponse.php +++ b/src/Adyen/Model/Checkout/CancelOrderResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Card.php b/src/Adyen/Model/Checkout/Card.php index 11b875bf7..aba06c6b7 100644 --- a/src/Adyen/Model/Checkout/Card.php +++ b/src/Adyen/Model/Checkout/Card.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CardBrandDetails.php b/src/Adyen/Model/Checkout/CardBrandDetails.php index 13c58ac2c..9ea153813 100644 --- a/src/Adyen/Model/Checkout/CardBrandDetails.php +++ b/src/Adyen/Model/Checkout/CardBrandDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 33974d5a1..1e7aa6471 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -324,11 +324,8 @@ public function getModelName() } public const FUNDING_SOURCE_DEBIT = 'debit'; - public const TYPE_BCMC = 'bcmc'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; - public const TYPE_GIFTCARD = 'giftcard'; - public const TYPE_ALLIANCEDATA = 'alliancedata'; public const TYPE_CARD = 'card'; /** @@ -350,11 +347,8 @@ public function getFundingSourceAllowableValues() public function getTypeAllowableValues() { return [ - self::TYPE_BCMC, self::TYPE_SCHEME, self::TYPE_NETWORK_TOKEN, - self::TYPE_GIFTCARD, - self::TYPE_ALLIANCEDATA, self::TYPE_CARD, ]; } diff --git a/src/Adyen/Model/Checkout/CardDetailsRequest.php b/src/Adyen/Model/Checkout/CardDetailsRequest.php index 686922f12..15524d64e 100644 --- a/src/Adyen/Model/Checkout/CardDetailsRequest.php +++ b/src/Adyen/Model/Checkout/CardDetailsRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CardDetailsResponse.php b/src/Adyen/Model/Checkout/CardDetailsResponse.php index 9bc537f3c..c1ff06287 100644 --- a/src/Adyen/Model/Checkout/CardDetailsResponse.php +++ b/src/Adyen/Model/Checkout/CardDetailsResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CellulantDetails.php b/src/Adyen/Model/Checkout/CellulantDetails.php index caa7a75d5..218342c67 100644 --- a/src/Adyen/Model/Checkout/CellulantDetails.php +++ b/src/Adyen/Model/Checkout/CellulantDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php index 8baff8023..4d8cfc797 100644 --- a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php +++ b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php index 3bcfde57b..afc7a1811 100644 --- a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php +++ b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php b/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php index 2dcec5ec5..609f01bfc 100644 --- a/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php +++ b/src/Adyen/Model/Checkout/CheckoutNativeRedirectAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutOrderResponse.php b/src/Adyen/Model/Checkout/CheckoutOrderResponse.php index 40190a29b..2946f527a 100644 --- a/src/Adyen/Model/Checkout/CheckoutOrderResponse.php +++ b/src/Adyen/Model/Checkout/CheckoutOrderResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 89166d867..3014e4214 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php index 67a41e010..07c685eff 100644 --- a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php +++ b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutRedirectAction.php b/src/Adyen/Model/Checkout/CheckoutRedirectAction.php index 9302c98f9..4d4483a52 100644 --- a/src/Adyen/Model/Checkout/CheckoutRedirectAction.php +++ b/src/Adyen/Model/Checkout/CheckoutRedirectAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutSDKAction.php b/src/Adyen/Model/Checkout/CheckoutSDKAction.php index 06045d3ef..a5a135fdd 100644 --- a/src/Adyen/Model/Checkout/CheckoutSDKAction.php +++ b/src/Adyen/Model/Checkout/CheckoutSDKAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php b/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php index cfd17c508..d17175a63 100644 --- a/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php +++ b/src/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php index b263ff02c..d60c2f61a 100644 --- a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php +++ b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php index 82ef44eff..f34d4cb2f 100644 --- a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php +++ b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CommonField.php b/src/Adyen/Model/Checkout/CommonField.php index 6abf87f1a..40b106866 100644 --- a/src/Adyen/Model/Checkout/CommonField.php +++ b/src/Adyen/Model/Checkout/CommonField.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Company.php b/src/Adyen/Model/Checkout/Company.php index 2be8fd5b6..d9c1dbed7 100644 --- a/src/Adyen/Model/Checkout/Company.php +++ b/src/Adyen/Model/Checkout/Company.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Configuration.php b/src/Adyen/Model/Checkout/Configuration.php index 1d4f0cb5b..acd853e6d 100644 --- a/src/Adyen/Model/Checkout/Configuration.php +++ b/src/Adyen/Model/Checkout/Configuration.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index faaa4cc9b..a73229cce 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -51,7 +51,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -73,6 +73,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'merchantAccount' => 'string', 'merchantOrderReference' => 'string', 'metadata' => 'array', + 'mode' => 'string', 'mpiData' => '\Adyen\Model\Checkout\ThreeDSecureData', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', @@ -90,6 +91,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperName' => '\Adyen\Model\Checkout\Name', 'shopperReference' => 'string', 'shopperStatement' => 'string', + 'showInstallmentAmount' => 'bool', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', 'splits' => '\Adyen\Model\Checkout\Split[]', @@ -138,6 +140,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'merchantAccount' => null, 'merchantOrderReference' => null, 'metadata' => null, + 'mode' => null, 'mpiData' => null, 'platformChargebackLogic' => null, 'recurringExpiry' => null, @@ -155,6 +158,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperName' => null, 'shopperReference' => null, 'shopperStatement' => null, + 'showInstallmentAmount' => null, 'socialSecurityNumber' => null, 'splitCardFundingSources' => null, 'splits' => null, @@ -201,6 +205,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'merchantAccount' => false, 'merchantOrderReference' => false, 'metadata' => false, + 'mode' => false, 'mpiData' => false, 'platformChargebackLogic' => false, 'recurringExpiry' => false, @@ -218,6 +223,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperName' => false, 'shopperReference' => false, 'shopperStatement' => false, + 'showInstallmentAmount' => false, 'socialSecurityNumber' => false, 'splitCardFundingSources' => false, 'splits' => false, @@ -344,6 +350,7 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'merchantAccount', 'merchantOrderReference' => 'merchantOrderReference', 'metadata' => 'metadata', + 'mode' => 'mode', 'mpiData' => 'mpiData', 'platformChargebackLogic' => 'platformChargebackLogic', 'recurringExpiry' => 'recurringExpiry', @@ -361,6 +368,7 @@ public function isNullableSetToNull(string $property): bool 'shopperName' => 'shopperName', 'shopperReference' => 'shopperReference', 'shopperStatement' => 'shopperStatement', + 'showInstallmentAmount' => 'showInstallmentAmount', 'socialSecurityNumber' => 'socialSecurityNumber', 'splitCardFundingSources' => 'splitCardFundingSources', 'splits' => 'splits', @@ -407,6 +415,7 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'setMerchantAccount', 'merchantOrderReference' => 'setMerchantOrderReference', 'metadata' => 'setMetadata', + 'mode' => 'setMode', 'mpiData' => 'setMpiData', 'platformChargebackLogic' => 'setPlatformChargebackLogic', 'recurringExpiry' => 'setRecurringExpiry', @@ -424,6 +433,7 @@ public function isNullableSetToNull(string $property): bool 'shopperName' => 'setShopperName', 'shopperReference' => 'setShopperReference', 'shopperStatement' => 'setShopperStatement', + 'showInstallmentAmount' => 'setShowInstallmentAmount', 'socialSecurityNumber' => 'setSocialSecurityNumber', 'splitCardFundingSources' => 'setSplitCardFundingSources', 'splits' => 'setSplits', @@ -470,6 +480,7 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'getMerchantAccount', 'merchantOrderReference' => 'getMerchantOrderReference', 'metadata' => 'getMetadata', + 'mode' => 'getMode', 'mpiData' => 'getMpiData', 'platformChargebackLogic' => 'getPlatformChargebackLogic', 'recurringExpiry' => 'getRecurringExpiry', @@ -487,6 +498,7 @@ public function isNullableSetToNull(string $property): bool 'shopperName' => 'getShopperName', 'shopperReference' => 'getShopperReference', 'shopperStatement' => 'getShopperStatement', + 'showInstallmentAmount' => 'getShowInstallmentAmount', 'socialSecurityNumber' => 'getSocialSecurityNumber', 'splitCardFundingSources' => 'getSplitCardFundingSources', 'splits' => 'getSplits', @@ -542,6 +554,8 @@ public function getModelName() public const CHANNEL_I_OS = 'iOS'; public const CHANNEL_ANDROID = 'Android'; public const CHANNEL_WEB = 'Web'; + public const MODE_EMBEDDED = 'embedded'; + public const MODE_HOSTED = 'hosted'; public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; @@ -566,6 +580,18 @@ public function getChannelAllowableValues() self::CHANNEL_WEB, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModeAllowableValues() + { + return [ + self::MODE_EMBEDDED, + self::MODE_HOSTED, + ]; + } /** * Gets allowable values of the enum * @@ -650,6 +676,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('mode', $data ?? [], 'embedded'); $this->setIfExists('mpiData', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); @@ -667,6 +694,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); + $this->setIfExists('showInstallmentAmount', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('splitCardFundingSources', $data ?? [], false); $this->setIfExists('splits', $data ?? [], null); @@ -720,6 +748,15 @@ public function listInvalidProperties() if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($this->container['mode']) && !in_array($this->container['mode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'mode', must be one of '%s'", + $this->container['mode'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -960,7 +997,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -970,7 +1007,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1184,7 +1221,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1194,7 +1231,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -1559,6 +1596,43 @@ public function setMetadata($metadata) return $this; } + /** + * Gets mode + * + * @return string|null + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string|null $mode Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration + * + * @return self + */ + public function setMode($mode) + { + if (is_null($mode)) { + throw new \InvalidArgumentException('non-nullable mode cannot be null'); + } + $allowedValues = $this->getModeAllowableValues(); + if (!in_array($mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'mode', must be one of '%s'", + $mode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['mode'] = $mode; + + return $this; + } + /** * Gets mpiData * @@ -2038,6 +2112,33 @@ public function setShopperStatement($shopperStatement) return $this; } + /** + * Gets showInstallmentAmount + * + * @return bool|null + */ + public function getShowInstallmentAmount() + { + return $this->container['showInstallmentAmount']; + } + + /** + * Sets showInstallmentAmount + * + * @param bool|null $showInstallmentAmount Set to true to show the payment amount per installment. + * + * @return self + */ + public function setShowInstallmentAmount($showInstallmentAmount) + { + if (is_null($showInstallmentAmount)) { + throw new \InvalidArgumentException('non-nullable showInstallmentAmount cannot be null'); + } + $this->container['showInstallmentAmount'] = $showInstallmentAmount; + + return $this; + } + /** * Gets socialSecurityNumber * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 5927126c1..40ca186b9 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -51,7 +51,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -93,6 +93,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperName' => '\Adyen\Model\Checkout\Name', 'shopperReference' => 'string', 'shopperStatement' => 'string', + 'showInstallmentAmount' => 'bool', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', 'splits' => '\Adyen\Model\Checkout\Split[]', @@ -161,6 +162,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperName' => null, 'shopperReference' => null, 'shopperStatement' => null, + 'showInstallmentAmount' => null, 'socialSecurityNumber' => null, 'splitCardFundingSources' => null, 'splits' => null, @@ -227,6 +229,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperName' => false, 'shopperReference' => false, 'shopperStatement' => false, + 'showInstallmentAmount' => false, 'socialSecurityNumber' => false, 'splitCardFundingSources' => false, 'splits' => false, @@ -373,6 +376,7 @@ public function isNullableSetToNull(string $property): bool 'shopperName' => 'shopperName', 'shopperReference' => 'shopperReference', 'shopperStatement' => 'shopperStatement', + 'showInstallmentAmount' => 'showInstallmentAmount', 'socialSecurityNumber' => 'socialSecurityNumber', 'splitCardFundingSources' => 'splitCardFundingSources', 'splits' => 'splits', @@ -439,6 +443,7 @@ public function isNullableSetToNull(string $property): bool 'shopperName' => 'setShopperName', 'shopperReference' => 'setShopperReference', 'shopperStatement' => 'setShopperStatement', + 'showInstallmentAmount' => 'setShowInstallmentAmount', 'socialSecurityNumber' => 'setSocialSecurityNumber', 'splitCardFundingSources' => 'setSplitCardFundingSources', 'splits' => 'setSplits', @@ -505,6 +510,7 @@ public function isNullableSetToNull(string $property): bool 'shopperName' => 'getShopperName', 'shopperReference' => 'getShopperReference', 'shopperStatement' => 'getShopperStatement', + 'showInstallmentAmount' => 'getShowInstallmentAmount', 'socialSecurityNumber' => 'getSocialSecurityNumber', 'splitCardFundingSources' => 'getSplitCardFundingSources', 'splits' => 'getSplits', @@ -702,6 +708,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); + $this->setIfExists('showInstallmentAmount', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('splitCardFundingSources', $data ?? [], false); $this->setIfExists('splits', $data ?? [], null); @@ -1010,7 +1017,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1020,7 +1027,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1234,7 +1241,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1244,7 +1251,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -2179,6 +2186,33 @@ public function setShopperStatement($shopperStatement) return $this; } + /** + * Gets showInstallmentAmount + * + * @return bool|null + */ + public function getShowInstallmentAmount() + { + return $this->container['showInstallmentAmount']; + } + + /** + * Sets showInstallmentAmount + * + * @param bool|null $showInstallmentAmount Set to true to show the payment amount per installment. + * + * @return self + */ + public function setShowInstallmentAmount($showInstallmentAmount) + { + if (is_null($showInstallmentAmount)) { + throw new \InvalidArgumentException('non-nullable showInstallmentAmount cannot be null'); + } + $this->container['showInstallmentAmount'] = $showInstallmentAmount; + + return $this; + } + /** * Gets socialSecurityNumber * diff --git a/src/Adyen/Model/Checkout/CreateOrderRequest.php b/src/Adyen/Model/Checkout/CreateOrderRequest.php index 43774ffba..829393a4d 100644 --- a/src/Adyen/Model/Checkout/CreateOrderRequest.php +++ b/src/Adyen/Model/Checkout/CreateOrderRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/CreateOrderResponse.php b/src/Adyen/Model/Checkout/CreateOrderResponse.php index 0ca5629ba..0db7824ba 100644 --- a/src/Adyen/Model/Checkout/CreateOrderResponse.php +++ b/src/Adyen/Model/Checkout/CreateOrderResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/DeliveryAddress.php b/src/Adyen/Model/Checkout/DeliveryAddress.php new file mode 100644 index 000000000..f7d24133a --- /dev/null +++ b/src/Adyen/Model/Checkout/DeliveryAddress.php @@ -0,0 +1,637 @@ + + */ +class DeliveryAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DeliveryAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'firstName' => 'string', + 'houseNumberOrName' => 'string', + 'lastName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'firstName' => null, + 'houseNumberOrName' => null, + 'lastName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'firstName' => false, + 'houseNumberOrName' => false, + 'lastName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'city' => 'city', + 'country' => 'country', + 'firstName' => 'firstName', + 'houseNumberOrName' => 'houseNumberOrName', + 'lastName' => 'lastName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'firstName' => 'setFirstName', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'lastName' => 'setLastName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'firstName' => 'getFirstName', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'lastName' => 'getLastName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName firstName + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName lastName + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php index 539f03760..b926ff170 100644 --- a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php +++ b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/DeviceRenderOptions.php b/src/Adyen/Model/Checkout/DeviceRenderOptions.php index e76864f28..8d13b7700 100644 --- a/src/Adyen/Model/Checkout/DeviceRenderOptions.php +++ b/src/Adyen/Model/Checkout/DeviceRenderOptions.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/DokuDetails.php b/src/Adyen/Model/Checkout/DokuDetails.php index ee312f037..c7713317d 100644 --- a/src/Adyen/Model/Checkout/DokuDetails.php +++ b/src/Adyen/Model/Checkout/DokuDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -248,6 +248,8 @@ public function getModelName() public const TYPE_BCA_VA = 'doku_bca_va'; public const TYPE_ALFAMART = 'doku_alfamart'; public const TYPE_INDOMARET = 'doku_indomaret'; + public const TYPE_WALLET = 'doku_wallet'; + public const TYPE_OVO = 'doku_ovo'; /** * Gets allowable values of the enum @@ -266,6 +268,8 @@ public function getTypeAllowableValues() self::TYPE_BCA_VA, self::TYPE_ALFAMART, self::TYPE_INDOMARET, + self::TYPE_WALLET, + self::TYPE_OVO, ]; } /** diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php new file mode 100644 index 000000000..9adb16267 --- /dev/null +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -0,0 +1,1113 @@ + + */ +class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DonationPaymentMethod'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'applePayToken' => 'string', + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string', + 'brand' => 'string', + 'cupsecureplusSmscode' => 'string', + 'cvc' => 'string', + 'encryptedCardNumber' => 'string', + 'encryptedExpiryMonth' => 'string', + 'encryptedExpiryYear' => 'string', + 'encryptedSecurityCode' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'holderName' => 'string', + 'networkPaymentReference' => 'string', + 'number' => 'string', + 'shopperNotificationReference' => 'string', + 'threeDS2SdkVersion' => 'string', + 'googlePayToken' => 'string', + 'issuer' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'applePayToken' => null, + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null, + 'brand' => null, + 'cupsecureplusSmscode' => null, + 'cvc' => null, + 'encryptedCardNumber' => null, + 'encryptedExpiryMonth' => null, + 'encryptedExpiryYear' => null, + 'encryptedSecurityCode' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'holderName' => null, + 'networkPaymentReference' => null, + 'number' => null, + 'shopperNotificationReference' => null, + 'threeDS2SdkVersion' => null, + 'googlePayToken' => null, + 'issuer' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'applePayToken' => false, + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false, + 'brand' => false, + 'cupsecureplusSmscode' => false, + 'cvc' => false, + 'encryptedCardNumber' => false, + 'encryptedExpiryMonth' => false, + 'encryptedExpiryYear' => false, + 'encryptedSecurityCode' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'holderName' => false, + 'networkPaymentReference' => false, + 'number' => false, + 'shopperNotificationReference' => false, + 'threeDS2SdkVersion' => false, + 'googlePayToken' => false, + 'issuer' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applePayToken' => 'applePayToken', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type', + 'brand' => 'brand', + 'cupsecureplusSmscode' => 'cupsecureplus.smscode', + 'cvc' => 'cvc', + 'encryptedCardNumber' => 'encryptedCardNumber', + 'encryptedExpiryMonth' => 'encryptedExpiryMonth', + 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedSecurityCode' => 'encryptedSecurityCode', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'holderName' => 'holderName', + 'networkPaymentReference' => 'networkPaymentReference', + 'number' => 'number', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'threeDS2SdkVersion' => 'threeDS2SdkVersion', + 'googlePayToken' => 'googlePayToken', + 'issuer' => 'issuer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applePayToken' => 'setApplePayToken', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType', + 'brand' => 'setBrand', + 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', + 'cvc' => 'setCvc', + 'encryptedCardNumber' => 'setEncryptedCardNumber', + 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedSecurityCode' => 'setEncryptedSecurityCode', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'holderName' => 'setHolderName', + 'networkPaymentReference' => 'setNetworkPaymentReference', + 'number' => 'setNumber', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', + 'googlePayToken' => 'setGooglePayToken', + 'issuer' => 'setIssuer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applePayToken' => 'getApplePayToken', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType', + 'brand' => 'getBrand', + 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', + 'cvc' => 'getCvc', + 'encryptedCardNumber' => 'getEncryptedCardNumber', + 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedSecurityCode' => 'getEncryptedSecurityCode', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'holderName' => 'getHolderName', + 'networkPaymentReference' => 'getNetworkPaymentReference', + 'number' => 'getNumber', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', + 'googlePayToken' => 'getGooglePayToken', + 'issuer' => 'getIssuer' + ]; + + /** + * 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::$openAPIModelName; + } + + /** + * 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->setIfExists('applePayToken', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); + $this->setIfExists('encryptedCardNumber', $data ?? [], null); + $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); + $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedSecurityCode', $data ?? [], null); + $this->setIfExists('expiryMonth', $data ?? [], null); + $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('networkPaymentReference', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['applePayToken'] === null) { + $invalidProperties[] = "'applePayToken' can't be null"; + } + + + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + if ($this->container['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applePayToken + * + * @return string + */ + public function getApplePayToken() + { + return $this->container['applePayToken']; + } + + /** + * Sets applePayToken + * + * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + * + * @return self + */ + public function setApplePayToken($applePayToken) + { + if (is_null($applePayToken)) { + throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); + } + $this->container['applePayToken'] = $applePayToken; + + return $this; + } + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **paywithgoogle** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets brand + * + * @return string|null + */ + public function getBrand() + { + return $this->container['brand']; + } + + /** + * Sets brand + * + * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. + * + * @return self + */ + public function setBrand($brand) + { + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); + } + $this->container['brand'] = $brand; + + return $this; + } + + /** + * Gets cupsecureplusSmscode + * + * @return string|null + * @deprecated + */ + public function getCupsecureplusSmscode() + { + return $this->container['cupsecureplusSmscode']; + } + + /** + * Sets cupsecureplusSmscode + * + * @param string|null $cupsecureplusSmscode cupsecureplusSmscode + * + * @return self + * @deprecated + */ + public function setCupsecureplusSmscode($cupsecureplusSmscode) + { + if (is_null($cupsecureplusSmscode)) { + throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); + } + $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; + + return $this; + } + + /** + * Gets cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @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 encryptedCardNumber + * + * @return string|null + */ + public function getEncryptedCardNumber() + { + return $this->container['encryptedCardNumber']; + } + + /** + * Sets encryptedCardNumber + * + * @param string|null $encryptedCardNumber The encrypted card number. + * + * @return self + */ + public function setEncryptedCardNumber($encryptedCardNumber) + { + if (is_null($encryptedCardNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); + } + $this->container['encryptedCardNumber'] = $encryptedCardNumber; + + return $this; + } + + /** + * Gets encryptedExpiryMonth + * + * @return string|null + */ + public function getEncryptedExpiryMonth() + { + return $this->container['encryptedExpiryMonth']; + } + + /** + * Sets encryptedExpiryMonth + * + * @param string|null $encryptedExpiryMonth The encrypted card expiry month. + * + * @return self + */ + public function setEncryptedExpiryMonth($encryptedExpiryMonth) + { + if (is_null($encryptedExpiryMonth)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); + } + $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; + + return $this; + } + + /** + * Gets encryptedExpiryYear + * + * @return string|null + */ + public function getEncryptedExpiryYear() + { + return $this->container['encryptedExpiryYear']; + } + + /** + * Sets encryptedExpiryYear + * + * @param string|null $encryptedExpiryYear The encrypted card expiry year. + * + * @return self + */ + public function setEncryptedExpiryYear($encryptedExpiryYear) + { + if (is_null($encryptedExpiryYear)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); + } + $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; + + return $this; + } + + /** + * Gets encryptedSecurityCode + * + * @return string|null + */ + public function getEncryptedSecurityCode() + { + return $this->container['encryptedSecurityCode']; + } + + /** + * Sets encryptedSecurityCode + * + * @param string|null $encryptedSecurityCode The encrypted card verification code. + * + * @return self + */ + public function setEncryptedSecurityCode($encryptedSecurityCode) + { + if (is_null($encryptedSecurityCode)) { + throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); + } + $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; + + return $this; + } + + /** + * Gets expiryMonth + * + * @return string|null + */ + public function getExpiryMonth() + { + return $this->container['expiryMonth']; + } + + /** + * Sets expiryMonth + * + * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryMonth($expiryMonth) + { + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); + } + $this->container['expiryMonth'] = $expiryMonth; + + return $this; + } + + /** + * Gets expiryYear + * + * @return string|null + */ + public function getExpiryYear() + { + return $this->container['expiryYear']; + } + + /** + * Sets expiryYear + * + * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryYear($expiryYear) + { + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); + } + $this->container['expiryYear'] = $expiryYear; + + return $this; + } + + /** + * Gets holderName + * + * @return string|null + */ + public function getHolderName() + { + return $this->container['holderName']; + } + + /** + * Sets holderName + * + * @param string|null $holderName The name of the card holder. + * + * @return self + */ + public function setHolderName($holderName) + { + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); + } + $this->container['holderName'] = $holderName; + + return $this; + } + + /** + * Gets networkPaymentReference + * + * @return string|null + */ + public function getNetworkPaymentReference() + { + return $this->container['networkPaymentReference']; + } + + /** + * Sets networkPaymentReference + * + * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + * + * @return self + */ + public function setNetworkPaymentReference($networkPaymentReference) + { + if (is_null($networkPaymentReference)) { + throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); + } + $this->container['networkPaymentReference'] = $networkPaymentReference; + + return $this; + } + + /** + * Gets number + * + * @return string|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets shopperNotificationReference + * + * @return string|null + */ + public function getShopperNotificationReference() + { + return $this->container['shopperNotificationReference']; + } + + /** + * Sets shopperNotificationReference + * + * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. + * + * @return self + */ + public function setShopperNotificationReference($shopperNotificationReference) + { + if (is_null($shopperNotificationReference)) { + throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); + } + $this->container['shopperNotificationReference'] = $shopperNotificationReference; + + return $this; + } + + /** + * Gets threeDS2SdkVersion + * + * @return string|null + */ + public function getThreeDS2SdkVersion() + { + return $this->container['threeDS2SdkVersion']; + } + + /** + * Sets threeDS2SdkVersion + * + * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. + * + * @return self + */ + public function setThreeDS2SdkVersion($threeDS2SdkVersion) + { + if (is_null($threeDS2SdkVersion)) { + throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); + } + $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; + + return $this; + } + + /** + * Gets googlePayToken + * + * @return string + */ + public function getGooglePayToken() + { + return $this->container['googlePayToken']; + } + + /** + * Sets googlePayToken + * + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + * + * @return self + */ + public function setGooglePayToken($googlePayToken) + { + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + } + $this->container['googlePayToken'] = $googlePayToken; + + return $this; + } + + /** + * Gets issuer + * + * @return string + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * + * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + * + * @return self + */ + public function setIssuer($issuer) + { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } + $this->container['issuer'] = $issuer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 566e4c719..6ed687297 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -45,59 +45,35 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', - 'additionalAmount' => '\Adyen\Model\Checkout\Amount', 'additionalData' => 'array', 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', - 'captureDelayHours' => 'int', 'channel' => 'string', 'checkoutAttemptId' => 'string', - 'company' => '\Adyen\Model\Checkout\Company', 'conversionId' => 'string', 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', - 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', - 'deliveryDate' => '\DateTime', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'deviceFingerprint' => 'string', 'donationAccount' => 'string', 'donationOriginalPspReference' => 'string', 'donationToken' => 'string', - 'enableOneClick' => 'bool', - 'enablePayOut' => 'bool', - 'enableRecurring' => 'bool', - 'entityType' => 'string', - 'fraudOffset' => 'int', - 'fundOrigin' => '\Adyen\Model\Checkout\FundOrigin', - 'fundRecipient' => '\Adyen\Model\Checkout\FundRecipient', - 'industryUsage' => 'string', - 'installments' => '\Adyen\Model\Checkout\Installments', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', - 'localizedShopperStatement' => 'array', - 'mandate' => '\Adyen\Model\Checkout\Mandate', - 'mcc' => 'string', 'merchantAccount' => 'string', - 'merchantOrderReference' => 'string', 'merchantRiskIndicator' => '\Adyen\Model\Checkout\MerchantRiskIndicator', 'metadata' => 'array', 'mpiData' => '\Adyen\Model\Checkout\ThreeDSecureData', - 'order' => '\Adyen\Model\Checkout\EncryptedOrderData', - 'orderReference' => 'string', 'origin' => 'string', - 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutPaymentMethod', - 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', - 'recurringExpiry' => 'string', - 'recurringFrequency' => 'string', + 'paymentMethod' => '\Adyen\Model\Checkout\DonationPaymentMethod', 'recurringProcessingModel' => 'string', 'redirectFromIssuerMethod' => 'string', 'redirectToIssuerMethod' => 'string', 'reference' => 'string', 'returnUrl' => 'string', - 'riskData' => '\Adyen\Model\Checkout\RiskData', 'sessionValidity' => 'string', 'shopperEmail' => 'string', 'shopperIP' => 'string', @@ -105,15 +81,10 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'shopperLocale' => 'string', 'shopperName' => '\Adyen\Model\Checkout\Name', 'shopperReference' => 'string', - 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]', - 'store' => 'string', - 'storePaymentMethod' => 'bool', 'telephoneNumber' => 'string', - 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData2', - 'threeDSAuthenticationOnly' => 'bool', - 'trustedShopper' => 'bool' + 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestFields', + 'threeDSAuthenticationOnly' => 'bool' ]; /** @@ -125,59 +96,35 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'accountInfo' => null, - 'additionalAmount' => null, 'additionalData' => null, 'amount' => null, 'applicationInfo' => null, 'authenticationData' => null, 'billingAddress' => null, 'browserInfo' => null, - 'captureDelayHours' => 'int32', 'channel' => null, 'checkoutAttemptId' => null, - 'company' => null, 'conversionId' => null, 'countryCode' => null, 'dateOfBirth' => 'date-time', - 'dccQuote' => null, 'deliverAt' => 'date-time', 'deliveryAddress' => null, - 'deliveryDate' => 'date-time', 'deviceFingerprint' => null, 'donationAccount' => null, 'donationOriginalPspReference' => null, 'donationToken' => null, - 'enableOneClick' => null, - 'enablePayOut' => null, - 'enableRecurring' => null, - 'entityType' => null, - 'fraudOffset' => 'int32', - 'fundOrigin' => null, - 'fundRecipient' => null, - 'industryUsage' => null, - 'installments' => null, 'lineItems' => null, - 'localizedShopperStatement' => null, - 'mandate' => null, - 'mcc' => null, 'merchantAccount' => null, - 'merchantOrderReference' => null, 'merchantRiskIndicator' => null, 'metadata' => null, 'mpiData' => null, - 'order' => null, - 'orderReference' => null, 'origin' => null, 'paymentMethod' => null, - 'platformChargebackLogic' => null, - 'recurringExpiry' => null, - 'recurringFrequency' => null, 'recurringProcessingModel' => null, 'redirectFromIssuerMethod' => null, 'redirectToIssuerMethod' => null, 'reference' => null, 'returnUrl' => null, - 'riskData' => null, 'sessionValidity' => null, 'shopperEmail' => null, 'shopperIP' => null, @@ -185,15 +132,10 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'shopperLocale' => null, 'shopperName' => null, 'shopperReference' => null, - 'shopperStatement' => null, 'socialSecurityNumber' => null, - 'splits' => null, - 'store' => null, - 'storePaymentMethod' => null, 'telephoneNumber' => null, 'threeDS2RequestData' => null, - 'threeDSAuthenticationOnly' => null, - 'trustedShopper' => null + 'threeDSAuthenticationOnly' => null ]; /** @@ -203,59 +145,35 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPINullables = [ 'accountInfo' => false, - 'additionalAmount' => false, 'additionalData' => false, 'amount' => false, 'applicationInfo' => false, 'authenticationData' => false, 'billingAddress' => false, 'browserInfo' => false, - 'captureDelayHours' => true, 'channel' => false, 'checkoutAttemptId' => false, - 'company' => false, 'conversionId' => false, 'countryCode' => false, 'dateOfBirth' => false, - 'dccQuote' => false, 'deliverAt' => false, 'deliveryAddress' => false, - 'deliveryDate' => false, 'deviceFingerprint' => false, 'donationAccount' => false, 'donationOriginalPspReference' => false, 'donationToken' => false, - 'enableOneClick' => false, - 'enablePayOut' => false, - 'enableRecurring' => false, - 'entityType' => false, - 'fraudOffset' => true, - 'fundOrigin' => false, - 'fundRecipient' => false, - 'industryUsage' => false, - 'installments' => false, 'lineItems' => false, - 'localizedShopperStatement' => false, - 'mandate' => false, - 'mcc' => false, 'merchantAccount' => false, - 'merchantOrderReference' => false, 'merchantRiskIndicator' => false, 'metadata' => false, 'mpiData' => false, - 'order' => false, - 'orderReference' => false, 'origin' => false, 'paymentMethod' => false, - 'platformChargebackLogic' => false, - 'recurringExpiry' => false, - 'recurringFrequency' => false, 'recurringProcessingModel' => false, 'redirectFromIssuerMethod' => false, 'redirectToIssuerMethod' => false, 'reference' => false, 'returnUrl' => false, - 'riskData' => false, 'sessionValidity' => false, 'shopperEmail' => false, 'shopperIP' => false, @@ -263,15 +181,10 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'shopperLocale' => false, 'shopperName' => false, 'shopperReference' => false, - 'shopperStatement' => false, 'socialSecurityNumber' => false, - 'splits' => false, - 'store' => false, - 'storePaymentMethod' => false, 'telephoneNumber' => false, 'threeDS2RequestData' => false, - 'threeDSAuthenticationOnly' => false, - 'trustedShopper' => false + 'threeDSAuthenticationOnly' => false ]; /** @@ -361,59 +274,35 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountInfo' => 'accountInfo', - 'additionalAmount' => 'additionalAmount', 'additionalData' => 'additionalData', 'amount' => 'amount', 'applicationInfo' => 'applicationInfo', 'authenticationData' => 'authenticationData', 'billingAddress' => 'billingAddress', 'browserInfo' => 'browserInfo', - 'captureDelayHours' => 'captureDelayHours', 'channel' => 'channel', 'checkoutAttemptId' => 'checkoutAttemptId', - 'company' => 'company', 'conversionId' => 'conversionId', 'countryCode' => 'countryCode', 'dateOfBirth' => 'dateOfBirth', - 'dccQuote' => 'dccQuote', 'deliverAt' => 'deliverAt', 'deliveryAddress' => 'deliveryAddress', - 'deliveryDate' => 'deliveryDate', 'deviceFingerprint' => 'deviceFingerprint', 'donationAccount' => 'donationAccount', 'donationOriginalPspReference' => 'donationOriginalPspReference', 'donationToken' => 'donationToken', - 'enableOneClick' => 'enableOneClick', - 'enablePayOut' => 'enablePayOut', - 'enableRecurring' => 'enableRecurring', - 'entityType' => 'entityType', - 'fraudOffset' => 'fraudOffset', - 'fundOrigin' => 'fundOrigin', - 'fundRecipient' => 'fundRecipient', - 'industryUsage' => 'industryUsage', - 'installments' => 'installments', 'lineItems' => 'lineItems', - 'localizedShopperStatement' => 'localizedShopperStatement', - 'mandate' => 'mandate', - 'mcc' => 'mcc', 'merchantAccount' => 'merchantAccount', - 'merchantOrderReference' => 'merchantOrderReference', 'merchantRiskIndicator' => 'merchantRiskIndicator', 'metadata' => 'metadata', 'mpiData' => 'mpiData', - 'order' => 'order', - 'orderReference' => 'orderReference', 'origin' => 'origin', 'paymentMethod' => 'paymentMethod', - 'platformChargebackLogic' => 'platformChargebackLogic', - 'recurringExpiry' => 'recurringExpiry', - 'recurringFrequency' => 'recurringFrequency', 'recurringProcessingModel' => 'recurringProcessingModel', 'redirectFromIssuerMethod' => 'redirectFromIssuerMethod', 'redirectToIssuerMethod' => 'redirectToIssuerMethod', 'reference' => 'reference', 'returnUrl' => 'returnUrl', - 'riskData' => 'riskData', 'sessionValidity' => 'sessionValidity', 'shopperEmail' => 'shopperEmail', 'shopperIP' => 'shopperIP', @@ -421,15 +310,10 @@ public function isNullableSetToNull(string $property): bool 'shopperLocale' => 'shopperLocale', 'shopperName' => 'shopperName', 'shopperReference' => 'shopperReference', - 'shopperStatement' => 'shopperStatement', 'socialSecurityNumber' => 'socialSecurityNumber', - 'splits' => 'splits', - 'store' => 'store', - 'storePaymentMethod' => 'storePaymentMethod', 'telephoneNumber' => 'telephoneNumber', 'threeDS2RequestData' => 'threeDS2RequestData', - 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', - 'trustedShopper' => 'trustedShopper' + 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly' ]; /** @@ -439,59 +323,35 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountInfo' => 'setAccountInfo', - 'additionalAmount' => 'setAdditionalAmount', 'additionalData' => 'setAdditionalData', 'amount' => 'setAmount', 'applicationInfo' => 'setApplicationInfo', 'authenticationData' => 'setAuthenticationData', 'billingAddress' => 'setBillingAddress', 'browserInfo' => 'setBrowserInfo', - 'captureDelayHours' => 'setCaptureDelayHours', 'channel' => 'setChannel', 'checkoutAttemptId' => 'setCheckoutAttemptId', - 'company' => 'setCompany', 'conversionId' => 'setConversionId', 'countryCode' => 'setCountryCode', 'dateOfBirth' => 'setDateOfBirth', - 'dccQuote' => 'setDccQuote', 'deliverAt' => 'setDeliverAt', 'deliveryAddress' => 'setDeliveryAddress', - 'deliveryDate' => 'setDeliveryDate', 'deviceFingerprint' => 'setDeviceFingerprint', 'donationAccount' => 'setDonationAccount', 'donationOriginalPspReference' => 'setDonationOriginalPspReference', 'donationToken' => 'setDonationToken', - 'enableOneClick' => 'setEnableOneClick', - 'enablePayOut' => 'setEnablePayOut', - 'enableRecurring' => 'setEnableRecurring', - 'entityType' => 'setEntityType', - 'fraudOffset' => 'setFraudOffset', - 'fundOrigin' => 'setFundOrigin', - 'fundRecipient' => 'setFundRecipient', - 'industryUsage' => 'setIndustryUsage', - 'installments' => 'setInstallments', 'lineItems' => 'setLineItems', - 'localizedShopperStatement' => 'setLocalizedShopperStatement', - 'mandate' => 'setMandate', - 'mcc' => 'setMcc', 'merchantAccount' => 'setMerchantAccount', - 'merchantOrderReference' => 'setMerchantOrderReference', 'merchantRiskIndicator' => 'setMerchantRiskIndicator', 'metadata' => 'setMetadata', 'mpiData' => 'setMpiData', - 'order' => 'setOrder', - 'orderReference' => 'setOrderReference', 'origin' => 'setOrigin', 'paymentMethod' => 'setPaymentMethod', - 'platformChargebackLogic' => 'setPlatformChargebackLogic', - 'recurringExpiry' => 'setRecurringExpiry', - 'recurringFrequency' => 'setRecurringFrequency', 'recurringProcessingModel' => 'setRecurringProcessingModel', 'redirectFromIssuerMethod' => 'setRedirectFromIssuerMethod', 'redirectToIssuerMethod' => 'setRedirectToIssuerMethod', 'reference' => 'setReference', 'returnUrl' => 'setReturnUrl', - 'riskData' => 'setRiskData', 'sessionValidity' => 'setSessionValidity', 'shopperEmail' => 'setShopperEmail', 'shopperIP' => 'setShopperIP', @@ -499,15 +359,10 @@ public function isNullableSetToNull(string $property): bool 'shopperLocale' => 'setShopperLocale', 'shopperName' => 'setShopperName', 'shopperReference' => 'setShopperReference', - 'shopperStatement' => 'setShopperStatement', 'socialSecurityNumber' => 'setSocialSecurityNumber', - 'splits' => 'setSplits', - 'store' => 'setStore', - 'storePaymentMethod' => 'setStorePaymentMethod', 'telephoneNumber' => 'setTelephoneNumber', 'threeDS2RequestData' => 'setThreeDS2RequestData', - 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', - 'trustedShopper' => 'setTrustedShopper' + 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly' ]; /** @@ -517,59 +372,35 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountInfo' => 'getAccountInfo', - 'additionalAmount' => 'getAdditionalAmount', 'additionalData' => 'getAdditionalData', 'amount' => 'getAmount', 'applicationInfo' => 'getApplicationInfo', 'authenticationData' => 'getAuthenticationData', 'billingAddress' => 'getBillingAddress', 'browserInfo' => 'getBrowserInfo', - 'captureDelayHours' => 'getCaptureDelayHours', 'channel' => 'getChannel', 'checkoutAttemptId' => 'getCheckoutAttemptId', - 'company' => 'getCompany', 'conversionId' => 'getConversionId', 'countryCode' => 'getCountryCode', 'dateOfBirth' => 'getDateOfBirth', - 'dccQuote' => 'getDccQuote', 'deliverAt' => 'getDeliverAt', 'deliveryAddress' => 'getDeliveryAddress', - 'deliveryDate' => 'getDeliveryDate', 'deviceFingerprint' => 'getDeviceFingerprint', 'donationAccount' => 'getDonationAccount', 'donationOriginalPspReference' => 'getDonationOriginalPspReference', 'donationToken' => 'getDonationToken', - 'enableOneClick' => 'getEnableOneClick', - 'enablePayOut' => 'getEnablePayOut', - 'enableRecurring' => 'getEnableRecurring', - 'entityType' => 'getEntityType', - 'fraudOffset' => 'getFraudOffset', - 'fundOrigin' => 'getFundOrigin', - 'fundRecipient' => 'getFundRecipient', - 'industryUsage' => 'getIndustryUsage', - 'installments' => 'getInstallments', 'lineItems' => 'getLineItems', - 'localizedShopperStatement' => 'getLocalizedShopperStatement', - 'mandate' => 'getMandate', - 'mcc' => 'getMcc', 'merchantAccount' => 'getMerchantAccount', - 'merchantOrderReference' => 'getMerchantOrderReference', 'merchantRiskIndicator' => 'getMerchantRiskIndicator', 'metadata' => 'getMetadata', 'mpiData' => 'getMpiData', - 'order' => 'getOrder', - 'orderReference' => 'getOrderReference', 'origin' => 'getOrigin', 'paymentMethod' => 'getPaymentMethod', - 'platformChargebackLogic' => 'getPlatformChargebackLogic', - 'recurringExpiry' => 'getRecurringExpiry', - 'recurringFrequency' => 'getRecurringFrequency', 'recurringProcessingModel' => 'getRecurringProcessingModel', 'redirectFromIssuerMethod' => 'getRedirectFromIssuerMethod', 'redirectToIssuerMethod' => 'getRedirectToIssuerMethod', 'reference' => 'getReference', 'returnUrl' => 'getReturnUrl', - 'riskData' => 'getRiskData', 'sessionValidity' => 'getSessionValidity', 'shopperEmail' => 'getShopperEmail', 'shopperIP' => 'getShopperIP', @@ -577,15 +408,10 @@ public function isNullableSetToNull(string $property): bool 'shopperLocale' => 'getShopperLocale', 'shopperName' => 'getShopperName', 'shopperReference' => 'getShopperReference', - 'shopperStatement' => 'getShopperStatement', 'socialSecurityNumber' => 'getSocialSecurityNumber', - 'splits' => 'getSplits', - 'store' => 'getStore', - 'storePaymentMethod' => 'getStorePaymentMethod', 'telephoneNumber' => 'getTelephoneNumber', 'threeDS2RequestData' => 'getThreeDS2RequestData', - 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', - 'trustedShopper' => 'getTrustedShopper' + 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly' ]; /** @@ -632,11 +458,6 @@ public function getModelName() public const CHANNEL_I_OS = 'iOS'; public const CHANNEL_ANDROID = 'Android'; public const CHANNEL_WEB = 'Web'; - public const ENTITY_TYPE_NATURAL_PERSON = 'NaturalPerson'; - public const ENTITY_TYPE_COMPANY_NAME = 'CompanyName'; - public const INDUSTRY_USAGE_DELAYED_CHARGE = 'delayedCharge'; - public const INDUSTRY_USAGE_INSTALLMENT = 'installment'; - public const INDUSTRY_USAGE_NO_SHOW = 'noShow'; public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; public const RECURRING_PROCESSING_MODEL_UNSCHEDULED_CARD_ON_FILE = 'UnscheduledCardOnFile'; @@ -658,31 +479,6 @@ public function getChannelAllowableValues() self::CHANNEL_WEB, ]; } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getEntityTypeAllowableValues() - { - return [ - self::ENTITY_TYPE_NATURAL_PERSON, - self::ENTITY_TYPE_COMPANY_NAME, - ]; - } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getIndustryUsageAllowableValues() - { - return [ - self::INDUSTRY_USAGE_DELAYED_CHARGE, - self::INDUSTRY_USAGE_INSTALLMENT, - self::INDUSTRY_USAGE_NO_SHOW, - ]; - } /** * Gets allowable values of the enum * @@ -726,59 +522,35 @@ public function getShopperInteractionAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountInfo', $data ?? [], null); - $this->setIfExists('additionalAmount', $data ?? [], null); $this->setIfExists('additionalData', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('authenticationData', $data ?? [], null); $this->setIfExists('billingAddress', $data ?? [], null); $this->setIfExists('browserInfo', $data ?? [], null); - $this->setIfExists('captureDelayHours', $data ?? [], null); $this->setIfExists('channel', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('company', $data ?? [], null); $this->setIfExists('conversionId', $data ?? [], null); $this->setIfExists('countryCode', $data ?? [], null); $this->setIfExists('dateOfBirth', $data ?? [], null); - $this->setIfExists('dccQuote', $data ?? [], null); $this->setIfExists('deliverAt', $data ?? [], null); $this->setIfExists('deliveryAddress', $data ?? [], null); - $this->setIfExists('deliveryDate', $data ?? [], null); $this->setIfExists('deviceFingerprint', $data ?? [], null); $this->setIfExists('donationAccount', $data ?? [], null); $this->setIfExists('donationOriginalPspReference', $data ?? [], null); $this->setIfExists('donationToken', $data ?? [], null); - $this->setIfExists('enableOneClick', $data ?? [], null); - $this->setIfExists('enablePayOut', $data ?? [], null); - $this->setIfExists('enableRecurring', $data ?? [], null); - $this->setIfExists('entityType', $data ?? [], null); - $this->setIfExists('fraudOffset', $data ?? [], null); - $this->setIfExists('fundOrigin', $data ?? [], null); - $this->setIfExists('fundRecipient', $data ?? [], null); - $this->setIfExists('industryUsage', $data ?? [], null); - $this->setIfExists('installments', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); - $this->setIfExists('localizedShopperStatement', $data ?? [], null); - $this->setIfExists('mandate', $data ?? [], null); - $this->setIfExists('mcc', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); - $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('merchantRiskIndicator', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('mpiData', $data ?? [], null); - $this->setIfExists('order', $data ?? [], null); - $this->setIfExists('orderReference', $data ?? [], null); $this->setIfExists('origin', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); - $this->setIfExists('platformChargebackLogic', $data ?? [], null); - $this->setIfExists('recurringExpiry', $data ?? [], null); - $this->setIfExists('recurringFrequency', $data ?? [], null); $this->setIfExists('recurringProcessingModel', $data ?? [], null); $this->setIfExists('redirectFromIssuerMethod', $data ?? [], null); $this->setIfExists('redirectToIssuerMethod', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); - $this->setIfExists('riskData', $data ?? [], null); $this->setIfExists('sessionValidity', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('shopperIP', $data ?? [], null); @@ -786,15 +558,10 @@ public function __construct(array $data = null) $this->setIfExists('shopperLocale', $data ?? [], null); $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); - $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splits', $data ?? [], null); - $this->setIfExists('store', $data ?? [], null); - $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); - $this->setIfExists('trustedShopper', $data ?? [], null); } /** @@ -839,24 +606,6 @@ public function listInvalidProperties() if ($this->container['donationAccount'] === null) { $invalidProperties[] = "'donationAccount' can't be null"; } - $allowedValues = $this->getEntityTypeAllowableValues(); - if (!is_null($this->container['entityType']) && !in_array($this->container['entityType'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'entityType', must be one of '%s'", - $this->container['entityType'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getIndustryUsageAllowableValues(); - if (!is_null($this->container['industryUsage']) && !in_array($this->container['industryUsage'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'industryUsage', must be one of '%s'", - $this->container['industryUsage'], - implode("', '", $allowedValues) - ); - } - if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -929,33 +678,6 @@ public function setAccountInfo($accountInfo) return $this; } - /** - * Gets additionalAmount - * - * @return \Adyen\Model\Checkout\Amount|null - */ - public function getAdditionalAmount() - { - return $this->container['additionalAmount']; - } - - /** - * Sets additionalAmount - * - * @param \Adyen\Model\Checkout\Amount|null $additionalAmount additionalAmount - * - * @return self - */ - public function setAdditionalAmount($additionalAmount) - { - if (is_null($additionalAmount)) { - throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); - } - $this->container['additionalAmount'] = $additionalAmount; - - return $this; - } - /** * Gets additionalData * @@ -1067,7 +789,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1077,7 +799,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1118,31 +840,6 @@ public function setBrowserInfo($browserInfo) return $this; } - /** - * Gets captureDelayHours - * - * @return int|null - */ - public function getCaptureDelayHours() - { - return $this->container['captureDelayHours']; - } - - /** - * Sets captureDelayHours - * - * @param int|null $captureDelayHours The delay between the authorisation and scheduled auto-capture, specified in hours. - * - * @return self - */ - public function setCaptureDelayHours($captureDelayHours) - { - // Do nothing for nullable integers - $this->container['captureDelayHours'] = $captureDelayHours; - - return $this; - } - /** * Gets channel * @@ -1207,33 +904,6 @@ public function setCheckoutAttemptId($checkoutAttemptId) return $this; } - /** - * Gets company - * - * @return \Adyen\Model\Checkout\Company|null - */ - public function getCompany() - { - return $this->container['company']; - } - - /** - * Sets company - * - * @param \Adyen\Model\Checkout\Company|null $company company - * - * @return self - */ - public function setCompany($company) - { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } - $this->container['company'] = $company; - - return $this; - } - /** * Gets conversionId * @@ -1317,33 +987,6 @@ public function setDateOfBirth($dateOfBirth) return $this; } - /** - * Gets dccQuote - * - * @return \Adyen\Model\Checkout\ForexQuote|null - */ - public function getDccQuote() - { - return $this->container['dccQuote']; - } - - /** - * Sets dccQuote - * - * @param \Adyen\Model\Checkout\ForexQuote|null $dccQuote dccQuote - * - * @return self - */ - public function setDccQuote($dccQuote) - { - if (is_null($dccQuote)) { - throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); - } - $this->container['dccQuote'] = $dccQuote; - - return $this; - } - /** * Gets deliverAt * @@ -1374,7 +1017,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1384,7 +1027,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -1398,35 +1041,6 @@ public function setDeliveryAddress($deliveryAddress) return $this; } - /** - * Gets deliveryDate - * - * @return \DateTime|null - * @deprecated - */ - public function getDeliveryDate() - { - return $this->container['deliveryDate']; - } - - /** - * Sets deliveryDate - * - * @param \DateTime|null $deliveryDate The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - * - * @return self - * @deprecated - */ - public function setDeliveryDate($deliveryDate) - { - if (is_null($deliveryDate)) { - throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); - } - $this->container['deliveryDate'] = $deliveryDate; - - return $this; - } - /** * Gets deviceFingerprint * @@ -1536,834 +1150,330 @@ public function setDonationToken($donationToken) } /** - * Gets enableOneClick + * Gets lineItems * - * @return bool|null + * @return \Adyen\Model\Checkout\LineItem[]|null */ - public function getEnableOneClick() + public function getLineItems() { - return $this->container['enableOneClick']; + return $this->container['lineItems']; } /** - * Sets enableOneClick + * Sets lineItems * - * @param bool|null $enableOneClick When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. + * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. * * @return self */ - public function setEnableOneClick($enableOneClick) + public function setLineItems($lineItems) { - if (is_null($enableOneClick)) { - throw new \InvalidArgumentException('non-nullable enableOneClick cannot be null'); + if (is_null($lineItems)) { + throw new \InvalidArgumentException('non-nullable lineItems cannot be null'); } - $this->container['enableOneClick'] = $enableOneClick; + $this->container['lineItems'] = $lineItems; return $this; } /** - * Gets enablePayOut + * Gets merchantAccount * - * @return bool|null + * @return string */ - public function getEnablePayOut() + public function getMerchantAccount() { - return $this->container['enablePayOut']; + return $this->container['merchantAccount']; } /** - * Sets enablePayOut + * Sets merchantAccount * - * @param bool|null $enablePayOut When true and `shopperReference` is provided, the payment details will be tokenized for payouts. + * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. * * @return self */ - public function setEnablePayOut($enablePayOut) + public function setMerchantAccount($merchantAccount) { - if (is_null($enablePayOut)) { - throw new \InvalidArgumentException('non-nullable enablePayOut cannot be null'); + if (is_null($merchantAccount)) { + throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); } - $this->container['enablePayOut'] = $enablePayOut; + $this->container['merchantAccount'] = $merchantAccount; return $this; } /** - * Gets enableRecurring + * Gets merchantRiskIndicator * - * @return bool|null + * @return \Adyen\Model\Checkout\MerchantRiskIndicator|null */ - public function getEnableRecurring() + public function getMerchantRiskIndicator() { - return $this->container['enableRecurring']; + return $this->container['merchantRiskIndicator']; } /** - * Sets enableRecurring + * Sets merchantRiskIndicator * - * @param bool|null $enableRecurring When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. + * @param \Adyen\Model\Checkout\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator * * @return self */ - public function setEnableRecurring($enableRecurring) + public function setMerchantRiskIndicator($merchantRiskIndicator) { - if (is_null($enableRecurring)) { - throw new \InvalidArgumentException('non-nullable enableRecurring cannot be null'); + if (is_null($merchantRiskIndicator)) { + throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); } - $this->container['enableRecurring'] = $enableRecurring; + $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; return $this; } /** - * Gets entityType + * Gets metadata * - * @return string|null + * @return array|null */ - public function getEntityType() + public function getMetadata() { - return $this->container['entityType']; + return $this->container['metadata']; } /** - * Sets entityType + * Sets metadata * - * @param string|null $entityType The type of the entity the payment is processed for. + * @param array|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. * * @return self */ - public function setEntityType($entityType) + public function setMetadata($metadata) { - if (is_null($entityType)) { - throw new \InvalidArgumentException('non-nullable entityType cannot be null'); - } - $allowedValues = $this->getEntityTypeAllowableValues(); - if (!in_array($entityType, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'entityType', must be one of '%s'", - $entityType, - implode("', '", $allowedValues) - ) - ); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['entityType'] = $entityType; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets fraudOffset + * Gets mpiData * - * @return int|null + * @return \Adyen\Model\Checkout\ThreeDSecureData|null */ - public function getFraudOffset() + public function getMpiData() { - return $this->container['fraudOffset']; + return $this->container['mpiData']; } /** - * Sets fraudOffset + * Sets mpiData * - * @param int|null $fraudOffset An integer value that is added to the normal fraud score. The value can be either positive or negative. + * @param \Adyen\Model\Checkout\ThreeDSecureData|null $mpiData mpiData * * @return self */ - public function setFraudOffset($fraudOffset) + public function setMpiData($mpiData) { - // Do nothing for nullable integers - $this->container['fraudOffset'] = $fraudOffset; + if (is_null($mpiData)) { + throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); + } + $this->container['mpiData'] = $mpiData; return $this; } /** - * Gets fundOrigin + * Gets origin * - * @return \Adyen\Model\Checkout\FundOrigin|null + * @return string|null */ - public function getFundOrigin() + public function getOrigin() { - return $this->container['fundOrigin']; + return $this->container['origin']; } /** - * Sets fundOrigin + * Sets origin * - * @param \Adyen\Model\Checkout\FundOrigin|null $fundOrigin fundOrigin + * @param string|null $origin Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. * * @return self */ - public function setFundOrigin($fundOrigin) + public function setOrigin($origin) { - if (is_null($fundOrigin)) { - throw new \InvalidArgumentException('non-nullable fundOrigin cannot be null'); + if (is_null($origin)) { + throw new \InvalidArgumentException('non-nullable origin cannot be null'); } - $this->container['fundOrigin'] = $fundOrigin; + $this->container['origin'] = $origin; return $this; } /** - * Gets fundRecipient + * Gets paymentMethod * - * @return \Adyen\Model\Checkout\FundRecipient|null + * @return \Adyen\Model\Checkout\DonationPaymentMethod */ - public function getFundRecipient() + public function getPaymentMethod() { - return $this->container['fundRecipient']; + return $this->container['paymentMethod']; } /** - * Sets fundRecipient + * Sets paymentMethod * - * @param \Adyen\Model\Checkout\FundRecipient|null $fundRecipient fundRecipient + * @param \Adyen\Model\Checkout\DonationPaymentMethod $paymentMethod paymentMethod * * @return self */ - public function setFundRecipient($fundRecipient) + public function setPaymentMethod($paymentMethod) { - if (is_null($fundRecipient)) { - throw new \InvalidArgumentException('non-nullable fundRecipient cannot be null'); + if (is_null($paymentMethod)) { + throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); } - $this->container['fundRecipient'] = $fundRecipient; + $this->container['paymentMethod'] = $paymentMethod; return $this; } /** - * Gets industryUsage + * Gets recurringProcessingModel * * @return string|null */ - public function getIndustryUsage() + public function getRecurringProcessingModel() { - return $this->container['industryUsage']; + return $this->container['recurringProcessingModel']; } /** - * Sets industryUsage + * Sets recurringProcessingModel * - * @param string|null $industryUsage The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. * * @return self */ - public function setIndustryUsage($industryUsage) + public function setRecurringProcessingModel($recurringProcessingModel) { - if (is_null($industryUsage)) { - throw new \InvalidArgumentException('non-nullable industryUsage cannot be null'); + if (is_null($recurringProcessingModel)) { + throw new \InvalidArgumentException('non-nullable recurringProcessingModel cannot be null'); } - $allowedValues = $this->getIndustryUsageAllowableValues(); - if (!in_array($industryUsage, $allowedValues, true)) { + $allowedValues = $this->getRecurringProcessingModelAllowableValues(); + if (!in_array($recurringProcessingModel, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'industryUsage', must be one of '%s'", - $industryUsage, + "Invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", + $recurringProcessingModel, implode("', '", $allowedValues) ) ); } - $this->container['industryUsage'] = $industryUsage; + $this->container['recurringProcessingModel'] = $recurringProcessingModel; return $this; } /** - * Gets installments + * Gets redirectFromIssuerMethod * - * @return \Adyen\Model\Checkout\Installments|null + * @return string|null */ - public function getInstallments() + public function getRedirectFromIssuerMethod() { - return $this->container['installments']; + return $this->container['redirectFromIssuerMethod']; } /** - * Sets installments + * Sets redirectFromIssuerMethod * - * @param \Adyen\Model\Checkout\Installments|null $installments installments + * @param string|null $redirectFromIssuerMethod Specifies the redirect method (GET or POST) when redirecting back from the issuer. * * @return self */ - public function setInstallments($installments) + public function setRedirectFromIssuerMethod($redirectFromIssuerMethod) { - if (is_null($installments)) { - throw new \InvalidArgumentException('non-nullable installments cannot be null'); + if (is_null($redirectFromIssuerMethod)) { + throw new \InvalidArgumentException('non-nullable redirectFromIssuerMethod cannot be null'); } - $this->container['installments'] = $installments; + $this->container['redirectFromIssuerMethod'] = $redirectFromIssuerMethod; return $this; } /** - * Gets lineItems + * Gets redirectToIssuerMethod * - * @return \Adyen\Model\Checkout\LineItem[]|null + * @return string|null */ - public function getLineItems() + public function getRedirectToIssuerMethod() { - return $this->container['lineItems']; + return $this->container['redirectToIssuerMethod']; } /** - * Sets lineItems + * Sets redirectToIssuerMethod * - * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. + * @param string|null $redirectToIssuerMethod Specifies the redirect method (GET or POST) when redirecting to the issuer. * * @return self */ - public function setLineItems($lineItems) + public function setRedirectToIssuerMethod($redirectToIssuerMethod) { - if (is_null($lineItems)) { - throw new \InvalidArgumentException('non-nullable lineItems cannot be null'); + if (is_null($redirectToIssuerMethod)) { + throw new \InvalidArgumentException('non-nullable redirectToIssuerMethod cannot be null'); } - $this->container['lineItems'] = $lineItems; + $this->container['redirectToIssuerMethod'] = $redirectToIssuerMethod; return $this; } /** - * Gets localizedShopperStatement + * Gets reference * - * @return array|null + * @return string */ - public function getLocalizedShopperStatement() + public function getReference() { - return $this->container['localizedShopperStatement']; + return $this->container['reference']; } /** - * Sets localizedShopperStatement + * Sets reference * - * @param array|null $localizedShopperStatement The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. + * @param string $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. * * @return self */ - public function setLocalizedShopperStatement($localizedShopperStatement) + public function setReference($reference) { - if (is_null($localizedShopperStatement)) { - throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); } - $this->container['localizedShopperStatement'] = $localizedShopperStatement; + $this->container['reference'] = $reference; return $this; } /** - * Gets mandate + * Gets returnUrl * - * @return \Adyen\Model\Checkout\Mandate|null + * @return string */ - public function getMandate() + public function getReturnUrl() { - return $this->container['mandate']; + return $this->container['returnUrl']; } /** - * Sets mandate + * Sets returnUrl * - * @param \Adyen\Model\Checkout\Mandate|null $mandate mandate + * @param string $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` * * @return self */ - public function setMandate($mandate) - { - if (is_null($mandate)) { - throw new \InvalidArgumentException('non-nullable mandate cannot be null'); - } - $this->container['mandate'] = $mandate; - - return $this; - } - - /** - * Gets mcc - * - * @return string|null - */ - public function getMcc() - { - return $this->container['mcc']; - } - - /** - * Sets mcc - * - * @param string|null $mcc The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - * - * @return self - */ - public function setMcc($mcc) - { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } - $this->container['mcc'] = $mcc; - - return $this; - } - - /** - * Gets merchantAccount - * - * @return string - */ - public function getMerchantAccount() - { - return $this->container['merchantAccount']; - } - - /** - * Sets merchantAccount - * - * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. - * - * @return self - */ - public function setMerchantAccount($merchantAccount) - { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } - $this->container['merchantAccount'] = $merchantAccount; - - return $this; - } - - /** - * Gets merchantOrderReference - * - * @return string|null - */ - public function getMerchantOrderReference() - { - return $this->container['merchantOrderReference']; - } - - /** - * Sets merchantOrderReference - * - * @param string|null $merchantOrderReference This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - * - * @return self - */ - public function setMerchantOrderReference($merchantOrderReference) - { - if (is_null($merchantOrderReference)) { - throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); - } - $this->container['merchantOrderReference'] = $merchantOrderReference; - - return $this; - } - - /** - * Gets merchantRiskIndicator - * - * @return \Adyen\Model\Checkout\MerchantRiskIndicator|null - */ - public function getMerchantRiskIndicator() - { - return $this->container['merchantRiskIndicator']; - } - - /** - * Sets merchantRiskIndicator - * - * @param \Adyen\Model\Checkout\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator - * - * @return self - */ - public function setMerchantRiskIndicator($merchantRiskIndicator) - { - if (is_null($merchantRiskIndicator)) { - throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); - } - $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; - - return $this; - } - - /** - * Gets metadata - * - * @return array|null - */ - public function getMetadata() - { - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param array|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - * - * @return self - */ - public function setMetadata($metadata) - { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } - $this->container['metadata'] = $metadata; - - return $this; - } - - /** - * Gets mpiData - * - * @return \Adyen\Model\Checkout\ThreeDSecureData|null - */ - public function getMpiData() - { - return $this->container['mpiData']; - } - - /** - * Sets mpiData - * - * @param \Adyen\Model\Checkout\ThreeDSecureData|null $mpiData mpiData - * - * @return self - */ - public function setMpiData($mpiData) - { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } - $this->container['mpiData'] = $mpiData; - - return $this; - } - - /** - * Gets order - * - * @return \Adyen\Model\Checkout\EncryptedOrderData|null - */ - public function getOrder() - { - return $this->container['order']; - } - - /** - * Sets order - * - * @param \Adyen\Model\Checkout\EncryptedOrderData|null $order order - * - * @return self - */ - public function setOrder($order) - { - if (is_null($order)) { - throw new \InvalidArgumentException('non-nullable order cannot be null'); - } - $this->container['order'] = $order; - - return $this; - } - - /** - * Gets orderReference - * - * @return string|null - */ - public function getOrderReference() - { - return $this->container['orderReference']; - } - - /** - * Sets orderReference - * - * @param string|null $orderReference When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - * - * @return self - */ - public function setOrderReference($orderReference) - { - if (is_null($orderReference)) { - throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); - } - $this->container['orderReference'] = $orderReference; - - return $this; - } - - /** - * Gets origin - * - * @return string|null - */ - public function getOrigin() - { - return $this->container['origin']; - } - - /** - * Sets origin - * - * @param string|null $origin Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. - * - * @return self - */ - public function setOrigin($origin) - { - if (is_null($origin)) { - throw new \InvalidArgumentException('non-nullable origin cannot be null'); - } - $this->container['origin'] = $origin; - - return $this; - } - - /** - * Gets paymentMethod - * - * @return \Adyen\Model\Checkout\CheckoutPaymentMethod - */ - public function getPaymentMethod() - { - return $this->container['paymentMethod']; - } - - /** - * Sets paymentMethod - * - * @param \Adyen\Model\Checkout\CheckoutPaymentMethod $paymentMethod paymentMethod - * - * @return self - */ - public function setPaymentMethod($paymentMethod) - { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } - $this->container['paymentMethod'] = $paymentMethod; - - return $this; - } - - /** - * Gets platformChargebackLogic - * - * @return \Adyen\Model\Checkout\PlatformChargebackLogic|null - */ - public function getPlatformChargebackLogic() - { - return $this->container['platformChargebackLogic']; - } - - /** - * Sets platformChargebackLogic - * - * @param \Adyen\Model\Checkout\PlatformChargebackLogic|null $platformChargebackLogic platformChargebackLogic - * - * @return self - */ - public function setPlatformChargebackLogic($platformChargebackLogic) - { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } - $this->container['platformChargebackLogic'] = $platformChargebackLogic; - - return $this; - } - - /** - * Gets recurringExpiry - * - * @return string|null - */ - public function getRecurringExpiry() - { - return $this->container['recurringExpiry']; - } - - /** - * Sets recurringExpiry - * - * @param string|null $recurringExpiry Date after which no further authorisations shall be performed. Only for 3D Secure 2. - * - * @return self - */ - public function setRecurringExpiry($recurringExpiry) - { - if (is_null($recurringExpiry)) { - throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); - } - $this->container['recurringExpiry'] = $recurringExpiry; - - return $this; - } - - /** - * Gets recurringFrequency - * - * @return string|null - */ - public function getRecurringFrequency() - { - return $this->container['recurringFrequency']; - } - - /** - * Sets recurringFrequency - * - * @param string|null $recurringFrequency Minimum number of days between authorisations. Only for 3D Secure 2. - * - * @return self - */ - public function setRecurringFrequency($recurringFrequency) - { - if (is_null($recurringFrequency)) { - throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); - } - $this->container['recurringFrequency'] = $recurringFrequency; - - return $this; - } - - /** - * Gets recurringProcessingModel - * - * @return string|null - */ - public function getRecurringProcessingModel() - { - return $this->container['recurringProcessingModel']; - } - - /** - * Sets recurringProcessingModel - * - * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - * - * @return self - */ - public function setRecurringProcessingModel($recurringProcessingModel) - { - if (is_null($recurringProcessingModel)) { - throw new \InvalidArgumentException('non-nullable recurringProcessingModel cannot be null'); - } - $allowedValues = $this->getRecurringProcessingModelAllowableValues(); - if (!in_array($recurringProcessingModel, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'recurringProcessingModel', must be one of '%s'", - $recurringProcessingModel, - implode("', '", $allowedValues) - ) - ); - } - $this->container['recurringProcessingModel'] = $recurringProcessingModel; - - return $this; - } - - /** - * Gets redirectFromIssuerMethod - * - * @return string|null - */ - public function getRedirectFromIssuerMethod() - { - return $this->container['redirectFromIssuerMethod']; - } - - /** - * Sets redirectFromIssuerMethod - * - * @param string|null $redirectFromIssuerMethod Specifies the redirect method (GET or POST) when redirecting back from the issuer. - * - * @return self - */ - public function setRedirectFromIssuerMethod($redirectFromIssuerMethod) - { - if (is_null($redirectFromIssuerMethod)) { - throw new \InvalidArgumentException('non-nullable redirectFromIssuerMethod cannot be null'); - } - $this->container['redirectFromIssuerMethod'] = $redirectFromIssuerMethod; - - return $this; - } - - /** - * Gets redirectToIssuerMethod - * - * @return string|null - */ - public function getRedirectToIssuerMethod() - { - return $this->container['redirectToIssuerMethod']; - } - - /** - * Sets redirectToIssuerMethod - * - * @param string|null $redirectToIssuerMethod Specifies the redirect method (GET or POST) when redirecting to the issuer. - * - * @return self - */ - public function setRedirectToIssuerMethod($redirectToIssuerMethod) - { - if (is_null($redirectToIssuerMethod)) { - throw new \InvalidArgumentException('non-nullable redirectToIssuerMethod cannot be null'); - } - $this->container['redirectToIssuerMethod'] = $redirectToIssuerMethod; - - return $this; - } - - /** - * Gets reference - * - * @return string - */ - public function getReference() - { - return $this->container['reference']; - } - - /** - * Sets reference - * - * @param string $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - * - * @return self - */ - public function setReference($reference) - { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } - $this->container['reference'] = $reference; - - return $this; - } - - /** - * Gets returnUrl - * - * @return string - */ - public function getReturnUrl() - { - return $this->container['returnUrl']; - } - - /** - * Sets returnUrl - * - * @param string $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` - * - * @return self - */ - public function setReturnUrl($returnUrl) + public function setReturnUrl($returnUrl) { if (is_null($returnUrl)) { throw new \InvalidArgumentException('non-nullable returnUrl cannot be null'); @@ -2373,33 +1483,6 @@ public function setReturnUrl($returnUrl) return $this; } - /** - * Gets riskData - * - * @return \Adyen\Model\Checkout\RiskData|null - */ - public function getRiskData() - { - return $this->container['riskData']; - } - - /** - * Sets riskData - * - * @param \Adyen\Model\Checkout\RiskData|null $riskData riskData - * - * @return self - */ - public function setRiskData($riskData) - { - if (is_null($riskData)) { - throw new \InvalidArgumentException('non-nullable riskData cannot be null'); - } - $this->container['riskData'] = $riskData; - - return $this; - } - /** * Gets sessionValidity * @@ -2599,33 +1682,6 @@ public function setShopperReference($shopperReference) return $this; } - /** - * Gets shopperStatement - * - * @return string|null - */ - public function getShopperStatement() - { - return $this->container['shopperStatement']; - } - - /** - * Sets shopperStatement - * - * @param string|null $shopperStatement The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - * - * @return self - */ - public function setShopperStatement($shopperStatement) - { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } - $this->container['shopperStatement'] = $shopperStatement; - - return $this; - } - /** * Gets socialSecurityNumber * @@ -2653,87 +1709,6 @@ public function setSocialSecurityNumber($socialSecurityNumber) return $this; } - /** - * Gets splits - * - * @return \Adyen\Model\Checkout\Split[]|null - */ - public function getSplits() - { - return $this->container['splits']; - } - - /** - * Sets splits - * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - * - * @return self - */ - public function setSplits($splits) - { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } - $this->container['splits'] = $splits; - - return $this; - } - - /** - * Gets store - * - * @return string|null - */ - public function getStore() - { - return $this->container['store']; - } - - /** - * Sets store - * - * @param string|null $store The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). - * - * @return self - */ - public function setStore($store) - { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } - $this->container['store'] = $store; - - return $this; - } - - /** - * Gets storePaymentMethod - * - * @return bool|null - */ - public function getStorePaymentMethod() - { - return $this->container['storePaymentMethod']; - } - - /** - * Sets storePaymentMethod - * - * @param bool|null $storePaymentMethod When true and `shopperReference` is provided, the payment details will be stored. - * - * @return self - */ - public function setStorePaymentMethod($storePaymentMethod) - { - if (is_null($storePaymentMethod)) { - throw new \InvalidArgumentException('non-nullable storePaymentMethod cannot be null'); - } - $this->container['storePaymentMethod'] = $storePaymentMethod; - - return $this; - } - /** * Gets telephoneNumber * @@ -2764,7 +1739,7 @@ public function setTelephoneNumber($telephoneNumber) /** * Gets threeDS2RequestData * - * @return \Adyen\Model\Checkout\ThreeDS2RequestData2|null + * @return \Adyen\Model\Checkout\ThreeDS2RequestFields|null */ public function getThreeDS2RequestData() { @@ -2774,7 +1749,7 @@ public function getThreeDS2RequestData() /** * Sets threeDS2RequestData * - * @param \Adyen\Model\Checkout\ThreeDS2RequestData2|null $threeDS2RequestData threeDS2RequestData + * @param \Adyen\Model\Checkout\ThreeDS2RequestFields|null $threeDS2RequestData threeDS2RequestData * * @return self */ @@ -2816,33 +1791,6 @@ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) return $this; } - - /** - * Gets trustedShopper - * - * @return bool|null - */ - public function getTrustedShopper() - { - return $this->container['trustedShopper']; - } - - /** - * Sets trustedShopper - * - * @param bool|null $trustedShopper Set to true if the payment should be routed to a trusted MID. - * - * @return self - */ - public function setTrustedShopper($trustedShopper) - { - if (is_null($trustedShopper)) { - throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); - } - $this->container['trustedShopper'] = $trustedShopper; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/DonationPaymentResponse.php b/src/Adyen/Model/Checkout/DonationPaymentResponse.php index 0db2c9b8b..0ed91010c 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentResponse.php +++ b/src/Adyen/Model/Checkout/DonationPaymentResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/DotpayDetails.php b/src/Adyen/Model/Checkout/DotpayDetails.php index e6f85363d..7fc3c7bae 100644 --- a/src/Adyen/Model/Checkout/DotpayDetails.php +++ b/src/Adyen/Model/Checkout/DotpayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/DragonpayDetails.php b/src/Adyen/Model/Checkout/DragonpayDetails.php index 715adb313..f795c17db 100644 --- a/src/Adyen/Model/Checkout/DragonpayDetails.php +++ b/src/Adyen/Model/Checkout/DragonpayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php index 286b82ca1..3afc1c385 100644 --- a/src/Adyen/Model/Checkout/EcontextVoucherDetails.php +++ b/src/Adyen/Model/Checkout/EcontextVoucherDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/EncryptedOrderData.php b/src/Adyen/Model/Checkout/EncryptedOrderData.php index 42d09195d..a0d2dfbfb 100644 --- a/src/Adyen/Model/Checkout/EncryptedOrderData.php +++ b/src/Adyen/Model/Checkout/EncryptedOrderData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ExternalPlatform.php b/src/Adyen/Model/Checkout/ExternalPlatform.php index 84c3803b6..283276919 100644 --- a/src/Adyen/Model/Checkout/ExternalPlatform.php +++ b/src/Adyen/Model/Checkout/ExternalPlatform.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ForexQuote.php b/src/Adyen/Model/Checkout/ForexQuote.php index 2ee604aed..87577ad45 100644 --- a/src/Adyen/Model/Checkout/ForexQuote.php +++ b/src/Adyen/Model/Checkout/ForexQuote.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/FraudCheckResult.php b/src/Adyen/Model/Checkout/FraudCheckResult.php index b3d10a8dd..265c57b35 100644 --- a/src/Adyen/Model/Checkout/FraudCheckResult.php +++ b/src/Adyen/Model/Checkout/FraudCheckResult.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/FraudResult.php b/src/Adyen/Model/Checkout/FraudResult.php index b6e604a5f..b23ed4dfd 100644 --- a/src/Adyen/Model/Checkout/FraudResult.php +++ b/src/Adyen/Model/Checkout/FraudResult.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/FundOrigin.php b/src/Adyen/Model/Checkout/FundOrigin.php index 8a7a7f15d..d82127fb5 100644 --- a/src/Adyen/Model/Checkout/FundOrigin.php +++ b/src/Adyen/Model/Checkout/FundOrigin.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/FundRecipient.php b/src/Adyen/Model/Checkout/FundRecipient.php index 59a52a664..ab2664de4 100644 --- a/src/Adyen/Model/Checkout/FundRecipient.php +++ b/src/Adyen/Model/Checkout/FundRecipient.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php index f923357cd..c819d7d9f 100644 --- a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/GiropayDetails.php b/src/Adyen/Model/Checkout/GiropayDetails.php index a94a6134b..25cef0437 100644 --- a/src/Adyen/Model/Checkout/GiropayDetails.php +++ b/src/Adyen/Model/Checkout/GiropayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index 0ad96cdbe..e188ebac4 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index 12bc6f348..6926cf79c 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/InputDetail.php b/src/Adyen/Model/Checkout/InputDetail.php index e8d63c09e..fa77258d0 100644 --- a/src/Adyen/Model/Checkout/InputDetail.php +++ b/src/Adyen/Model/Checkout/InputDetail.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/InstallmentOption.php b/src/Adyen/Model/Checkout/InstallmentOption.php index 27f7bbaf7..ea065932b 100644 --- a/src/Adyen/Model/Checkout/InstallmentOption.php +++ b/src/Adyen/Model/Checkout/InstallmentOption.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Installments.php b/src/Adyen/Model/Checkout/Installments.php index 90450b7b8..6136c947b 100644 --- a/src/Adyen/Model/Checkout/Installments.php +++ b/src/Adyen/Model/Checkout/Installments.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/InstallmentsNumber.php b/src/Adyen/Model/Checkout/InstallmentsNumber.php index e8b12a77b..38245fb37 100644 --- a/src/Adyen/Model/Checkout/InstallmentsNumber.php +++ b/src/Adyen/Model/Checkout/InstallmentsNumber.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Item.php b/src/Adyen/Model/Checkout/Item.php index 602566ea0..2b92a46b4 100644 --- a/src/Adyen/Model/Checkout/Item.php +++ b/src/Adyen/Model/Checkout/Item.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 3013874ed..7fe4e2d8a 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/LineItem.php b/src/Adyen/Model/Checkout/LineItem.php index cfc4c450d..ea9bce2f8 100644 --- a/src/Adyen/Model/Checkout/LineItem.php +++ b/src/Adyen/Model/Checkout/LineItem.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php b/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php index 496dff243..ada358aae 100644 --- a/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php +++ b/src/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Mandate.php b/src/Adyen/Model/Checkout/Mandate.php index e377c35ca..9e19599be 100644 --- a/src/Adyen/Model/Checkout/Mandate.php +++ b/src/Adyen/Model/Checkout/Mandate.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index 961d65020..efbf4f14f 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index 20c02e0e4..3ee8c045d 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/MerchantDevice.php b/src/Adyen/Model/Checkout/MerchantDevice.php index ab2a8b541..42793e929 100644 --- a/src/Adyen/Model/Checkout/MerchantDevice.php +++ b/src/Adyen/Model/Checkout/MerchantDevice.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php index bbb763946..793b15ce4 100644 --- a/src/Adyen/Model/Checkout/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Checkout/MerchantRiskIndicator.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/MobilePayDetails.php b/src/Adyen/Model/Checkout/MobilePayDetails.php index 889af7f8e..a00b9d54b 100644 --- a/src/Adyen/Model/Checkout/MobilePayDetails.php +++ b/src/Adyen/Model/Checkout/MobilePayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ModelInterface.php b/src/Adyen/Model/Checkout/ModelInterface.php index 470e1ea19..661c821be 100644 --- a/src/Adyen/Model/Checkout/ModelInterface.php +++ b/src/Adyen/Model/Checkout/ModelInterface.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/MolPayDetails.php b/src/Adyen/Model/Checkout/MolPayDetails.php index fe3c83165..bb50be1c4 100644 --- a/src/Adyen/Model/Checkout/MolPayDetails.php +++ b/src/Adyen/Model/Checkout/MolPayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Name.php b/src/Adyen/Model/Checkout/Name.php index a55db8cc0..b4bcdd2bd 100644 --- a/src/Adyen/Model/Checkout/Name.php +++ b/src/Adyen/Model/Checkout/Name.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index e15e6ae37..29dd654c7 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index 44ceaa2b1..efbb7c144 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index 80fc9504c..d15a46ebc 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index 8b94f1640..64c309842 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index 8853aefc4..1e3f04c4b 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php b/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php index 315daaadf..62a133fa5 100644 --- a/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php +++ b/src/Adyen/Model/Checkout/PaymentAmountUpdateRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -45,6 +45,7 @@ class PaymentAmountUpdateRequest implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'industryUsage' => 'string', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', @@ -61,6 +62,7 @@ class PaymentAmountUpdateRequest implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPIFormats = [ 'amount' => null, + 'applicationInfo' => null, 'industryUsage' => null, 'lineItems' => null, 'merchantAccount' => null, @@ -75,6 +77,7 @@ class PaymentAmountUpdateRequest implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPINullables = [ 'amount' => false, + 'applicationInfo' => false, 'industryUsage' => false, 'lineItems' => false, 'merchantAccount' => false, @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'amount' => 'amount', + 'applicationInfo' => 'applicationInfo', 'industryUsage' => 'industryUsage', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', @@ -183,6 +187,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'amount' => 'setAmount', + 'applicationInfo' => 'setApplicationInfo', 'industryUsage' => 'setIndustryUsage', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', @@ -197,6 +202,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'amount' => 'getAmount', + 'applicationInfo' => 'getApplicationInfo', 'industryUsage' => 'getIndustryUsage', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', @@ -278,6 +284,7 @@ public function getIndustryUsageAllowableValues() public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); @@ -369,6 +376,33 @@ public function setAmount($amount) return $this; } + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Checkout\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + /** * Gets industryUsage * diff --git a/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php b/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php index 60ff51e99..dc9051a3e 100644 --- a/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php +++ b/src/Adyen/Model/Checkout/PaymentAmountUpdateResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -46,6 +46,7 @@ class PaymentAmountUpdateResponse implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', 'industryUsage' => 'string', + 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'paymentPspReference' => 'string', 'pspReference' => 'string', @@ -64,6 +65,7 @@ class PaymentAmountUpdateResponse implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'amount' => null, 'industryUsage' => null, + 'lineItems' => null, 'merchantAccount' => null, 'paymentPspReference' => null, 'pspReference' => null, @@ -80,6 +82,7 @@ class PaymentAmountUpdateResponse implements ModelInterface, ArrayAccess, \JsonS protected static $openAPINullables = [ 'amount' => false, 'industryUsage' => false, + 'lineItems' => false, 'merchantAccount' => false, 'paymentPspReference' => false, 'pspReference' => false, @@ -176,6 +179,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'amount' => 'amount', 'industryUsage' => 'industryUsage', + 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'paymentPspReference' => 'paymentPspReference', 'pspReference' => 'pspReference', @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'amount' => 'setAmount', 'industryUsage' => 'setIndustryUsage', + 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'paymentPspReference' => 'setPaymentPspReference', 'pspReference' => 'setPspReference', @@ -208,6 +213,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'amount' => 'getAmount', 'industryUsage' => 'getIndustryUsage', + 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'paymentPspReference' => 'getPaymentPspReference', 'pspReference' => 'getPspReference', @@ -303,6 +309,7 @@ public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); + $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('paymentPspReference', $data ?? [], null); $this->setIfExists('pspReference', $data ?? [], null); @@ -453,6 +460,33 @@ public function setIndustryUsage($industryUsage) return $this; } + /** + * Gets lineItems + * + * @return \Adyen\Model\Checkout\LineItem[]|null + */ + public function getLineItems() + { + return $this->container['lineItems']; + } + + /** + * Sets lineItems + * + * @param \Adyen\Model\Checkout\LineItem[]|null $lineItems Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. + * + * @return self + */ + public function setLineItems($lineItems) + { + if (is_null($lineItems)) { + throw new \InvalidArgumentException('non-nullable lineItems cannot be null'); + } + $this->container['lineItems'] = $lineItems; + + return $this; + } + /** * Gets merchantAccount * diff --git a/src/Adyen/Model/Checkout/PaymentCancelRequest.php b/src/Adyen/Model/Checkout/PaymentCancelRequest.php index ccda5f499..51bdd5da6 100644 --- a/src/Adyen/Model/Checkout/PaymentCancelRequest.php +++ b/src/Adyen/Model/Checkout/PaymentCancelRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -44,6 +44,7 @@ class PaymentCancelRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'merchantAccount' => 'string', 'reference' => 'string' ]; @@ -56,6 +57,7 @@ class PaymentCancelRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ + 'applicationInfo' => null, 'merchantAccount' => null, 'reference' => null ]; @@ -66,6 +68,7 @@ class PaymentCancelRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var boolean[] */ protected static $openAPINullables = [ + 'applicationInfo' => false, 'merchantAccount' => false, 'reference' => false ]; @@ -156,6 +159,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'applicationInfo' => 'applicationInfo', 'merchantAccount' => 'merchantAccount', 'reference' => 'reference' ]; @@ -166,6 +170,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'applicationInfo' => 'setApplicationInfo', 'merchantAccount' => 'setMerchantAccount', 'reference' => 'setReference' ]; @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'applicationInfo' => 'getApplicationInfo', 'merchantAccount' => 'getMerchantAccount', 'reference' => 'getReference' ]; @@ -237,6 +243,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); } @@ -286,6 +293,33 @@ public function valid() } + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Checkout\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + /** * Gets merchantAccount * diff --git a/src/Adyen/Model/Checkout/PaymentCancelResponse.php b/src/Adyen/Model/Checkout/PaymentCancelResponse.php index e57b0b49c..a38995416 100644 --- a/src/Adyen/Model/Checkout/PaymentCancelResponse.php +++ b/src/Adyen/Model/Checkout/PaymentCancelResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentCaptureRequest.php b/src/Adyen/Model/Checkout/PaymentCaptureRequest.php index ada5f794f..73f605141 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureRequest.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -45,6 +45,7 @@ class PaymentCaptureRequest implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', @@ -62,6 +63,7 @@ class PaymentCaptureRequest implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPIFormats = [ 'amount' => null, + 'applicationInfo' => null, 'lineItems' => null, 'merchantAccount' => null, 'platformChargebackLogic' => null, @@ -77,6 +79,7 @@ class PaymentCaptureRequest implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPINullables = [ 'amount' => false, + 'applicationInfo' => false, 'lineItems' => false, 'merchantAccount' => false, 'platformChargebackLogic' => false, @@ -172,6 +175,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'amount' => 'amount', + 'applicationInfo' => 'applicationInfo', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'platformChargebackLogic' => 'platformChargebackLogic', @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'amount' => 'setAmount', + 'applicationInfo' => 'setApplicationInfo', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'platformChargebackLogic' => 'setPlatformChargebackLogic', @@ -202,6 +207,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'amount' => 'getAmount', + 'applicationInfo' => 'getApplicationInfo', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'platformChargebackLogic' => 'getPlatformChargebackLogic', @@ -268,6 +274,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); @@ -351,6 +358,33 @@ public function setAmount($amount) return $this; } + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Checkout\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + /** * Gets lineItems * diff --git a/src/Adyen/Model/Checkout/PaymentCaptureResponse.php b/src/Adyen/Model/Checkout/PaymentCaptureResponse.php index 168d6b021..ce142575e 100644 --- a/src/Adyen/Model/Checkout/PaymentCaptureResponse.php +++ b/src/Adyen/Model/Checkout/PaymentCaptureResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php index 756ca783f..619d151ac 100644 --- a/src/Adyen/Model/Checkout/PaymentCompletionDetails.php +++ b/src/Adyen/Model/Checkout/PaymentCompletionDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index a71b5f3ca..1ca42e366 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -260,6 +260,7 @@ public function getModelName() public const TYPE_WALLEY = 'walley'; public const TYPE_WALLEY_B2B = 'walley_b2b'; public const TYPE_ALMA = 'alma'; + public const TYPE_PAYPO = 'paypo'; public const TYPE_MOLPAY_FPX = 'molpay_fpx'; public const TYPE_KONBINI = 'konbini'; public const TYPE_DIRECT_EBANKING = 'directEbanking'; @@ -356,6 +357,7 @@ public function getTypeAllowableValues() self::TYPE_WALLEY, self::TYPE_WALLEY_B2B, self::TYPE_ALMA, + self::TYPE_PAYPO, self::TYPE_MOLPAY_FPX, self::TYPE_KONBINI, self::TYPE_DIRECT_EBANKING, diff --git a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php index d5b4a4f8d..c4482c532 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php index 2ff71b86e..da3648270 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index 6c326fe99..444921400 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -55,7 +55,7 @@ class PaymentLinkRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'deliverAt' => '\DateTime', 'deliveryAddress' => '\Adyen\Model\Checkout\Address', 'description' => 'string', - 'expiresAt' => 'string', + 'expiresAt' => '\DateTime', 'installmentOptions' => 'array', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'manualCapture' => 'bool', @@ -103,7 +103,7 @@ class PaymentLinkRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'deliverAt' => 'date-time', 'deliveryAddress' => null, 'description' => null, - 'expiresAt' => null, + 'expiresAt' => 'date-time', 'installmentOptions' => null, 'lineItems' => null, 'manualCapture' => null, @@ -912,7 +912,7 @@ public function setDescription($description) /** * Gets expiresAt * - * @return string|null + * @return \DateTime|null */ public function getExpiresAt() { @@ -922,7 +922,7 @@ public function getExpiresAt() /** * Sets expiresAt * - * @param string|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone designator **Z**: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30Z**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. + * @param \DateTime|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index d401c0560..d8ab13e20 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -55,7 +55,7 @@ class PaymentLinkResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'deliverAt' => '\DateTime', 'deliveryAddress' => '\Adyen\Model\Checkout\Address', 'description' => 'string', - 'expiresAt' => 'string', + 'expiresAt' => '\DateTime', 'id' => 'string', 'installmentOptions' => 'array', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', @@ -107,7 +107,7 @@ class PaymentLinkResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'deliverAt' => 'date-time', 'deliveryAddress' => null, 'description' => null, - 'expiresAt' => null, + 'expiresAt' => 'date-time', 'id' => null, 'installmentOptions' => null, 'lineItems' => null, @@ -978,7 +978,7 @@ public function setDescription($description) /** * Gets expiresAt * - * @return string|null + * @return \DateTime|null */ public function getExpiresAt() { @@ -988,7 +988,7 @@ public function getExpiresAt() /** * Sets expiresAt * - * @param string|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone designator **Z**: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30Z**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. + * @param \DateTime|null $expiresAt The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentMethod.php b/src/Adyen/Model/Checkout/PaymentMethod.php index b02b53d01..1c5ce54b1 100644 --- a/src/Adyen/Model/Checkout/PaymentMethod.php +++ b/src/Adyen/Model/Checkout/PaymentMethod.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentMethodGroup.php b/src/Adyen/Model/Checkout/PaymentMethodGroup.php index f63a5d1c8..ffa67663b 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodGroup.php +++ b/src/Adyen/Model/Checkout/PaymentMethodGroup.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php index 2f50f4da2..93cb2de32 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php +++ b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index eae4ce236..941f23372 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentMethodsResponse.php b/src/Adyen/Model/Checkout/PaymentMethodsResponse.php index 9f60cb534..7b42cbf8c 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentRefundRequest.php b/src/Adyen/Model/Checkout/PaymentRefundRequest.php index 656df4ae6..ea1c28f65 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRefundRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -45,6 +45,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', @@ -61,6 +62,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPIFormats = [ 'amount' => null, + 'applicationInfo' => null, 'lineItems' => null, 'merchantAccount' => null, 'merchantRefundReason' => null, @@ -75,6 +77,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPINullables = [ 'amount' => false, + 'applicationInfo' => false, 'lineItems' => false, 'merchantAccount' => false, 'merchantRefundReason' => false, @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'amount' => 'amount', + 'applicationInfo' => 'applicationInfo', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', @@ -183,6 +187,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'amount' => 'setAmount', + 'applicationInfo' => 'setApplicationInfo', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', @@ -197,6 +202,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'amount' => 'getAmount', + 'applicationInfo' => 'getApplicationInfo', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', @@ -282,6 +288,7 @@ public function getMerchantRefundReasonAllowableValues() public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantRefundReason', $data ?? [], null); @@ -373,6 +380,33 @@ public function setAmount($amount) return $this; } + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Checkout\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + /** * Gets lineItems * diff --git a/src/Adyen/Model/Checkout/PaymentRefundResponse.php b/src/Adyen/Model/Checkout/PaymentRefundResponse.php index cd5d3b2a0..b5864a2b7 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundResponse.php +++ b/src/Adyen/Model/Checkout/PaymentRefundResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 7d6e6d4b7..bd1cb6d36 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -50,7 +50,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -61,7 +61,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'enableOneClick' => 'bool', @@ -108,7 +108,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'store' => 'string', 'storePaymentMethod' => 'bool', 'telephoneNumber' => 'string', - 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData2', + 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestFields', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -1043,7 +1043,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1053,7 +1053,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1350,7 +1350,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1360,7 +1360,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -2254,7 +2254,7 @@ public function getReturnUrl() /** * Sets returnUrl * - * @param string $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` + * @param string $returnUrl The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` * * @return self */ @@ -2659,7 +2659,7 @@ public function setTelephoneNumber($telephoneNumber) /** * Gets threeDS2RequestData * - * @return \Adyen\Model\Checkout\ThreeDS2RequestData2|null + * @return \Adyen\Model\Checkout\ThreeDS2RequestFields|null */ public function getThreeDS2RequestData() { @@ -2669,7 +2669,7 @@ public function getThreeDS2RequestData() /** * Sets threeDS2RequestData * - * @param \Adyen\Model\Checkout\ThreeDS2RequestData2|null $threeDS2RequestData threeDS2RequestData + * @param \Adyen\Model\Checkout\ThreeDS2RequestFields|null $threeDS2RequestData threeDS2RequestData * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentResponse.php b/src/Adyen/Model/Checkout/PaymentResponse.php index 298294231..95040ec4f 100644 --- a/src/Adyen/Model/Checkout/PaymentResponse.php +++ b/src/Adyen/Model/Checkout/PaymentResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index f5684dd44..2c1838a5e 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentReversalRequest.php b/src/Adyen/Model/Checkout/PaymentReversalRequest.php index 40773fc49..484b98273 100644 --- a/src/Adyen/Model/Checkout/PaymentReversalRequest.php +++ b/src/Adyen/Model/Checkout/PaymentReversalRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -44,6 +44,7 @@ class PaymentReversalRequest implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'merchantAccount' => 'string', 'reference' => 'string' ]; @@ -56,6 +57,7 @@ class PaymentReversalRequest implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ + 'applicationInfo' => null, 'merchantAccount' => null, 'reference' => null ]; @@ -66,6 +68,7 @@ class PaymentReversalRequest implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static $openAPINullables = [ + 'applicationInfo' => false, 'merchantAccount' => false, 'reference' => false ]; @@ -156,6 +159,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'applicationInfo' => 'applicationInfo', 'merchantAccount' => 'merchantAccount', 'reference' => 'reference' ]; @@ -166,6 +170,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'applicationInfo' => 'setApplicationInfo', 'merchantAccount' => 'setMerchantAccount', 'reference' => 'setReference' ]; @@ -176,6 +181,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'applicationInfo' => 'getApplicationInfo', 'merchantAccount' => 'getMerchantAccount', 'reference' => 'getReference' ]; @@ -237,6 +243,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); } @@ -286,6 +293,33 @@ public function valid() } + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Checkout\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + /** * Gets merchantAccount * diff --git a/src/Adyen/Model/Checkout/PaymentReversalResponse.php b/src/Adyen/Model/Checkout/PaymentReversalResponse.php index cd1050e5c..0a2953c0d 100644 --- a/src/Adyen/Model/Checkout/PaymentReversalResponse.php +++ b/src/Adyen/Model/Checkout/PaymentReversalResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index 7ec31a941..bb6f5edb6 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentSetupResponse.php b/src/Adyen/Model/Checkout/PaymentSetupResponse.php index c252f7a2f..2cae7555a 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupResponse.php +++ b/src/Adyen/Model/Checkout/PaymentSetupResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentVerificationRequest.php b/src/Adyen/Model/Checkout/PaymentVerificationRequest.php index cf4bd3c9b..8db20e3f9 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationRequest.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php index 7c79c54ee..7a69124b8 100644 --- a/src/Adyen/Model/Checkout/PaymentVerificationResponse.php +++ b/src/Adyen/Model/Checkout/PaymentVerificationResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -52,7 +52,7 @@ class PaymentVerificationResponse implements ModelInterface, ArrayAccess, \JsonS 'refusalReason' => 'string', 'refusalReasonCode' => 'string', 'resultCode' => 'string', - 'serviceError' => '\Adyen\Model\Checkout\ServiceError2', + 'serviceError' => '\Adyen\Model\Checkout\ServiceErrorDetails', 'shopperLocale' => 'string' ]; @@ -621,7 +621,7 @@ public function setResultCode($resultCode) /** * Gets serviceError * - * @return \Adyen\Model\Checkout\ServiceError2|null + * @return \Adyen\Model\Checkout\ServiceErrorDetails|null */ public function getServiceError() { @@ -631,7 +631,7 @@ public function getServiceError() /** * Sets serviceError * - * @param \Adyen\Model\Checkout\ServiceError2|null $serviceError serviceError + * @param \Adyen\Model\Checkout\ServiceErrorDetails|null $serviceError serviceError * * @return self */ diff --git a/src/Adyen/Model/Checkout/Phone.php b/src/Adyen/Model/Checkout/Phone.php index c1317d50f..67d26bd86 100644 --- a/src/Adyen/Model/Checkout/Phone.php +++ b/src/Adyen/Model/Checkout/Phone.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php index 7d77e96e4..530eb5a3b 100644 --- a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index 940a36303..29055bb4b 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Recurring.php b/src/Adyen/Model/Checkout/Recurring.php index 17cb6776a..2a06af608 100644 --- a/src/Adyen/Model/Checkout/Recurring.php +++ b/src/Adyen/Model/Checkout/Recurring.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/Checkout/RecurringDetail.php b/src/Adyen/Model/Checkout/RecurringDetail.php index ae16687f3..f8c9fe0f9 100644 --- a/src/Adyen/Model/Checkout/RecurringDetail.php +++ b/src/Adyen/Model/Checkout/RecurringDetail.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php index d333adfaa..1b3bbfb9e 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php index e1b1c97ec..7ea9ef74e 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php index 628b26031..953154f5e 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCard.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index 62d15c2c6..a17aa34dd 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php index 5321b5050..02e20aa68 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php index d2895c0c6..acf76b612 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php index c54b7e34b..40fa6e552 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataOpi.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php index cc305a24e..195220692 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataSepa.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ResponsePaymentMethod.php b/src/Adyen/Model/Checkout/ResponsePaymentMethod.php index a088001b0..e0e0787f1 100644 --- a/src/Adyen/Model/Checkout/ResponsePaymentMethod.php +++ b/src/Adyen/Model/Checkout/ResponsePaymentMethod.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/RiskData.php b/src/Adyen/Model/Checkout/RiskData.php index 4b1ea0b0d..f04428c92 100644 --- a/src/Adyen/Model/Checkout/RiskData.php +++ b/src/Adyen/Model/Checkout/RiskData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/SDKEphemPubKey.php b/src/Adyen/Model/Checkout/SDKEphemPubKey.php index 2043e041e..d02c3754d 100644 --- a/src/Adyen/Model/Checkout/SDKEphemPubKey.php +++ b/src/Adyen/Model/Checkout/SDKEphemPubKey.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index 2a8069c75..5d761deec 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index 0faa3aac3..c358ea30a 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ServiceError.php b/src/Adyen/Model/Checkout/ServiceError.php index 912c56db2..50c56f697 100644 --- a/src/Adyen/Model/Checkout/ServiceError.php +++ b/src/Adyen/Model/Checkout/ServiceError.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ServiceError2.php b/src/Adyen/Model/Checkout/ServiceErrorDetails.php similarity index 97% rename from src/Adyen/Model/Checkout/ServiceError2.php rename to src/Adyen/Model/Checkout/ServiceErrorDetails.php index f6d3f432d..b046de338 100644 --- a/src/Adyen/Model/Checkout/ServiceError2.php +++ b/src/Adyen/Model/Checkout/ServiceErrorDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * ServiceError2 Class Doc Comment + * ServiceErrorDetails Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class ServiceError2 implements ModelInterface, ArrayAccess, \JsonSerializable +class ServiceErrorDetails implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class ServiceError2 implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'ServiceError-2'; + protected static $openAPIModelName = 'ServiceErrorDetails'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/src/Adyen/Model/Checkout/SessionResultResponse.php b/src/Adyen/Model/Checkout/SessionResultResponse.php index 58ab652a1..8d195dea2 100644 --- a/src/Adyen/Model/Checkout/SessionResultResponse.php +++ b/src/Adyen/Model/Checkout/SessionResultResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ShopperInput.php b/src/Adyen/Model/Checkout/ShopperInput.php index c8b85e506..e9a6dffcb 100644 --- a/src/Adyen/Model/Checkout/ShopperInput.php +++ b/src/Adyen/Model/Checkout/ShopperInput.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ShopperInteractionDevice.php b/src/Adyen/Model/Checkout/ShopperInteractionDevice.php index 5c4734723..999901d36 100644 --- a/src/Adyen/Model/Checkout/ShopperInteractionDevice.php +++ b/src/Adyen/Model/Checkout/ShopperInteractionDevice.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/Split.php b/src/Adyen/Model/Checkout/Split.php index c0c3203a3..2e27eda1a 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -317,9 +317,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['amount'] === null) { - $invalidProperties[] = "'amount' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -360,7 +357,7 @@ public function getAccount() /** * Sets account * - * @param string|null $account Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. + * @param string|null $account The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. * * @return self */ @@ -377,7 +374,7 @@ public function setAccount($account) /** * Gets amount * - * @return \Adyen\Model\Checkout\SplitAmount + * @return \Adyen\Model\Checkout\SplitAmount|null */ public function getAmount() { @@ -387,7 +384,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Checkout\SplitAmount $amount amount + * @param \Adyen\Model\Checkout\SplitAmount|null $amount amount * * @return self */ @@ -414,7 +411,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description A description of this split. + * @param string|null $description Your description for the split item. * * @return self */ @@ -441,7 +438,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. + * @param string|null $reference Your reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. * * @return self */ @@ -468,7 +465,7 @@ public function getType() /** * Sets type * - * @param string $type The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. + * @param string $type The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. * * @return self */ diff --git a/src/Adyen/Model/Checkout/SplitAmount.php b/src/Adyen/Model/Checkout/SplitAmount.php index 659cdab46..614eedfa8 100644 --- a/src/Adyen/Model/Checkout/SplitAmount.php +++ b/src/Adyen/Model/Checkout/SplitAmount.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string|null $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. + * @param string|null $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). By default, this is the original payment currency. * * @return self */ @@ -326,7 +326,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param int $value The value of the split amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * * @return self */ diff --git a/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php b/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php index 422c10704..1041ed8e2 100644 --- a/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php +++ b/src/Adyen/Model/Checkout/StandalonePaymentCancelRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -44,6 +44,7 @@ class StandalonePaymentCancelRequest implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'merchantAccount' => 'string', 'paymentReference' => 'string', 'reference' => 'string' @@ -57,6 +58,7 @@ class StandalonePaymentCancelRequest implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ + 'applicationInfo' => null, 'merchantAccount' => null, 'paymentReference' => null, 'reference' => null @@ -68,6 +70,7 @@ class StandalonePaymentCancelRequest implements ModelInterface, ArrayAccess, \Js * @var boolean[] */ protected static $openAPINullables = [ + 'applicationInfo' => false, 'merchantAccount' => false, 'paymentReference' => false, 'reference' => false @@ -159,6 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'applicationInfo' => 'applicationInfo', 'merchantAccount' => 'merchantAccount', 'paymentReference' => 'paymentReference', 'reference' => 'reference' @@ -170,6 +174,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'applicationInfo' => 'setApplicationInfo', 'merchantAccount' => 'setMerchantAccount', 'paymentReference' => 'setPaymentReference', 'reference' => 'setReference' @@ -181,6 +186,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'applicationInfo' => 'getApplicationInfo', 'merchantAccount' => 'getMerchantAccount', 'paymentReference' => 'getPaymentReference', 'reference' => 'getReference' @@ -243,6 +249,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('paymentReference', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); @@ -296,6 +303,33 @@ public function valid() } + /** + * Gets applicationInfo + * + * @return \Adyen\Model\Checkout\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->container['applicationInfo']; + } + + /** + * Sets applicationInfo + * + * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * + * @return self + */ + public function setApplicationInfo($applicationInfo) + { + if (is_null($applicationInfo)) { + throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); + } + $this->container['applicationInfo'] = $applicationInfo; + + return $this; + } + /** * Gets merchantAccount * diff --git a/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php b/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php index 36d412b0b..d6f9286ee 100644 --- a/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php +++ b/src/Adyen/Model/Checkout/StandalonePaymentCancelResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/StoredDetails.php b/src/Adyen/Model/Checkout/StoredDetails.php index d17c8168c..9ab6ce8d1 100644 --- a/src/Adyen/Model/Checkout/StoredDetails.php +++ b/src/Adyen/Model/Checkout/StoredDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethod.php b/src/Adyen/Model/Checkout/StoredPaymentMethod.php index 3272a1d4a..e81aabbca 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethod.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethod.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index aafea8888..78fa167e6 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php index 653f8426f..81b16d608 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodResource.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/SubInputDetail.php b/src/Adyen/Model/Checkout/SubInputDetail.php index 819a4da9a..f8157f0e6 100644 --- a/src/Adyen/Model/Checkout/SubInputDetail.php +++ b/src/Adyen/Model/Checkout/SubInputDetail.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/SubMerchant.php b/src/Adyen/Model/Checkout/SubMerchant.php index 9faf037f4..597741329 100644 --- a/src/Adyen/Model/Checkout/SubMerchant.php +++ b/src/Adyen/Model/Checkout/SubMerchant.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/SubMerchantInfo.php b/src/Adyen/Model/Checkout/SubMerchantInfo.php index e41e335da..b8cd02f02 100644 --- a/src/Adyen/Model/Checkout/SubMerchantInfo.php +++ b/src/Adyen/Model/Checkout/SubMerchantInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -44,7 +44,7 @@ class SubMerchantInfo implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'address' => '\Adyen\Model\Checkout\Address', + 'address' => '\Adyen\Model\Checkout\BillingAddress', 'id' => 'string', 'mcc' => 'string', 'name' => 'string', @@ -307,7 +307,7 @@ public function valid() /** * Gets address * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getAddress() { @@ -317,7 +317,7 @@ public function getAddress() /** * Sets address * - * @param \Adyen\Model\Checkout\Address|null $address address + * @param \Adyen\Model\Checkout\BillingAddress|null $address address * * @return self */ diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index d8211a73c..ff669ce11 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php similarity index 99% rename from src/Adyen/Model/Checkout/ThreeDS2RequestData2.php rename to src/Adyen/Model/Checkout/ThreeDS2RequestFields.php index 83f1a9ece..e86012fd4 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * ThreeDS2RequestData2 Class Doc Comment + * ThreeDS2RequestFields Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class ThreeDS2RequestData2 implements ModelInterface, ArrayAccess, \JsonSerializable +class ThreeDS2RequestFields implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class ThreeDS2RequestData2 implements ModelInterface, ArrayAccess, \JsonSerializ * * @var string */ - protected static $openAPIModelName = 'ThreeDS2RequestData-2'; + protected static $openAPIModelName = 'ThreeDS2RequestFields'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php b/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php index 3ec48d161..f96bd05b2 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2ResponseData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ThreeDS2Result.php b/src/Adyen/Model/Checkout/ThreeDS2Result.php index 7e4c19684..73605f2f7 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2Result.php +++ b/src/Adyen/Model/Checkout/ThreeDS2Result.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestData.php b/src/Adyen/Model/Checkout/ThreeDSRequestData.php index 8dafba716..235a986e1 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php b/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php index 6cc79a154..cca5df038 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php b/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php index 1bc4f41a5..e32addd04 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ThreeDSecureData.php b/src/Adyen/Model/Checkout/ThreeDSecureData.php index 8739dfb72..dc727a165 100644 --- a/src/Adyen/Model/Checkout/ThreeDSecureData.php +++ b/src/Adyen/Model/Checkout/ThreeDSecureData.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php b/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php index 934285cb4..1e5b3087b 100644 --- a/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/UpdatePaymentLinkRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index 8d8d9b265..343cb1dcf 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index ab634b5e0..476fd5e01 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/UtilityRequest.php b/src/Adyen/Model/Checkout/UtilityRequest.php index aead598cc..4efba11f8 100644 --- a/src/Adyen/Model/Checkout/UtilityRequest.php +++ b/src/Adyen/Model/Checkout/UtilityRequest.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/UtilityResponse.php b/src/Adyen/Model/Checkout/UtilityResponse.php index a86ad2d0d..b6d6d5bdf 100644 --- a/src/Adyen/Model/Checkout/UtilityResponse.php +++ b/src/Adyen/Model/Checkout/UtilityResponse.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index b158ed5e5..dce8cf45e 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index b4d46cd0f..574346c67 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/WeChatPayDetails.php b/src/Adyen/Model/Checkout/WeChatPayDetails.php index 6113bf2dd..a124ec219 100644 --- a/src/Adyen/Model/Checkout/WeChatPayDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index cd94ff04e..04e0994ec 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index 4ae541be9..8b1bb8b39 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -3,7 +3,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php index ef4ded0f7..94f105aaf 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php @@ -492,7 +492,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of Terms of Service. + * @param string|null $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 159ded8ec..b48c4c4dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -534,7 +534,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for this supporting entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems The verification errors related to capabilities for this supporting entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php index 39906621d..8312bd6c0 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php @@ -44,6 +44,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openAPITypes = [ + 'additionalSalesChannels' => 'string[]', 'language' => 'string' ]; @@ -55,6 +56,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $openAPIFormats = [ + 'additionalSalesChannels' => null, 'language' => null ]; @@ -64,6 +66,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @var boolean[] */ protected static $openAPINullables = [ + 'additionalSalesChannels' => false, 'language' => false ]; @@ -153,6 +156,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'additionalSalesChannels' => 'additionalSalesChannels', 'language' => 'language' ]; @@ -162,6 +166,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'additionalSalesChannels' => 'setAdditionalSalesChannels', 'language' => 'setLanguage' ]; @@ -171,6 +176,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'additionalSalesChannels' => 'getAdditionalSalesChannels', 'language' => 'getLanguage' ]; @@ -215,7 +221,25 @@ public function getModelName() return self::$openAPIModelName; } + public const ADDITIONAL_SALES_CHANNELS_E_COMMERCE = 'eCommerce'; + public const ADDITIONAL_SALES_CHANNELS_ECOM_MOTO = 'ecomMoto'; + public const ADDITIONAL_SALES_CHANNELS_POS = 'pos'; + public const ADDITIONAL_SALES_CHANNELS_POS_MOTO = 'posMoto'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdditionalSalesChannelsAllowableValues() + { + return [ + self::ADDITIONAL_SALES_CHANNELS_E_COMMERCE, + self::ADDITIONAL_SALES_CHANNELS_ECOM_MOTO, + self::ADDITIONAL_SALES_CHANNELS_POS, + self::ADDITIONAL_SALES_CHANNELS_POS_MOTO, + ]; + } /** * Associative array for storing property values * @@ -231,6 +255,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('additionalSalesChannels', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); } @@ -276,6 +301,42 @@ public function valid() } + /** + * Gets additionalSalesChannels + * + * @return string[]|null + */ + public function getAdditionalSalesChannels() + { + return $this->container['additionalSalesChannels']; + } + + /** + * Sets additionalSalesChannels + * + * @param string[]|null $additionalSalesChannels An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/create-stores/) and [add payment methods](https://docs.adyen.com/marketplaces-and-platforms/payment-methods/) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * + * @return self + */ + public function setAdditionalSalesChannels($additionalSalesChannels) + { + if (is_null($additionalSalesChannels)) { + throw new \InvalidArgumentException('non-nullable additionalSalesChannels cannot be null'); + } + $allowedValues = $this->getAdditionalSalesChannelsAllowableValues(); + if (array_diff($additionalSalesChannels, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'additionalSalesChannels', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['additionalSalesChannels'] = $additionalSalesChannels; + + return $this; + } + /** * Gets language * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index 3a12d63f3..e9900e12e 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -362,7 +362,7 @@ public function getType() /** * Sets type * - * @param string $type The type of Terms of Service. + * @param string $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index 61183af4b..d7093db76 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -458,7 +458,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of Terms of Service. + * @param string|null $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index 57e32882a..d668b0830 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * @param string $accountNumber The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index b9c79e7af..a236975f3 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -251,7 +251,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PROOF_OF_NATIONAL_ID_NUMBER = 'proofOfNationalIdNumber'; + public const TYPE_NATIONAL_ID_NUMBER = 'nationalIdNumber'; /** * Gets allowable values of the enum @@ -261,7 +261,7 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_PROOF_OF_NATIONAL_ID_NUMBER, + self::TYPE_NATIONAL_ID_NUMBER, ]; } /** @@ -373,7 +373,6 @@ public function setCardNumber($cardNumber) * Gets expiryDate * * @return string|null - * @deprecated */ public function getExpiryDate() { @@ -386,7 +385,6 @@ public function getExpiryDate() * @param string|null $expiryDate The expiry date of the document, in YYYY-MM-DD format. * * @return self - * @deprecated */ public function setExpiryDate($expiryDate) { diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 6e5fd33a6..b7bdf5833 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -55,6 +55,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'transferInstruments' => '\Adyen\Model\LegalEntityManagement\TransferInstrumentReference[]', + 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]' ]; @@ -78,6 +79,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => null, 'soleProprietorship' => null, 'transferInstruments' => null, + 'trust' => null, 'type' => null, 'verificationDeadlines' => null ]; @@ -99,6 +101,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => false, 'soleProprietorship' => false, 'transferInstruments' => false, + 'trust' => false, 'type' => false, 'verificationDeadlines' => false ]; @@ -200,6 +203,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', 'transferInstruments' => 'transferInstruments', + 'trust' => 'trust', 'type' => 'type', 'verificationDeadlines' => 'verificationDeadlines' ]; @@ -221,6 +225,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', 'transferInstruments' => 'setTransferInstruments', + 'trust' => 'setTrust', 'type' => 'setType', 'verificationDeadlines' => 'setVerificationDeadlines' ]; @@ -242,6 +247,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', 'transferInstruments' => 'getTransferInstruments', + 'trust' => 'getTrust', 'type' => 'getType', 'verificationDeadlines' => 'getVerificationDeadlines' ]; @@ -334,6 +340,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('soleProprietorship', $data ?? [], null); $this->setIfExists('transferInstruments', $data ?? [], null); + $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('verificationDeadlines', $data ?? [], null); } @@ -596,7 +603,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for the legal entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of verification errors related to capabilities for the legal entity. * * @return self */ @@ -691,6 +698,33 @@ public function setTransferInstruments($transferInstruments) return $this; } + /** + * Gets trust + * + * @return \Adyen\Model\LegalEntityManagement\Trust|null + */ + public function getTrust() + { + return $this->container['trust']; + } + + /** + * Sets trust + * + * @param \Adyen\Model\LegalEntityManagement\Trust|null $trust trust + * + * @return self + */ + public function setTrust($trust) + { + if (is_null($trust)) { + throw new \InvalidArgumentException('non-nullable trust cannot be null'); + } + $this->container['trust'] = $trust; + + return $this; + } + /** * Gets type * @@ -704,7 +738,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. + * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 012921e27..1c9031d18 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -49,6 +49,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => 'string', 'legalEntityId' => 'string', 'name' => 'string', + 'settlorExemptionReason' => 'string[]', 'type' => 'string' ]; @@ -65,6 +66,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => null, 'legalEntityId' => null, 'name' => null, + 'settlorExemptionReason' => null, 'type' => null ]; @@ -79,6 +81,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => false, 'legalEntityId' => false, 'name' => false, + 'settlorExemptionReason' => false, 'type' => false ]; @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'jobTitle', 'legalEntityId' => 'legalEntityId', 'name' => 'name', + 'settlorExemptionReason' => 'settlorExemptionReason', 'type' => 'type' ]; @@ -187,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'setJobTitle', 'legalEntityId' => 'setLegalEntityId', 'name' => 'setName', + 'settlorExemptionReason' => 'setSettlorExemptionReason', 'type' => 'setType' ]; @@ -201,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'getJobTitle', 'legalEntityId' => 'getLegalEntityId', 'name' => 'getName', + 'settlorExemptionReason' => 'getSettlorExemptionReason', 'type' => 'getType' ]; @@ -245,12 +251,20 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_DEFINED_BENEFICIARY = 'definedBeneficiary'; + public const TYPE_DIRECTOR = 'director'; public const TYPE_PCI_SIGNATORY = 'pciSignatory'; + public const TYPE_PROTECTOR = 'protector'; + public const TYPE_SECONDARY_TRUSTEE = 'secondaryTrustee'; + public const TYPE_SETTLOR = 'settlor'; public const TYPE_SIGNATORY = 'signatory'; public const TYPE_SOLE_PROPRIETORSHIP = 'soleProprietorship'; + public const TYPE_TRUST = 'trust'; + public const TYPE_TRUST_OWNERSHIP = 'trustOwnership'; public const TYPE_UBO_THROUGH_CONTROL = 'uboThroughControl'; public const TYPE_UBO_THROUGH_OWNERSHIP = 'uboThroughOwnership'; public const TYPE_ULTIMATE_PARENT_COMPANY = 'ultimateParentCompany'; + public const TYPE_UNDEFINED_BENEFICIARY = 'undefinedBeneficiary'; /** * Gets allowable values of the enum @@ -260,12 +274,20 @@ public function getModelName() public function getTypeAllowableValues() { return [ + self::TYPE_DEFINED_BENEFICIARY, + self::TYPE_DIRECTOR, self::TYPE_PCI_SIGNATORY, + self::TYPE_PROTECTOR, + self::TYPE_SECONDARY_TRUSTEE, + self::TYPE_SETTLOR, self::TYPE_SIGNATORY, self::TYPE_SOLE_PROPRIETORSHIP, + self::TYPE_TRUST, + self::TYPE_TRUST_OWNERSHIP, self::TYPE_UBO_THROUGH_CONTROL, self::TYPE_UBO_THROUGH_OWNERSHIP, self::TYPE_ULTIMATE_PARENT_COMPANY, + self::TYPE_UNDEFINED_BENEFICIARY, ]; } /** @@ -288,6 +310,7 @@ public function __construct(array $data = null) $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('settlorExemptionReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -483,6 +506,33 @@ public function setName($name) return $this; } + /** + * Gets settlorExemptionReason + * + * @return string[]|null + */ + public function getSettlorExemptionReason() + { + return $this->container['settlorExemptionReason']; + } + + /** + * Sets settlorExemptionReason + * + * @param string[]|null $settlorExemptionReason Defines the Kyc Exemption Reason for a Settlor associated with a trust. For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**. + * + * @return self + */ + public function setSettlorExemptionReason($settlorExemptionReason) + { + if (is_null($settlorExemptionReason)) { + throw new \InvalidArgumentException('non-nullable settlorExemptionReason cannot be null'); + } + $this->container['settlorExemptionReason'] = $settlorExemptionReason; + + return $this; + } + /** * Gets type * @@ -496,7 +546,7 @@ public function getType() /** * Sets type * - * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. + * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php index 411cae7d6..7eec424fd 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php @@ -392,7 +392,7 @@ public function getAllowed() /** * Sets allowed * - * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful + * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. * * @return self */ @@ -483,7 +483,7 @@ public function getRequested() /** * Sets requested * - * @param bool|null $requested Indicates whether the capability is requested. To check whether the Legal Entity is permitted to use the capability, + * @param bool|null $requested Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. * * @return self */ @@ -574,7 +574,7 @@ public function getTransferInstruments() /** * Sets transferInstruments * - * @param \Adyen\Model\LegalEntityManagement\SupportingEntityCapability[]|null $transferInstruments Capability status for transfer instruments associated with legal entity + * @param \Adyen\Model\LegalEntityManagement\SupportingEntityCapability[]|null $transferInstruments The capability status of transfer instruments associated with the legal entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 84577dade..1bc7809ec 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -50,6 +50,7 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'organization' => '\Adyen\Model\LegalEntityManagement\Organization', 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', + 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string' ]; @@ -67,6 +68,7 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'organization' => null, 'reference' => null, 'soleProprietorship' => null, + 'trust' => null, 'type' => null ]; @@ -82,6 +84,7 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'organization' => false, 'reference' => false, 'soleProprietorship' => false, + 'trust' => false, 'type' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'organization', 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', + 'trust' => 'trust', 'type' => 'type' ]; @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'setOrganization', 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', + 'trust' => 'setTrust', 'type' => 'setType' ]; @@ -207,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'getOrganization', 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', + 'trust' => 'getTrust', 'type' => 'getType' ]; @@ -293,6 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('organization', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('soleProprietorship', $data ?? [], null); + $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -509,6 +516,33 @@ public function setSoleProprietorship($soleProprietorship) return $this; } + /** + * Gets trust + * + * @return \Adyen\Model\LegalEntityManagement\Trust|null + */ + public function getTrust() + { + return $this->container['trust']; + } + + /** + * Sets trust + * + * @param \Adyen\Model\LegalEntityManagement\Trust|null $trust trust + * + * @return self + */ + public function setTrust($trust) + { + if (is_null($trust)) { + throw new \InvalidArgumentException('non-nullable trust cannot be null'); + } + $this->container['trust'] = $trust; + + return $this; + } + /** * Gets type * @@ -522,7 +556,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. + * @param string|null $type The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 22a5dff8b..e8a75b4a8 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -50,6 +50,7 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'organization' => '\Adyen\Model\LegalEntityManagement\Organization', 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', + 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string' ]; @@ -67,6 +68,7 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'organization' => null, 'reference' => null, 'soleProprietorship' => null, + 'trust' => null, 'type' => null ]; @@ -82,6 +84,7 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'organization' => false, 'reference' => false, 'soleProprietorship' => false, + 'trust' => false, 'type' => false ]; @@ -177,6 +180,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'organization', 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', + 'trust' => 'trust', 'type' => 'type' ]; @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'setOrganization', 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', + 'trust' => 'setTrust', 'type' => 'setType' ]; @@ -207,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'organization' => 'getOrganization', 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', + 'trust' => 'getTrust', 'type' => 'getType' ]; @@ -293,6 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('organization', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('soleProprietorship', $data ?? [], null); + $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -512,6 +519,33 @@ public function setSoleProprietorship($soleProprietorship) return $this; } + /** + * Gets trust + * + * @return \Adyen\Model\LegalEntityManagement\Trust|null + */ + public function getTrust() + { + return $this->container['trust']; + } + + /** + * Sets trust + * + * @param \Adyen\Model\LegalEntityManagement\Trust|null $trust trust + * + * @return self + */ + public function setTrust($trust) + { + if (is_null($trust)) { + throw new \InvalidArgumentException('non-nullable trust cannot be null'); + } + $this->container['trust'] = $trust; + + return $this; + } + /** * Gets type * @@ -525,7 +559,7 @@ public function getType() /** * Sets type * - * @param string $type The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. + * @param string $type The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index ed621bfd4..250e8a786 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -364,7 +364,7 @@ public function getSettings() /** * Sets settings * - * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. + * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 935c6ad2e..0e8c25fa9 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -51,6 +51,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', 'registrationNumber' => 'string', + 'taxInformation' => '\Adyen\Model\LegalEntityManagement\TaxInformation[]', 'vatAbsenceReason' => 'string', 'vatNumber' => 'string' ]; @@ -70,6 +71,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'principalPlaceOfBusiness' => null, 'registeredAddress' => null, 'registrationNumber' => null, + 'taxInformation' => null, 'vatAbsenceReason' => null, 'vatNumber' => null ]; @@ -87,6 +89,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'principalPlaceOfBusiness' => false, 'registeredAddress' => false, 'registrationNumber' => false, + 'taxInformation' => false, 'vatAbsenceReason' => false, 'vatNumber' => false ]; @@ -184,6 +187,7 @@ public function isNullableSetToNull(string $property): bool 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', 'registeredAddress' => 'registeredAddress', 'registrationNumber' => 'registrationNumber', + 'taxInformation' => 'taxInformation', 'vatAbsenceReason' => 'vatAbsenceReason', 'vatNumber' => 'vatNumber' ]; @@ -201,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', 'registeredAddress' => 'setRegisteredAddress', 'registrationNumber' => 'setRegistrationNumber', + 'taxInformation' => 'setTaxInformation', 'vatAbsenceReason' => 'setVatAbsenceReason', 'vatNumber' => 'setVatNumber' ]; @@ -218,6 +223,7 @@ public function isNullableSetToNull(string $property): bool 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', 'registeredAddress' => 'getRegisteredAddress', 'registrationNumber' => 'getRegistrationNumber', + 'taxInformation' => 'getTaxInformation', 'vatAbsenceReason' => 'getVatAbsenceReason', 'vatNumber' => 'getVatNumber' ]; @@ -300,6 +306,7 @@ public function __construct(array $data = null) $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); $this->setIfExists('registeredAddress', $data ?? [], null); $this->setIfExists('registrationNumber', $data ?? [], null); + $this->setIfExists('taxInformation', $data ?? [], null); $this->setIfExists('vatAbsenceReason', $data ?? [], null); $this->setIfExists('vatNumber', $data ?? [], null); } @@ -553,6 +560,33 @@ public function setRegistrationNumber($registrationNumber) return $this; } + /** + * Gets taxInformation + * + * @return \Adyen\Model\LegalEntityManagement\TaxInformation[]|null + */ + public function getTaxInformation() + { + return $this->container['taxInformation']; + } + + /** + * Sets taxInformation + * + * @param \Adyen\Model\LegalEntityManagement\TaxInformation[]|null $taxInformation The tax information of the entity. + * + * @return self + */ + public function setTaxInformation($taxInformation) + { + if (is_null($taxInformation)) { + throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); + } + $this->container['taxInformation'] = $taxInformation; + + return $this; + } + /** * Gets vatAbsenceReason * diff --git a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php index 4460e3308..e9f9d7e55 100644 --- a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php @@ -310,7 +310,7 @@ public function getAllowed() /** * Sets allowed * - * @param bool|null $allowed Indicates whether the supporting entity capability is allowed. If a supporting entity is allowed but its parent legal entity is not, it means there are other supporting entities that failed validation. **The allowed supporting entity can still be used** + * @param bool|null $allowed Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities. * * @return self */ @@ -391,7 +391,7 @@ public function getVerificationStatus() /** * Sets verificationStatus * - * @param string|null $verificationStatus The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. + * @param string|null $verificationStatus The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php index 3daa76557..d0290d076 100644 --- a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php @@ -458,7 +458,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of Terms of Service. + * @param string|null $type The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php index a89e5fb8b..f5e75f6c2 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php @@ -393,7 +393,7 @@ public function getCapabilities() /** * Sets capabilities * - * @param array|null $capabilities List of capabilities for this supporting entity. + * @param array|null $capabilities List of capabilities for this transfer instrument. * * @return self */ @@ -501,7 +501,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for this supporting entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems The verification errors related to capabilities for this transfer instrument. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Trust.php b/src/Adyen/Model/LegalEntityManagement/Trust.php new file mode 100644 index 000000000..4bcac8bfe --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/Trust.php @@ -0,0 +1,862 @@ + + */ +class Trust implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Trust'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'countryOfGoverningLaw' => 'string', + 'dateOfIncorporation' => 'string', + 'doingBusinessAs' => 'string', + 'name' => 'string', + 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', + 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', + 'registrationNumber' => 'string', + 'taxInformation' => '\Adyen\Model\LegalEntityManagement\TaxInformation[]', + 'type' => 'string', + 'undefinedBeneficiaryInfo' => '\Adyen\Model\LegalEntityManagement\UndefinedBeneficiary[]', + 'vatAbsenceReason' => 'string', + 'vatNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'countryOfGoverningLaw' => null, + 'dateOfIncorporation' => null, + 'doingBusinessAs' => null, + 'name' => null, + 'principalPlaceOfBusiness' => null, + 'registeredAddress' => null, + 'registrationNumber' => null, + 'taxInformation' => null, + 'type' => null, + 'undefinedBeneficiaryInfo' => null, + 'vatAbsenceReason' => null, + 'vatNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'countryOfGoverningLaw' => false, + 'dateOfIncorporation' => false, + 'doingBusinessAs' => false, + 'name' => false, + 'principalPlaceOfBusiness' => false, + 'registeredAddress' => false, + 'registrationNumber' => false, + 'taxInformation' => false, + 'type' => false, + 'undefinedBeneficiaryInfo' => false, + 'vatAbsenceReason' => false, + 'vatNumber' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'countryOfGoverningLaw' => 'countryOfGoverningLaw', + 'dateOfIncorporation' => 'dateOfIncorporation', + 'doingBusinessAs' => 'doingBusinessAs', + 'name' => 'name', + 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', + 'registeredAddress' => 'registeredAddress', + 'registrationNumber' => 'registrationNumber', + 'taxInformation' => 'taxInformation', + 'type' => 'type', + 'undefinedBeneficiaryInfo' => 'undefinedBeneficiaryInfo', + 'vatAbsenceReason' => 'vatAbsenceReason', + 'vatNumber' => 'vatNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', + 'dateOfIncorporation' => 'setDateOfIncorporation', + 'doingBusinessAs' => 'setDoingBusinessAs', + 'name' => 'setName', + 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', + 'registeredAddress' => 'setRegisteredAddress', + 'registrationNumber' => 'setRegistrationNumber', + 'taxInformation' => 'setTaxInformation', + 'type' => 'setType', + 'undefinedBeneficiaryInfo' => 'setUndefinedBeneficiaryInfo', + 'vatAbsenceReason' => 'setVatAbsenceReason', + 'vatNumber' => 'setVatNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', + 'dateOfIncorporation' => 'getDateOfIncorporation', + 'doingBusinessAs' => 'getDoingBusinessAs', + 'name' => 'getName', + 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', + 'registeredAddress' => 'getRegisteredAddress', + 'registrationNumber' => 'getRegistrationNumber', + 'taxInformation' => 'getTaxInformation', + 'type' => 'getType', + 'undefinedBeneficiaryInfo' => 'getUndefinedBeneficiaryInfo', + 'vatAbsenceReason' => 'getVatAbsenceReason', + 'vatNumber' => 'getVatNumber' + ]; + + /** + * 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::$openAPIModelName; + } + + public const TYPE_CASH_MANAGEMENT_TRUST = 'cashManagementTrust'; + public const TYPE_CORPORATE_UNIT_TRUST = 'corporateUnitTrust'; + public const TYPE_DECEASED_ESTATE = 'deceasedEstate'; + public const TYPE_DISCRETIONARY_INVESTMENT_TRUST = 'discretionaryInvestmentTrust'; + public const TYPE_DISCRETIONARY_SERVICES_MANAGEMENT_TRUST = 'discretionaryServicesManagementTrust'; + public const TYPE_DISCRETIONARY_TRADING_TRUST = 'discretionaryTradingTrust'; + public const TYPE_FIRST_HOME_SAVER_ACCOUNTS_TRUST = 'firstHomeSaverAccountsTrust'; + public const TYPE_FIXED_TRUST = 'fixedTrust'; + public const TYPE_FIXED_UNIT_TRUST = 'fixedUnitTrust'; + public const TYPE_HYBRID_TRUST = 'hybridTrust'; + public const TYPE_LISTED_PUBLIC_UNIT_TRUST = 'listedPublicUnitTrust'; + public const TYPE_OTHER_TRUST = 'otherTrust'; + public const TYPE_POOLED_SUPERANNUATION_TRUST = 'pooledSuperannuationTrust'; + public const TYPE_PUBLIC_TRADING_TRUST = 'publicTradingTrust'; + public const TYPE_UNLISTED_PUBLIC_UNIT_TRUST = 'unlistedPublicUnitTrust'; + public const VAT_ABSENCE_REASON_INDUSTRY_EXEMPTION = 'industryExemption'; + public const VAT_ABSENCE_REASON_BELOW_TAX_THRESHOLD = 'belowTaxThreshold'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CASH_MANAGEMENT_TRUST, + self::TYPE_CORPORATE_UNIT_TRUST, + self::TYPE_DECEASED_ESTATE, + self::TYPE_DISCRETIONARY_INVESTMENT_TRUST, + self::TYPE_DISCRETIONARY_SERVICES_MANAGEMENT_TRUST, + self::TYPE_DISCRETIONARY_TRADING_TRUST, + self::TYPE_FIRST_HOME_SAVER_ACCOUNTS_TRUST, + self::TYPE_FIXED_TRUST, + self::TYPE_FIXED_UNIT_TRUST, + self::TYPE_HYBRID_TRUST, + self::TYPE_LISTED_PUBLIC_UNIT_TRUST, + self::TYPE_OTHER_TRUST, + self::TYPE_POOLED_SUPERANNUATION_TRUST, + self::TYPE_PUBLIC_TRADING_TRUST, + self::TYPE_UNLISTED_PUBLIC_UNIT_TRUST, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVatAbsenceReasonAllowableValues() + { + return [ + self::VAT_ABSENCE_REASON_INDUSTRY_EXEMPTION, + self::VAT_ABSENCE_REASON_BELOW_TAX_THRESHOLD, + ]; + } + /** + * 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->setIfExists('countryOfGoverningLaw', $data ?? [], null); + $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('doingBusinessAs', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); + $this->setIfExists('registeredAddress', $data ?? [], null); + $this->setIfExists('registrationNumber', $data ?? [], null); + $this->setIfExists('taxInformation', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('undefinedBeneficiaryInfo', $data ?? [], null); + $this->setIfExists('vatAbsenceReason', $data ?? [], null); + $this->setIfExists('vatNumber', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['countryOfGoverningLaw'] === null) { + $invalidProperties[] = "'countryOfGoverningLaw' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['registeredAddress'] === null) { + $invalidProperties[] = "'registeredAddress' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVatAbsenceReasonAllowableValues(); + if (!is_null($this->container['vatAbsenceReason']) && !in_array($this->container['vatAbsenceReason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'vatAbsenceReason', must be one of '%s'", + $this->container['vatAbsenceReason'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets countryOfGoverningLaw + * + * @return string + */ + public function getCountryOfGoverningLaw() + { + return $this->container['countryOfGoverningLaw']; + } + + /** + * Sets countryOfGoverningLaw + * + * @param string $countryOfGoverningLaw The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + * + * @return self + */ + public function setCountryOfGoverningLaw($countryOfGoverningLaw) + { + if (is_null($countryOfGoverningLaw)) { + throw new \InvalidArgumentException('non-nullable countryOfGoverningLaw cannot be null'); + } + $this->container['countryOfGoverningLaw'] = $countryOfGoverningLaw; + + return $this; + } + + /** + * Gets dateOfIncorporation + * + * @return string|null + */ + public function getDateOfIncorporation() + { + return $this->container['dateOfIncorporation']; + } + + /** + * Sets dateOfIncorporation + * + * @param string|null $dateOfIncorporation The date when the legal arrangement was incorporated in YYYY-MM-DD format. + * + * @return self + */ + public function setDateOfIncorporation($dateOfIncorporation) + { + if (is_null($dateOfIncorporation)) { + throw new \InvalidArgumentException('non-nullable dateOfIncorporation cannot be null'); + } + $this->container['dateOfIncorporation'] = $dateOfIncorporation; + + return $this; + } + + /** + * Gets doingBusinessAs + * + * @return string|null + */ + public function getDoingBusinessAs() + { + return $this->container['doingBusinessAs']; + } + + /** + * Sets doingBusinessAs + * + * @param string|null $doingBusinessAs The registered name, if different from the `name`. + * + * @return self + */ + public function setDoingBusinessAs($doingBusinessAs) + { + if (is_null($doingBusinessAs)) { + throw new \InvalidArgumentException('non-nullable doingBusinessAs cannot be null'); + } + $this->container['doingBusinessAs'] = $doingBusinessAs; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The legal name. + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets principalPlaceOfBusiness + * + * @return \Adyen\Model\LegalEntityManagement\Address|null + */ + public function getPrincipalPlaceOfBusiness() + { + return $this->container['principalPlaceOfBusiness']; + } + + /** + * Sets principalPlaceOfBusiness + * + * @param \Adyen\Model\LegalEntityManagement\Address|null $principalPlaceOfBusiness principalPlaceOfBusiness + * + * @return self + */ + public function setPrincipalPlaceOfBusiness($principalPlaceOfBusiness) + { + if (is_null($principalPlaceOfBusiness)) { + throw new \InvalidArgumentException('non-nullable principalPlaceOfBusiness cannot be null'); + } + $this->container['principalPlaceOfBusiness'] = $principalPlaceOfBusiness; + + return $this; + } + + /** + * Gets registeredAddress + * + * @return \Adyen\Model\LegalEntityManagement\Address + */ + public function getRegisteredAddress() + { + return $this->container['registeredAddress']; + } + + /** + * Sets registeredAddress + * + * @param \Adyen\Model\LegalEntityManagement\Address $registeredAddress registeredAddress + * + * @return self + */ + public function setRegisteredAddress($registeredAddress) + { + if (is_null($registeredAddress)) { + throw new \InvalidArgumentException('non-nullable registeredAddress cannot be null'); + } + $this->container['registeredAddress'] = $registeredAddress; + + return $this; + } + + /** + * Gets registrationNumber + * + * @return string|null + */ + public function getRegistrationNumber() + { + return $this->container['registrationNumber']; + } + + /** + * Sets registrationNumber + * + * @param string|null $registrationNumber The registration number. + * + * @return self + */ + public function setRegistrationNumber($registrationNumber) + { + if (is_null($registrationNumber)) { + throw new \InvalidArgumentException('non-nullable registrationNumber cannot be null'); + } + $this->container['registrationNumber'] = $registrationNumber; + + return $this; + } + + /** + * Gets taxInformation + * + * @return \Adyen\Model\LegalEntityManagement\TaxInformation[]|null + */ + public function getTaxInformation() + { + return $this->container['taxInformation']; + } + + /** + * Sets taxInformation + * + * @param \Adyen\Model\LegalEntityManagement\TaxInformation[]|null $taxInformation The tax information of the entity. + * + * @return self + */ + public function setTaxInformation($taxInformation) + { + if (is_null($taxInformation)) { + throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); + } + $this->container['taxInformation'] = $taxInformation; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets undefinedBeneficiaryInfo + * + * @return \Adyen\Model\LegalEntityManagement\UndefinedBeneficiary[]|null + */ + public function getUndefinedBeneficiaryInfo() + { + return $this->container['undefinedBeneficiaryInfo']; + } + + /** + * Sets undefinedBeneficiaryInfo + * + * @param \Adyen\Model\LegalEntityManagement\UndefinedBeneficiary[]|null $undefinedBeneficiaryInfo The undefined beneficiary information of the entity. + * + * @return self + */ + public function setUndefinedBeneficiaryInfo($undefinedBeneficiaryInfo) + { + if (is_null($undefinedBeneficiaryInfo)) { + throw new \InvalidArgumentException('non-nullable undefinedBeneficiaryInfo cannot be null'); + } + $this->container['undefinedBeneficiaryInfo'] = $undefinedBeneficiaryInfo; + + return $this; + } + + /** + * Gets vatAbsenceReason + * + * @return string|null + */ + public function getVatAbsenceReason() + { + return $this->container['vatAbsenceReason']; + } + + /** + * Sets vatAbsenceReason + * + * @param string|null $vatAbsenceReason The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + * + * @return self + */ + public function setVatAbsenceReason($vatAbsenceReason) + { + if (is_null($vatAbsenceReason)) { + throw new \InvalidArgumentException('non-nullable vatAbsenceReason cannot be null'); + } + $allowedValues = $this->getVatAbsenceReasonAllowableValues(); + if (!in_array($vatAbsenceReason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'vatAbsenceReason', must be one of '%s'", + $vatAbsenceReason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['vatAbsenceReason'] = $vatAbsenceReason; + + return $this; + } + + /** + * Gets vatNumber + * + * @return string|null + */ + public function getVatNumber() + { + return $this->container['vatNumber']; + } + + /** + * Sets vatNumber + * + * @param string|null $vatNumber The VAT number. + * + * @return self + */ + public function setVatNumber($vatNumber) + { + if (is_null($vatNumber)) { + throw new \InvalidArgumentException('non-nullable vatNumber cannot be null'); + } + $this->container['vatNumber'] = $vatNumber; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/JSONObject.php b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php similarity index 81% rename from src/Adyen/Model/Management/JSONObject.php rename to src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php index 677a1a6cb..b3811bbdc 100644 --- a/src/Adyen/Model/Management/JSONObject.php +++ b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php @@ -1,7 +1,7 @@ */ -class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable +class UndefinedBeneficiary implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONObject'; + protected static $openAPIModelName = 'UndefinedBeneficiary'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,8 +44,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\Management\JSONPath[]', - 'rootPath' => '\Adyen\Model\Management\JSONPath' + 'description' => 'string', + 'reference' => 'string' ]; /** @@ -56,8 +56,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'paths' => null, - 'rootPath' => null + 'description' => null, + 'reference' => null ]; /** @@ -66,8 +66,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'paths' => false, - 'rootPath' => false + 'description' => false, + 'reference' => false ]; /** @@ -156,8 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'paths' => 'paths', - 'rootPath' => 'rootPath' + 'description' => 'description', + 'reference' => 'reference' ]; /** @@ -166,8 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'paths' => 'setPaths', - 'rootPath' => 'setRootPath' + 'description' => 'setDescription', + 'reference' => 'setReference' ]; /** @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'paths' => 'getPaths', - 'rootPath' => 'getRootPath' + 'description' => 'getDescription', + 'reference' => 'getReference' ]; /** @@ -237,8 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('paths', $data ?? [], null); - $this->setIfExists('rootPath', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); } /** @@ -284,55 +284,55 @@ public function valid() /** - * Gets paths + * Gets description * - * @return \Adyen\Model\Management\JSONPath[]|null + * @return string|null */ - public function getPaths() + public function getDescription() { - return $this->container['paths']; + return $this->container['description']; } /** - * Sets paths + * Sets description * - * @param \Adyen\Model\Management\JSONPath[]|null $paths paths + * @param string|null $description The details of the undefined beneficiary. * * @return self */ - public function setPaths($paths) + public function setDescription($description) { - if (is_null($paths)) { - throw new \InvalidArgumentException('non-nullable paths cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['paths'] = $paths; + $this->container['description'] = $description; return $this; } /** - * Gets rootPath + * Gets reference * - * @return \Adyen\Model\Management\JSONPath|null + * @return string|null */ - public function getRootPath() + public function getReference() { - return $this->container['rootPath']; + return $this->container['reference']; } /** - * Sets rootPath + * Sets reference * - * @param \Adyen\Model\Management\JSONPath|null $rootPath rootPath + * @param string|null $reference The reference of the undefined beneficiary. * * @return self */ - public function setRootPath($rootPath) + public function setReference($reference) { - if (is_null($rootPath)) { - throw new \InvalidArgumentException('non-nullable rootPath cannot be null'); + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); } - $this->container['rootPath'] = $rootPath; + $this->container['reference'] = $reference; return $this; } diff --git a/src/Adyen/Model/Management/JSONPath.php b/src/Adyen/Model/Management/Localization.php similarity index 90% rename from src/Adyen/Model/Management/JSONPath.php rename to src/Adyen/Model/Management/Localization.php index 8fb7a2469..c0ea126ff 100644 --- a/src/Adyen/Model/Management/JSONPath.php +++ b/src/Adyen/Model/Management/Localization.php @@ -19,7 +19,7 @@ use Adyen\Model\Management\ObjectSerializer; /** - * JSONPath Class Doc Comment + * Localization Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable +class Localization implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONPath'; + protected static $openAPIModelName = 'Localization'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,7 +44,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'content' => 'string[]' + 'language' => 'string' ]; /** @@ -55,7 +55,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'content' => null + 'language' => null ]; /** @@ -64,7 +64,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'content' => false + 'language' => false ]; /** @@ -153,7 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'content' => 'content' + 'language' => 'language' ]; /** @@ -162,7 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'content' => 'setContent' + 'language' => 'setLanguage' ]; /** @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'content' => 'getContent' + 'language' => 'getLanguage' ]; /** @@ -231,7 +231,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('language', $data ?? [], null); } /** @@ -277,28 +277,28 @@ public function valid() /** - * Gets content + * Gets language * - * @return string[]|null + * @return string|null */ - public function getContent() + public function getLanguage() { - return $this->container['content']; + return $this->container['language']; } /** - * Sets content + * Sets language * - * @param string[]|null $content content + * @param string|null $language Language of the terminal. * * @return self */ - public function setContent($content) + public function setLanguage($language) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); } - $this->container['content'] = $content; + $this->container['language'] = $language; return $this; } diff --git a/src/Adyen/Model/Management/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index deae21971..8cb282d53 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -49,7 +49,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'instance' => 'string', 'invalidFields' => '\Adyen\Model\Management\InvalidField[]', 'requestId' => 'string', - 'response' => '\Adyen\Model\Management\JSONObject', + 'response' => 'object', 'status' => 'int', 'title' => 'string', 'type' => 'string' @@ -485,7 +485,7 @@ public function setRequestId($requestId) /** * Gets response * - * @return \Adyen\Model\Management\JSONObject|null + * @return object|null */ public function getResponse() { @@ -495,7 +495,7 @@ public function getResponse() /** * Sets response * - * @param \Adyen\Model\Management\JSONObject|null $response response + * @param object|null $response response * * @return self */ diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index e73c9a7be..649a9cc1d 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -239,9 +239,10 @@ public function getModelName() return self::$openAPIModelName; } - public const STATUS_REASSIGNMENT_IN_PROGRESS = 'reassignmentInProgress'; + public const STATUS_BOARDED = 'boarded'; public const STATUS_DEPLOYED = 'deployed'; public const STATUS_INVENTORY = 'inventory'; + public const STATUS_REASSIGNMENT_IN_PROGRESS = 'reassignmentInProgress'; /** * Gets allowable values of the enum @@ -251,9 +252,10 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_REASSIGNMENT_IN_PROGRESS, + self::STATUS_BOARDED, self::STATUS_DEPLOYED, self::STATUS_INVENTORY, + self::STATUS_REASSIGNMENT_IN_PROGRESS, ]; } /** @@ -429,7 +431,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. + * @param string $status The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. * * @return self */ diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index 5c64af771..ca1aaa2a2 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -48,6 +48,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => '\Adyen\Model\Management\Connectivity', 'gratuities' => '\Adyen\Model\Management\Gratuity[]', 'hardware' => '\Adyen\Model\Management\Hardware', + 'localization' => '\Adyen\Model\Management\Localization', 'nexo' => '\Adyen\Model\Management\Nexo', 'offlineProcessing' => '\Adyen\Model\Management\OfflineProcessing', 'opi' => '\Adyen\Model\Management\Opi', @@ -75,6 +76,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => null, 'gratuities' => null, 'hardware' => null, + 'localization' => null, 'nexo' => null, 'offlineProcessing' => null, 'opi' => null, @@ -100,6 +102,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => false, 'gratuities' => false, 'hardware' => false, + 'localization' => false, 'nexo' => false, 'offlineProcessing' => false, 'opi' => false, @@ -205,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'connectivity', 'gratuities' => 'gratuities', 'hardware' => 'hardware', + 'localization' => 'localization', 'nexo' => 'nexo', 'offlineProcessing' => 'offlineProcessing', 'opi' => 'opi', @@ -230,6 +234,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'setConnectivity', 'gratuities' => 'setGratuities', 'hardware' => 'setHardware', + 'localization' => 'setLocalization', 'nexo' => 'setNexo', 'offlineProcessing' => 'setOfflineProcessing', 'opi' => 'setOpi', @@ -255,6 +260,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'getConnectivity', 'gratuities' => 'getGratuities', 'hardware' => 'getHardware', + 'localization' => 'getLocalization', 'nexo' => 'getNexo', 'offlineProcessing' => 'getOfflineProcessing', 'opi' => 'getOpi', @@ -331,6 +337,7 @@ public function __construct(array $data = null) $this->setIfExists('connectivity', $data ?? [], null); $this->setIfExists('gratuities', $data ?? [], null); $this->setIfExists('hardware', $data ?? [], null); + $this->setIfExists('localization', $data ?? [], null); $this->setIfExists('nexo', $data ?? [], null); $this->setIfExists('offlineProcessing', $data ?? [], null); $this->setIfExists('opi', $data ?? [], null); @@ -496,6 +503,33 @@ public function setHardware($hardware) return $this; } + /** + * Gets localization + * + * @return \Adyen\Model\Management\Localization|null + */ + public function getLocalization() + { + return $this->container['localization']; + } + + /** + * Sets localization + * + * @param \Adyen\Model\Management\Localization|null $localization localization + * + * @return self + */ + public function setLocalization($localization) + { + if (is_null($localization)) { + throw new \InvalidArgumentException('non-nullable localization cannot be null'); + } + $this->container['localization'] = $localization; + + return $this; + } + /** * Gets nexo * diff --git a/src/Adyen/Model/Payments/Recurring.php b/src/Adyen/Model/Payments/Recurring.php index 227db5583..932dfb4ee 100644 --- a/src/Adyen/Model/Payments/Recurring.php +++ b/src/Adyen/Model/Payments/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index 6f3a280b6..1954e2b74 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -317,9 +317,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['amount'] === null) { - $invalidProperties[] = "'amount' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -360,7 +357,7 @@ public function getAccount() /** * Sets account * - * @param string|null $account Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. + * @param string|null $account The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. * * @return self */ @@ -377,7 +374,7 @@ public function setAccount($account) /** * Gets amount * - * @return \Adyen\Model\Payments\SplitAmount + * @return \Adyen\Model\Payments\SplitAmount|null */ public function getAmount() { @@ -387,7 +384,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Payments\SplitAmount $amount amount + * @param \Adyen\Model\Payments\SplitAmount|null $amount amount * * @return self */ @@ -414,7 +411,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description A description of this split. + * @param string|null $description Your description for the split item. * * @return self */ @@ -441,7 +438,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. + * @param string|null $reference Your reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. * * @return self */ @@ -468,7 +465,7 @@ public function getType() /** * Sets type * - * @param string $type The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. + * @param string $type The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. * * @return self */ diff --git a/src/Adyen/Model/Payments/SplitAmount.php b/src/Adyen/Model/Payments/SplitAmount.php index 7d5e37a1e..00d85409e 100644 --- a/src/Adyen/Model/Payments/SplitAmount.php +++ b/src/Adyen/Model/Payments/SplitAmount.php @@ -299,7 +299,7 @@ public function getCurrency() /** * Sets currency * - * @param string|null $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. + * @param string|null $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). By default, this is the original payment currency. * * @return self */ @@ -326,7 +326,7 @@ public function getValue() /** * Sets value * - * @param int $value The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param int $value The value of the split amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * * @return self */ diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index 8aa38aed4..5174a5d7e 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index b3ac37885..2bc5bfd7e 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -244,6 +244,8 @@ public function getModelName() public const CONTRACT_PAYOUT = 'PAYOUT'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; + public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; + public const TOKEN_SERVICE_TOKEN_SHARING = 'TOKEN_SHARING'; /** * Gets allowable values of the enum @@ -268,6 +270,8 @@ public function getTokenServiceAllowableValues() return [ self::TOKEN_SERVICE_VISATOKENSERVICE, self::TOKEN_SERVICE_MCTOKENSERVICE, + self::TOKEN_SERVICE_AMEXTOKENSERVICE, + self::TOKEN_SERVICE_TOKEN_SHARING, ]; } /** diff --git a/src/Adyen/Model/TransactionWebhooks/Amount.php b/src/Adyen/Model/TransactionWebhooks/Amount.php new file mode 100644 index 000000000..1e44cbc7c --- /dev/null +++ b/src/Adyen/Model/TransactionWebhooks/Amount.php @@ -0,0 +1,424 @@ + + */ +class Amount implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'currency' => 'currency', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * 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->setIfExists('currency', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets currency + * + * @return string + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setCurrency($currency) + { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets value + * + * @return int + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Transfers/JSONPath.php b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php similarity index 84% rename from src/Adyen/Model/Transfers/JSONPath.php rename to src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php index e6817687e..ab5bef17c 100644 --- a/src/Adyen/Model/Transfers/JSONPath.php +++ b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php @@ -1,7 +1,7 @@ */ -class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable +class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONPath'; + protected static $openAPIModelName = 'BalancePlatformNotificationResponse'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,7 +44,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'content' => 'string[]' + 'notificationResponse' => 'string' ]; /** @@ -55,7 +55,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'content' => null + 'notificationResponse' => null ]; /** @@ -64,7 +64,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'content' => false + 'notificationResponse' => false ]; /** @@ -153,7 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'content' => 'content' + 'notificationResponse' => 'notificationResponse' ]; /** @@ -162,7 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'content' => 'setContent' + 'notificationResponse' => 'setNotificationResponse' ]; /** @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'content' => 'getContent' + 'notificationResponse' => 'getNotificationResponse' ]; /** @@ -231,7 +231,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('notificationResponse', $data ?? [], null); } /** @@ -277,28 +277,28 @@ public function valid() /** - * Gets content + * Gets notificationResponse * - * @return string[]|null + * @return string|null */ - public function getContent() + public function getNotificationResponse() { - return $this->container['content']; + return $this->container['notificationResponse']; } /** - * Sets content + * Sets notificationResponse * - * @param string[]|null $content content + * @param string|null $notificationResponse Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). * * @return self */ - public function setContent($content) + public function setNotificationResponse($notificationResponse) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); + if (is_null($notificationResponse)) { + throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); } - $this->container['content'] = $content; + $this->container['notificationResponse'] = $notificationResponse; return $this; } diff --git a/src/Adyen/Model/TransactionWebhooks/ModelInterface.php b/src/Adyen/Model/TransactionWebhooks/ModelInterface.php new file mode 100644 index 000000000..c1c9c8901 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhooks/ModelInterface.php @@ -0,0 +1,92 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if (!in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach ($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) { + return $timestamp; + } + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if (is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (method_exists($class, 'getAllowableEnumValues')) { + if (!in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Adyen\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } +} diff --git a/src/Adyen/Model/TransactionWebhooks/Resource.php b/src/Adyen/Model/TransactionWebhooks/Resource.php new file mode 100644 index 000000000..b0d8fa0b8 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhooks/Resource.php @@ -0,0 +1,452 @@ + + */ +class Resource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Resource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balancePlatform' => 'string', + 'creationDate' => '\DateTime', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balancePlatform' => null, + 'creationDate' => 'date-time', + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balancePlatform' => false, + 'creationDate' => false, + 'id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'balancePlatform' => 'balancePlatform', + 'creationDate' => 'creationDate', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balancePlatform' => 'setBalancePlatform', + 'creationDate' => 'setCreationDate', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balancePlatform' => 'getBalancePlatform', + 'creationDate' => 'getCreationDate', + 'id' => 'getId' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balancePlatform + * + * @return string|null + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string|null $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php new file mode 100644 index 000000000..986f415f5 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php @@ -0,0 +1,452 @@ + + */ +class ResourceReference implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResourceReference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'description' => 'string', + 'id' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'description' => null, + 'id' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'description' => false, + 'id' => false, + 'reference' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'description' => 'description', + 'id' => 'id', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'description' => 'setDescription', + 'id' => 'setId', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'description' => 'getDescription', + 'id' => 'getId', + 'reference' => 'getReference' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the resource. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique identifier of the resource. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference for the resource. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/TransactionWebhooks/Transaction.php b/src/Adyen/Model/TransactionWebhooks/Transaction.php new file mode 100644 index 000000000..859520ba2 --- /dev/null +++ b/src/Adyen/Model/TransactionWebhooks/Transaction.php @@ -0,0 +1,747 @@ + + */ +class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Transaction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountHolder' => '\Adyen\Model\TransactionWebhooks\ResourceReference', + 'amount' => '\Adyen\Model\TransactionWebhooks\Amount', + 'balanceAccount' => '\Adyen\Model\TransactionWebhooks\ResourceReference', + 'balancePlatform' => 'string', + 'bookingDate' => '\DateTime', + 'creationDate' => '\DateTime', + 'id' => 'string', + 'status' => 'string', + 'transfer' => '\Adyen\Model\TransactionWebhooks\TransferData', + 'valueDate' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountHolder' => null, + 'amount' => null, + 'balanceAccount' => null, + 'balancePlatform' => null, + 'bookingDate' => 'date-time', + 'creationDate' => 'date-time', + 'id' => null, + 'status' => null, + 'transfer' => null, + 'valueDate' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountHolder' => false, + 'amount' => false, + 'balanceAccount' => false, + 'balancePlatform' => false, + 'bookingDate' => false, + 'creationDate' => false, + 'id' => false, + 'status' => false, + 'transfer' => false, + 'valueDate' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'accountHolder' => 'accountHolder', + 'amount' => 'amount', + 'balanceAccount' => 'balanceAccount', + 'balancePlatform' => 'balancePlatform', + 'bookingDate' => 'bookingDate', + 'creationDate' => 'creationDate', + 'id' => 'id', + 'status' => 'status', + 'transfer' => 'transfer', + 'valueDate' => 'valueDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountHolder' => 'setAccountHolder', + 'amount' => 'setAmount', + 'balanceAccount' => 'setBalanceAccount', + 'balancePlatform' => 'setBalancePlatform', + 'bookingDate' => 'setBookingDate', + 'creationDate' => 'setCreationDate', + 'id' => 'setId', + 'status' => 'setStatus', + 'transfer' => 'setTransfer', + 'valueDate' => 'setValueDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountHolder' => 'getAccountHolder', + 'amount' => 'getAmount', + 'balanceAccount' => 'getBalanceAccount', + 'balancePlatform' => 'getBalancePlatform', + 'bookingDate' => 'getBookingDate', + 'creationDate' => 'getCreationDate', + 'id' => 'getId', + 'status' => 'getStatus', + 'transfer' => 'getTransfer', + 'valueDate' => 'getValueDate' + ]; + + /** + * 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::$openAPIModelName; + } + + public const STATUS_BOOKED = 'booked'; + public const STATUS_PENDING = 'pending'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_BOOKED, + self::STATUS_PENDING, + ]; + } + /** + * 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->setIfExists('accountHolder', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('balanceAccount', $data ?? [], null); + $this->setIfExists('balancePlatform', $data ?? [], null); + $this->setIfExists('bookingDate', $data ?? [], null); + $this->setIfExists('creationDate', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('transfer', $data ?? [], null); + $this->setIfExists('valueDate', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['accountHolder'] === null) { + $invalidProperties[] = "'accountHolder' can't be null"; + } + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if ($this->container['balanceAccount'] === null) { + $invalidProperties[] = "'balanceAccount' can't be null"; + } + if ($this->container['balancePlatform'] === null) { + $invalidProperties[] = "'balancePlatform' can't be null"; + } + if ($this->container['bookingDate'] === null) { + $invalidProperties[] = "'bookingDate' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['valueDate'] === null) { + $invalidProperties[] = "'valueDate' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets accountHolder + * + * @return \Adyen\Model\TransactionWebhooks\ResourceReference + */ + public function getAccountHolder() + { + return $this->container['accountHolder']; + } + + /** + * Sets accountHolder + * + * @param \Adyen\Model\TransactionWebhooks\ResourceReference $accountHolder accountHolder + * + * @return self + */ + public function setAccountHolder($accountHolder) + { + if (is_null($accountHolder)) { + throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); + } + $this->container['accountHolder'] = $accountHolder; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\TransactionWebhooks\Amount + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\TransactionWebhooks\Amount $amount amount + * + * @return self + */ + public function setAmount($amount) + { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets balanceAccount + * + * @return \Adyen\Model\TransactionWebhooks\ResourceReference + */ + public function getBalanceAccount() + { + return $this->container['balanceAccount']; + } + + /** + * Sets balanceAccount + * + * @param \Adyen\Model\TransactionWebhooks\ResourceReference $balanceAccount balanceAccount + * + * @return self + */ + public function setBalanceAccount($balanceAccount) + { + if (is_null($balanceAccount)) { + throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); + } + $this->container['balanceAccount'] = $balanceAccount; + + return $this; + } + + /** + * Gets balancePlatform + * + * @return string + */ + public function getBalancePlatform() + { + return $this->container['balancePlatform']; + } + + /** + * Sets balancePlatform + * + * @param string $balancePlatform The unique identifier of the balance platform. + * + * @return self + */ + public function setBalancePlatform($balancePlatform) + { + if (is_null($balancePlatform)) { + throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); + } + $this->container['balancePlatform'] = $balancePlatform; + + return $this; + } + + /** + * Gets bookingDate + * + * @return \DateTime + */ + public function getBookingDate() + { + return $this->container['bookingDate']; + } + + /** + * Sets bookingDate + * + * @param \DateTime $bookingDate The date the transaction was booked into the balance account. + * + * @return self + */ + public function setBookingDate($bookingDate) + { + if (is_null($bookingDate)) { + throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); + } + $this->container['bookingDate'] = $bookingDate; + + return $this; + } + + /** + * Gets creationDate + * + * @return \DateTime|null + */ + public function getCreationDate() + { + return $this->container['creationDate']; + } + + /** + * Sets creationDate + * + * @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @return self + */ + public function setCreationDate($creationDate) + { + if (is_null($creationDate)) { + throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); + } + $this->container['creationDate'] = $creationDate; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The unique identifier of the transaction. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets transfer + * + * @return \Adyen\Model\TransactionWebhooks\TransferData|null + */ + public function getTransfer() + { + return $this->container['transfer']; + } + + /** + * Sets transfer + * + * @param \Adyen\Model\TransactionWebhooks\TransferData|null $transfer transfer + * + * @return self + */ + public function setTransfer($transfer) + { + if (is_null($transfer)) { + throw new \InvalidArgumentException('non-nullable transfer cannot be null'); + } + $this->container['transfer'] = $transfer; + + return $this; + } + + /** + * Gets valueDate + * + * @return \DateTime + */ + public function getValueDate() + { + return $this->container['valueDate']; + } + + /** + * Sets valueDate + * + * @param \DateTime $valueDate The date the transfer amount becomes available in the balance account. + * + * @return self + */ + public function setValueDate($valueDate) + { + if (is_null($valueDate)) { + throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); + } + $this->container['valueDate'] = $valueDate; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Disputes/DownloadDefenseDocumentRequest.php b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php similarity index 68% rename from src/Adyen/Model/Disputes/DownloadDefenseDocumentRequest.php rename to src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php index dcca98aff..92f173b7f 100644 --- a/src/Adyen/Model/Disputes/DownloadDefenseDocumentRequest.php +++ b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php @@ -1,9 +1,9 @@ */ -class DownloadDefenseDocumentRequest implements ModelInterface, ArrayAccess, \JsonSerializable +class TransactionNotificationRequestV4 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class DownloadDefenseDocumentRequest implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openAPIModelName = 'DownloadDefenseDocumentRequest'; + protected static $openAPIModelName = 'TransactionNotificationRequestV4'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,9 +44,9 @@ class DownloadDefenseDocumentRequest implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'defenseDocumentType' => 'string', - 'disputePspReference' => 'string', - 'merchantAccountCode' => 'string' + 'data' => '\Adyen\Model\TransactionWebhooks\Transaction', + 'environment' => 'string', + 'type' => 'string' ]; /** @@ -57,9 +57,9 @@ class DownloadDefenseDocumentRequest implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'defenseDocumentType' => null, - 'disputePspReference' => null, - 'merchantAccountCode' => null + 'data' => null, + 'environment' => null, + 'type' => null ]; /** @@ -68,9 +68,9 @@ class DownloadDefenseDocumentRequest implements ModelInterface, ArrayAccess, \Js * @var boolean[] */ protected static $openAPINullables = [ - 'defenseDocumentType' => false, - 'disputePspReference' => false, - 'merchantAccountCode' => false + 'data' => false, + 'environment' => false, + 'type' => false ]; /** @@ -159,9 +159,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'defenseDocumentType' => 'defenseDocumentType', - 'disputePspReference' => 'disputePspReference', - 'merchantAccountCode' => 'merchantAccountCode' + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' ]; /** @@ -170,9 +170,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'defenseDocumentType' => 'setDefenseDocumentType', - 'disputePspReference' => 'setDisputePspReference', - 'merchantAccountCode' => 'setMerchantAccountCode' + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' ]; /** @@ -181,9 +181,9 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'defenseDocumentType' => 'getDefenseDocumentType', - 'disputePspReference' => 'getDisputePspReference', - 'merchantAccountCode' => 'getMerchantAccountCode' + 'data' => 'getData', + 'environment' => 'getEnvironment', + 'type' => 'getType' ]; /** @@ -227,7 +227,19 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_BALANCE_PLATFORM_TRANSACTION_CREATED = 'balancePlatform.transaction.created'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_PLATFORM_TRANSACTION_CREATED, + ]; + } /** * Associative array for storing property values * @@ -243,9 +255,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('defenseDocumentType', $data ?? [], null); - $this->setIfExists('disputePspReference', $data ?? [], null); - $this->setIfExists('merchantAccountCode', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); } /** @@ -275,15 +287,21 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['defenseDocumentType'] === null) { - $invalidProperties[] = "'defenseDocumentType' can't be null"; + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; } - if ($this->container['disputePspReference'] === null) { - $invalidProperties[] = "'disputePspReference' can't be null"; + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' can't be null"; } - if ($this->container['merchantAccountCode'] === null) { - $invalidProperties[] = "'merchantAccountCode' can't be null"; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); } + return $invalidProperties; } @@ -300,82 +318,92 @@ public function valid() /** - * Gets defenseDocumentType + * Gets data * - * @return string + * @return \Adyen\Model\TransactionWebhooks\Transaction */ - public function getDefenseDocumentType() + public function getData() { - return $this->container['defenseDocumentType']; + return $this->container['data']; } /** - * Sets defenseDocumentType + * Sets data * - * @param string $defenseDocumentType The document type code of the defense document. + * @param \Adyen\Model\TransactionWebhooks\Transaction $data data * * @return self */ - public function setDefenseDocumentType($defenseDocumentType) + public function setData($data) { - if (is_null($defenseDocumentType)) { - throw new \InvalidArgumentException('non-nullable defenseDocumentType cannot be null'); + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); } - $this->container['defenseDocumentType'] = $defenseDocumentType; + $this->container['data'] = $data; return $this; } /** - * Gets disputePspReference + * Gets environment * * @return string */ - public function getDisputePspReference() + public function getEnvironment() { - return $this->container['disputePspReference']; + return $this->container['environment']; } /** - * Sets disputePspReference + * Sets environment * - * @param string $disputePspReference The PSP reference assigned to the dispute. + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. * * @return self */ - public function setDisputePspReference($disputePspReference) + public function setEnvironment($environment) { - if (is_null($disputePspReference)) { - throw new \InvalidArgumentException('non-nullable disputePspReference cannot be null'); + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); } - $this->container['disputePspReference'] = $disputePspReference; + $this->container['environment'] = $environment; return $this; } /** - * Gets merchantAccountCode + * Gets type * - * @return string + * @return string|null */ - public function getMerchantAccountCode() + public function getType() { - return $this->container['merchantAccountCode']; + return $this->container['type']; } /** - * Sets merchantAccountCode + * Sets type * - * @param string $merchantAccountCode The merchant account identifier, for which you want to process the dispute transaction. + * @param string|null $type Type of the webhook. * * @return self */ - public function setMerchantAccountCode($merchantAccountCode) + public function setType($type) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); } - $this->container['merchantAccountCode'] = $merchantAccountCode; + $this->container['type'] = $type; return $this; } diff --git a/src/Adyen/Model/Transfers/JSONObject.php b/src/Adyen/Model/TransactionWebhooks/TransferData.php similarity index 81% rename from src/Adyen/Model/Transfers/JSONObject.php rename to src/Adyen/Model/TransactionWebhooks/TransferData.php index 5efabb113..a6950e30e 100644 --- a/src/Adyen/Model/Transfers/JSONObject.php +++ b/src/Adyen/Model/TransactionWebhooks/TransferData.php @@ -1,7 +1,7 @@ */ -class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable +class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONObject'; + protected static $openAPIModelName = 'TransferData'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,8 +44,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\Transfers\JSONPath[]', - 'rootPath' => '\Adyen\Model\Transfers\JSONPath' + 'id' => 'string', + 'reference' => 'string' ]; /** @@ -56,8 +56,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'paths' => null, - 'rootPath' => null + 'id' => null, + 'reference' => null ]; /** @@ -66,8 +66,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'paths' => false, - 'rootPath' => false + 'id' => false, + 'reference' => false ]; /** @@ -156,8 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'paths' => 'paths', - 'rootPath' => 'rootPath' + 'id' => 'id', + 'reference' => 'reference' ]; /** @@ -166,8 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'paths' => 'setPaths', - 'rootPath' => 'setRootPath' + 'id' => 'setId', + 'reference' => 'setReference' ]; /** @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'paths' => 'getPaths', - 'rootPath' => 'getRootPath' + 'id' => 'getId', + 'reference' => 'getReference' ]; /** @@ -237,8 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('paths', $data ?? [], null); - $this->setIfExists('rootPath', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); } /** @@ -268,6 +268,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['reference'] === null) { + $invalidProperties[] = "'reference' can't be null"; + } return $invalidProperties; } @@ -284,55 +287,55 @@ public function valid() /** - * Gets paths + * Gets id * - * @return \Adyen\Model\Transfers\JSONPath[]|null + * @return string|null */ - public function getPaths() + public function getId() { - return $this->container['paths']; + return $this->container['id']; } /** - * Sets paths + * Sets id * - * @param \Adyen\Model\Transfers\JSONPath[]|null $paths paths + * @param string|null $id The ID of the resource. * * @return self */ - public function setPaths($paths) + public function setId($id) { - if (is_null($paths)) { - throw new \InvalidArgumentException('non-nullable paths cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['paths'] = $paths; + $this->container['id'] = $id; return $this; } /** - * Gets rootPath + * Gets reference * - * @return \Adyen\Model\Transfers\JSONPath|null + * @return string */ - public function getRootPath() + public function getReference() { - return $this->container['rootPath']; + return $this->container['reference']; } /** - * Sets rootPath + * Sets reference * - * @param \Adyen\Model\Transfers\JSONPath|null $rootPath rootPath + * @param string $reference The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. * * @return self */ - public function setRootPath($rootPath) + public function setReference($reference) { - if (is_null($rootPath)) { - throw new \InvalidArgumentException('non-nullable rootPath cannot be null'); + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); } - $this->container['rootPath'] = $rootPath; + $this->container['reference'] = $reference; return $this; } diff --git a/src/Adyen/Model/Transfers/RestServiceError.php b/src/Adyen/Model/Transfers/RestServiceError.php index d71acaa75..f561c550c 100644 --- a/src/Adyen/Model/Transfers/RestServiceError.php +++ b/src/Adyen/Model/Transfers/RestServiceError.php @@ -49,7 +49,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'instance' => 'string', 'invalidFields' => '\Adyen\Model\Transfers\InvalidField[]', 'requestId' => 'string', - 'response' => '\Adyen\Model\Transfers\JSONObject', + 'response' => 'object', 'status' => 'int', 'title' => 'string', 'type' => 'string' @@ -485,7 +485,7 @@ public function setRequestId($requestId) /** * Gets response * - * @return \Adyen\Model\Transfers\JSONObject|null + * @return object|null */ public function getResponse() { @@ -495,7 +495,7 @@ public function getResponse() /** * Sets response * - * @param \Adyen\Model\Transfers\JSONObject|null $response response + * @param object|null $response JSON response payload. * * @return self */ diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index 74bf449b5..d6b6e6ff1 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -50,7 +50,6 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable 'balancePlatform' => 'string', 'bookingDate' => '\DateTime', 'creationDate' => '\DateTime', - 'eventId' => 'string', 'id' => 'string', 'status' => 'string', 'transfer' => '\Adyen\Model\Transfers\TransferData', @@ -71,7 +70,6 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable 'balancePlatform' => null, 'bookingDate' => 'date-time', 'creationDate' => 'date-time', - 'eventId' => null, 'id' => null, 'status' => null, 'transfer' => null, @@ -90,7 +88,6 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable 'balancePlatform' => false, 'bookingDate' => false, 'creationDate' => false, - 'eventId' => false, 'id' => false, 'status' => false, 'transfer' => false, @@ -189,7 +186,6 @@ public function isNullableSetToNull(string $property): bool 'balancePlatform' => 'balancePlatform', 'bookingDate' => 'bookingDate', 'creationDate' => 'creationDate', - 'eventId' => 'eventId', 'id' => 'id', 'status' => 'status', 'transfer' => 'transfer', @@ -208,7 +204,6 @@ public function isNullableSetToNull(string $property): bool 'balancePlatform' => 'setBalancePlatform', 'bookingDate' => 'setBookingDate', 'creationDate' => 'setCreationDate', - 'eventId' => 'setEventId', 'id' => 'setId', 'status' => 'setStatus', 'transfer' => 'setTransfer', @@ -227,7 +222,6 @@ public function isNullableSetToNull(string $property): bool 'balancePlatform' => 'getBalancePlatform', 'bookingDate' => 'getBookingDate', 'creationDate' => 'getCreationDate', - 'eventId' => 'getEventId', 'id' => 'getId', 'status' => 'getStatus', 'transfer' => 'getTransfer', @@ -311,7 +305,6 @@ public function __construct(array $data = null) $this->setIfExists('balancePlatform', $data ?? [], null); $this->setIfExists('bookingDate', $data ?? [], null); $this->setIfExists('creationDate', $data ?? [], null); - $this->setIfExists('eventId', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('transfer', $data ?? [], null); @@ -555,33 +548,6 @@ public function setCreationDate($creationDate) return $this; } - /** - * Gets eventId - * - * @return string|null - */ - public function getEventId() - { - return $this->container['eventId']; - } - - /** - * Sets eventId - * - * @param string|null $eventId The PSP reference of the transaction in the journal. - * - * @return self - */ - public function setEventId($eventId) - { - if (is_null($eventId)) { - throw new \InvalidArgumentException('non-nullable eventId cannot be null'); - } - $this->container['eventId'] = $eventId; - - return $this; - } - /** * Gets id * diff --git a/src/Adyen/Service.php b/src/Adyen/Service.php index 935008b42..424fdc38e 100644 --- a/src/Adyen/Service.php +++ b/src/Adyen/Service.php @@ -87,7 +87,11 @@ function ($val) { $url .= '?' . http_build_query($queryParams); } - return $curlClient->requestHttp($this, $url, $bodyParams, $method, $requestOptions); + $response = $curlClient->requestHttp($this, $url, $bodyParams, $method, $requestOptions); + if (!is_array($response)) { + return []; + } + return $response; } /** diff --git a/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php b/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php index 07b167c3a..dfcf60197 100644 --- a/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php +++ b/src/Adyen/Service/BalancePlatform/AccountHoldersApi.php @@ -69,6 +69,21 @@ public function getAllBalanceAccountsOfAccountHolder(string $id, array $requestO return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\PaginatedBalanceAccountsResponse::class); } + /** + * Get a tax form + * + * @param string $id + * @param array|null $requestOptions ['queryParams' => ['formType'=> string, 'year'=> int]] + * @return \Adyen\Model\BalancePlatform\GetTaxFormResponse + * @throws AdyenException + */ + public function getTaxForm(string $id, array $requestOptions = null): \Adyen\Model\BalancePlatform\GetTaxFormResponse + { + $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/accountHolders/{id}/taxForms"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\GetTaxFormResponse::class); + } + /** * Update an account holder * diff --git a/src/Adyen/Service/BankingWebhookParser.php b/src/Adyen/Service/BankingWebhookParser.php index 5a3e5b301..c537cfe8e 100644 --- a/src/Adyen/Service/BankingWebhookParser.php +++ b/src/Adyen/Service/BankingWebhookParser.php @@ -9,7 +9,10 @@ use Adyen\Model\ConfigurationWebhooks\PaymentNotificationRequest; use Adyen\Model\ConfigurationWebhooks\SweepConfigurationNotificationRequest; use Adyen\Model\ReportWebhooks\ReportNotificationRequest; +use Adyen\Model\TransactionWebhooks\TransactionNotificationRequestV4; use Adyen\Model\TransferWebhooks\TransferNotificationRequest; +use Exception; +use PhpParser\Error; class BankingWebhookParser { @@ -22,8 +25,12 @@ public function __construct(string $payload) public function getGenericWebhook() { - $jsonPayload = json_decode($this->payload, true); - $type = $jsonPayload['type']; + $jsonPayload = (array)json_decode($this->payload, true); + try { + $type = $jsonPayload['type']; + } catch (Exception $ex) { + throw new Error("'type' attribute not found in payload: " . $this->payload); + } if (in_array($type, ($clazz = new AuthenticationNotificationRequest())->getTypeAllowableValues())) { return (object)$this->deserializewebhook($clazz); @@ -53,8 +60,12 @@ public function getGenericWebhook() return(object)self::deserializeWebhook($clazz); } + if (in_array($type, ($clazz = new TransactionNotificationRequestV4())->getTypeAllowableValues())) { + return(object)self::deserializeWebhook($clazz); + } + // throw error in case the webhook can not be parsed - throw new \Error("Could not parse the payload:" . $this->payload); + throw new \Error("Could not parse the payload: " . $this->payload); } /** @noinspection PhpIncompatibleReturnTypeInspection */ @@ -99,6 +110,12 @@ public function getTransferNotificationRequest(): TransferNotificationRequest return $this->getGenericWebhook(); } + /** @noinspection PhpIncompatibleReturnTypeInspection */ + public function getTransactionNotificationRequestV4(): TransactionNotificationRequestV4 + { + return $this->getGenericWebhook(); + } + private function deserializeWebhook($clazz) { return ObjectSerializer::deserialize($this->payload, get_class($clazz)); diff --git a/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php b/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php index 1ed20430e..1e113d8b1 100644 --- a/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php +++ b/src/Adyen/Service/Checkout/ClassicCheckoutSDKApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/Checkout/ModificationsApi.php b/src/Adyen/Service/Checkout/ModificationsApi.php index 48dce4dcb..17c3d4d95 100644 --- a/src/Adyen/Service/Checkout/ModificationsApi.php +++ b/src/Adyen/Service/Checkout/ModificationsApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/Checkout/OrdersApi.php b/src/Adyen/Service/Checkout/OrdersApi.php index a7df0fcad..718453537 100644 --- a/src/Adyen/Service/Checkout/OrdersApi.php +++ b/src/Adyen/Service/Checkout/OrdersApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/Checkout/PaymentLinksApi.php b/src/Adyen/Service/Checkout/PaymentLinksApi.php index 79ffcbee9..195d7765f 100644 --- a/src/Adyen/Service/Checkout/PaymentLinksApi.php +++ b/src/Adyen/Service/Checkout/PaymentLinksApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/Checkout/PaymentsApi.php b/src/Adyen/Service/Checkout/PaymentsApi.php index 823b1319a..262c05e8c 100644 --- a/src/Adyen/Service/Checkout/PaymentsApi.php +++ b/src/Adyen/Service/Checkout/PaymentsApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 652995197..58ef0e9df 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index 09605340b..c467b1b20 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -2,7 +2,7 @@ /** * Adyen Checkout API * - * The version of the OpenAPI document: 70 + * The version of the OpenAPI document: 71 * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.4.0 * @@ -36,7 +36,7 @@ public function __construct(Client $client) parent::__construct($client); // Create the baseUrl based on live/test and optional live-url-prefix - $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v70"); + $this->baseURL = $this->createBaseUrl("https://checkout-test.adyen.com/v71"); } /** diff --git a/src/Adyen/Service/DisputesApi.php b/src/Adyen/Service/DisputesApi.php index a4dde8f86..040f8a71d 100644 --- a/src/Adyen/Service/DisputesApi.php +++ b/src/Adyen/Service/DisputesApi.php @@ -83,21 +83,6 @@ public function deleteDisputeDefenseDocument(\Adyen\Model\Disputes\DeleteDefense return ObjectSerializer::deserialize($response, \Adyen\Model\Disputes\DeleteDefenseDocumentResponse::class); } - /** - * Download a defense document - * - * @param \Adyen\Model\Disputes\DownloadDefenseDocumentRequest $downloadDefenseDocumentRequest - * @param array|null $requestOptions - * @return \Adyen\Model\Disputes\DownloadDefenseDocumentResponse - * @throws AdyenException - */ - public function downloadDisputeDefenseDocument(\Adyen\Model\Disputes\DownloadDefenseDocumentRequest $downloadDefenseDocumentRequest, array $requestOptions = null): \Adyen\Model\Disputes\DownloadDefenseDocumentResponse - { - $endpoint = $this->baseURL . "/downloadDisputeDefenseDocument"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $downloadDefenseDocumentRequest->jsonSerialize(), $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Disputes\DownloadDefenseDocumentResponse::class); - } - /** * Get applicable defense reasons * diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 76c0535d9..f6c93f4f5 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -110,4 +110,18 @@ public function addAllowedOrigin(\Adyen\Model\Management\CreateAllowedOriginRequ $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createAllowedOriginRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AllowedOrigin::class); } + + /** + * Generate a client key + * + * @param array|null $requestOptions + * @return \Adyen\Model\Management\GenerateClientKeyResponse + * @throws AdyenException + */ + public function generateClientKey(array $requestOptions = null): \Adyen\Model\Management\GenerateClientKeyResponse + { + $endpoint = $this->baseURL . "/me/generateClientKey"; + $response = $this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\GenerateClientKeyResponse::class); + } } diff --git a/src/Adyen/Service/Payments/GeneralApi.php b/src/Adyen/Service/Payments/PaymentsApi.php similarity index 98% rename from src/Adyen/Service/Payments/GeneralApi.php rename to src/Adyen/Service/Payments/PaymentsApi.php index b72bfc5d2..dcc42cf29 100644 --- a/src/Adyen/Service/Payments/GeneralApi.php +++ b/src/Adyen/Service/Payments/PaymentsApi.php @@ -18,7 +18,7 @@ use Adyen\Service; use Adyen\Model\Payments\ObjectSerializer; -class GeneralApi extends Service +class PaymentsApi extends Service { /** * @var array|string|string[] @@ -26,7 +26,7 @@ class GeneralApi extends Service private $baseURL; /** - * GeneralApi constructor. + * PaymentsApi constructor. * * @param \Adyen\Client $client * @throws AdyenException diff --git a/tests/Resources/ModelBasedCheckout/deleteStoredPaymentMethods-success.json b/tests/Resources/ModelBasedCheckout/deleteStoredPaymentMethods-success.json deleted file mode 100644 index 06140bd85..000000000 --- a/tests/Resources/ModelBasedCheckout/deleteStoredPaymentMethods-success.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "brand": "string", - "expiryMonth": "string", - "expiryYear": "string", - "externalResponseCode": "string", - "externalTokenReference": "string", - "holderName": "string", - "iban": "string", - "id": "CS16116100127511AF", - "issuerName": "string", - "lastFour": "string", - "name": "string", - "networkTxReference": "networkRef", - "ownerName": "string", - "shopperEmail": "string", - "shopperReference": "string", - "supportedRecurringProcessingModels": [ - "string" - ], - "type": "string" -} \ No newline at end of file diff --git a/tests/Resources/Notification/transaction-webhook.json b/tests/Resources/Notification/transaction-webhook.json new file mode 100644 index 000000000..4f0cb0926 --- /dev/null +++ b/tests/Resources/Notification/transaction-webhook.json @@ -0,0 +1,30 @@ +{ + "data": { + "id": "EVJN42272224222B5JB8BRC84N686ZEUR", + "amount": { + "value": 7000, + "currency": "EUR" + }, + "status": "booked", + "transfer": { + "id": "JN4227222422265", + "reference": "Split_item_1" + }, + "valueDate": "2023-03-01T00:00:00+02:00", + "bookingDate": "2023-02-28T13:30:20+02:00", + "creationDate": "2023-02-28T13:30:05+02:00", + "accountHolder": { + "id": "AH00000000000000000000001", + "description": "Your description for the account holder", + "reference": "Your reference for the account holder" + }, + "balanceAccount": { + "id": "BA00000000000000000000001", + "description": "Your description for the balance account", + "reference": "Your reference for the balance account" + }, + "balancePlatform": "YOUR_BALANCE_PLATFORM" + }, + "environment": "test", + "type": "balancePlatform.transaction.created" +} \ No newline at end of file diff --git a/tests/Unit/ModelBasedCheckoutTest.php b/tests/Unit/ModelBasedCheckoutTest.php index e219d1d61..1e0cbb5dc 100644 --- a/tests/Unit/ModelBasedCheckoutTest.php +++ b/tests/Unit/ModelBasedCheckoutTest.php @@ -1,17 +1,14 @@ -createMockClient($jsonFile, $httpStatus); + $client = $this->createMockClient(null, 204); $service = new RecurringApi($client); $service->deleteTokenForStoredPaymentDetails("123"); - } - public static function successDeleteStoredPaymentMethodsProvider() - { - return array( - array('tests/Resources/ModelBasedCheckout/deleteStoredPaymentMethods-success.json', 200), - ); + $this->assertTrue(true, 'no exception'); } public function testPaymentMethodSerialization() diff --git a/tests/Unit/ModelBasedPaymentsTest.php b/tests/Unit/ModelBasedPaymentsTest.php index 5d4dc787c..923740bd3 100644 --- a/tests/Unit/ModelBasedPaymentsTest.php +++ b/tests/Unit/ModelBasedPaymentsTest.php @@ -2,17 +2,13 @@ namespace Adyen\Tests\Unit; -use Adyen\AdyenException; -use Adyen\ConnectionException; use Adyen\Model\Payments\AdjustAuthorisationRequest; use Adyen\Model\Payments\CancelRequest; use Adyen\Model\Payments\PaymentRequest; use Adyen\Model\Payments\PaymentRequest3d; use Adyen\Model\Payments\PaymentRequest3ds2; -use Adyen\Service\Payments\GeneralApi; use Adyen\Service\Payments\ModificationsApi; -use Monolog\Handler\TestHandler; -use Monolog\Logger; +use Adyen\Service\Payments\PaymentsApi; class ModelBasedPaymentsTest extends TestCaseMock { @@ -25,7 +21,7 @@ public function testAuthoriseSuccess($jsonFile, $httpStatus) $client = $this->createMockClient($jsonFile, $httpStatus); // initialize service - $service = new GeneralApi($client); + $service = new PaymentsApi($client); $result = $service->authorise(new PaymentRequest()); @@ -50,7 +46,7 @@ public function testAuthorise3dSuccess($jsonFile, $httpStatus) $client = $this->createMockClient($jsonFile, $httpStatus); // initialize service - $service = new GeneralApi($client); + $service = new PaymentsApi($client); $result = $service->authorise3d(new PaymentRequest3d()); @@ -74,7 +70,7 @@ public function testAuthorise3ds2Success($jsonFile, $httpStatus) $client = $this->createMockClient($jsonFile, $httpStatus); // initialize service - $service = new GeneralApi($client); + $service = new PaymentsApi($client); $result = $service->authorise3ds2(new PaymentRequest3ds2()); diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.php index c936b94b3..18326313a 100644 --- a/tests/Unit/NotificationTest.php +++ b/tests/Unit/NotificationTest.php @@ -26,6 +26,7 @@ use Adyen\Model\ConfigurationWebhooks\SweepConfigurationNotificationRequest; use Adyen\Model\ManagementWebhooks\PaymentMethodCreatedNotificationRequest; use Adyen\Model\AcsWebhooks\AuthenticationNotificationRequest; +use Adyen\Model\TransactionWebhooks\TransactionNotificationRequestV4; use Adyen\Service\BankingWebhookParser; use Adyen\Service\ManagementWebhookParser; use Adyen\Service\Notification; @@ -343,6 +344,23 @@ public function testBankingWebhookParserAuthenticationRequest() self::assertEquals(AuthenticationNotificationRequest::class, get_class($result)); self::assertEquals($webhookParser->getAuthenticationNotificationRequest(), $result); $authenticationRequest = new AuthenticationNotificationRequest(); - self::assertEquals($authenticationRequest->getTypeAllowableValues()[0], $webhookParser->getAuthenticationNotificationRequest()->getType()); + self::assertEquals( + $authenticationRequest->getTypeAllowableValues()[0], + $webhookParser->getAuthenticationNotificationRequest()->getType() + ); + } + + public function testBankingWebhookParserTransactionV4Webhook() + { + $jsonString = file_get_contents("tests/Resources/Notification/transaction-webhook.json", true); + $webhookParser = new BankingWebhookParser($jsonString); + $result = $webhookParser->getGenericWebhook(); + self::assertEquals(TransactionNotificationRequestV4::class, get_class($result)); + self::assertEquals($webhookParser->getTransactionNotificationRequestV4(), $result); + $authenticationRequest = new TransactionNotificationRequestV4(); + self::assertEquals( + $authenticationRequest->getTypeAllowableValues()[0], + $webhookParser->getTransactionNotificationRequestV4()->getType() + ); } }