From 76f963be0727774dd63b7ea6dc4b27f09895c168 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:51:47 +0200 Subject: [PATCH] Update models+services (#500) * [create-pull-request] automated change * Revert breaking changes * small fix * fix ut * small refactor fix --------- Co-authored-by: jilling --- src/Adyen/Model/Checkout/AfterpayDetails.php | 2 + .../Model/Checkout/BalanceCheckRequest.php | 2 +- .../Model/Checkout/DonationPaymentRequest.php | 2 +- src/Adyen/Model/Checkout/PaymentDetails.php | 2 - src/Adyen/Model/Checkout/PaymentRequest.php | 2 +- .../Model/Checkout/PaymentSetupRequest.php | 2 +- .../Model/Checkout/ThreeDSRequestData.php | 4 +- .../AcceptTermsOfServiceResponse.php | 2 +- .../GetTermsOfServiceDocumentRequest.php | 2 +- .../GetTermsOfServiceDocumentResponse.php | 2 +- src/Adyen/Model/Payments/PaymentRequest.php | 2 +- src/Adyen/Model/Payments/PaymentRequest3d.php | 2 +- .../Model/Payments/PaymentRequest3ds2.php | 2 +- .../BankAccountV3AccountIdentification.php | 58 +- .../HKLocalAccountIdentification.php | 38 +- src/Adyen/Model/Transfers/MerchantData.php | 34 ++ .../NZLocalAccountIdentification.php | 76 +-- src/Adyen/Model/Transfers/ServiceError.php | 518 ++++++++++++++++++ src/Adyen/Model/Transfers/Transaction.php | 26 +- src/Adyen/Model/Transfers/Transfer.php | 18 +- src/Adyen/Model/Transfers/TransferInfo.php | 34 -- .../BalancePlatform/BalanceAccountsApi.php | 6 +- .../BalancePlatform/TransferRoutesApi.php | 56 ++ src/Adyen/Service/Checkout/RecurringApi.php | 7 +- .../AndroidFilesCompanyLevelApi.php | 87 +++ .../TerminalActionsCompanyLevelApi.php | 30 - tests/Unit/ModelBasedCheckoutTest.php | 5 +- 27 files changed, 794 insertions(+), 227 deletions(-) create mode 100644 src/Adyen/Model/Transfers/ServiceError.php create mode 100644 src/Adyen/Service/BalancePlatform/TransferRoutesApi.php create mode 100644 src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index c2b466731..b4b02d494 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -254,6 +254,7 @@ public function getModelName() public const TYPE_AFTERPAY_DEFAULT = 'afterpay_default'; public const TYPE_AFTERPAYTOUCH = 'afterpaytouch'; public const TYPE_AFTERPAY_B2B = 'afterpay_b2b'; + public const TYPE_CLEARPAY = 'clearpay'; /** * Gets allowable values of the enum @@ -266,6 +267,7 @@ public function getTypeAllowableValues() self::TYPE_AFTERPAY_DEFAULT, self::TYPE_AFTERPAYTOUCH, self::TYPE_AFTERPAY_B2B, + self::TYPE_CLEARPAY, ]; } /** diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index f2785821d..ff890aee1 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -1052,7 +1052,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 9ae6de6cc..566e4c719 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -1836,7 +1836,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index aafa58ece..a71b5f3ca 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -277,7 +277,6 @@ public function getModelName() public const TYPE_KNET = 'knet'; public const TYPE_OMANNET = 'omannet'; public const TYPE_GOPAY_WALLET = 'gopay_wallet'; - public const TYPE_POLI = 'poli'; public const TYPE_KCP_NAVERPAY = 'kcp_naverpay'; public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; public const TYPE_FAWRY = 'fawry'; @@ -374,7 +373,6 @@ public function getTypeAllowableValues() self::TYPE_KNET, self::TYPE_OMANNET, self::TYPE_GOPAY_WALLET, - self::TYPE_POLI, self::TYPE_KCP_NAVERPAY, self::TYPE_ONLINEBANKING_IN, self::TYPE_FAWRY, diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index e1818857c..7d6e6d4b7 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -1731,7 +1731,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index ff447481c..7ec31a941 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -1457,7 +1457,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Checkout/ThreeDSRequestData.php b/src/Adyen/Model/Checkout/ThreeDSRequestData.php index f292fc144..8dafba716 100644 --- a/src/Adyen/Model/Checkout/ThreeDSRequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDSRequestData.php @@ -241,8 +241,8 @@ public function getModelName() public const DATA_ONLY_FALSE = 'false'; public const DATA_ONLY_TRUE = 'true'; public const NATIVE_THREE_DS_PREFERRED = 'preferred'; - public const THREE_DS_VERSION__1_0 = 'V_2_1_0'; - public const THREE_DS_VERSION__2_0 = 'V_2_2_0'; + public const THREE_DS_VERSION__1_0 = '2.1.0'; + public const THREE_DS_VERSION__2_0 = '2.2.0'; /** * Gets allowable values of the enum diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php index ecad223f4..ef4ded0f7 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php @@ -438,7 +438,7 @@ public function getLanguage() /** * Sets language * - * @param string|null $language The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * @param string|null $language The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index 9fd144c1f..3a12d63f3 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -335,7 +335,7 @@ public function getLanguage() /** * Sets language * - * @param string $language The language to be used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * @param string $language The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index 9cb834428..61183af4b 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -404,7 +404,7 @@ public function getLanguage() /** * Sets language * - * @param string|null $language The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * @param string|null $language The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index 056773951..b012bd672 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -1341,7 +1341,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index b5a339252..38dc9d05a 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -1059,7 +1059,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index 36d20a664..85071c929 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -1059,7 +1059,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @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. * * @return self */ diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index 939de4326..81f3a0aa8 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -53,8 +53,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => 'string', 'institutionNumber' => 'string', 'transitNumber' => 'string', + 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\Transfers\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -78,8 +78,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => null, 'institutionNumber' => null, 'transitNumber' => null, + 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -101,8 +101,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => false, 'institutionNumber' => false, 'transitNumber' => false, + 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -204,8 +204,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'accountType', 'institutionNumber' => 'institutionNumber', 'transitNumber' => 'transitNumber', + 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -227,8 +227,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'setAccountType', 'institutionNumber' => 'setInstitutionNumber', 'transitNumber' => 'setTransitNumber', + 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -250,8 +250,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'getAccountType', 'institutionNumber' => 'getInstitutionNumber', 'transitNumber' => 'getTransitNumber', + 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -323,8 +323,8 @@ public function __construct(array $data = null) $this->setIfExists('accountType', $data ?? [], 'checking'); $this->setIfExists('institutionNumber', $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); @@ -382,12 +382,12 @@ public function listInvalidProperties() if ($this->container['transitNumber'] === null) { $invalidProperties[] = "'transitNumber' can't be null"; } + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; + } 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"; } @@ -509,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 */ @@ -632,55 +632,55 @@ public function setTransitNumber($transitNumber) } /** - * Gets iban + * Gets clearingCode * * @return string */ - public function getIban() + public function getClearingCode() { - return $this->container['iban']; + return $this->container['clearingCode']; } /** - * Sets iban + * Sets clearingCode * - * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. * * @return self */ - public function setIban($iban) + public function setClearingCode($clearingCode) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); } - $this->container['iban'] = $iban; + $this->container['clearingCode'] = $clearingCode; return $this; } /** - * Gets accountSuffix + * Gets iban * * @return string */ - public function getAccountSuffix() + public function getIban() { - return $this->container['accountSuffix']; + return $this->container['iban']; } /** - * Sets accountSuffix + * Sets iban * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. * * @return self */ - public function setAccountSuffix($accountSuffix) + public function setIban($iban) { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); } - $this->container['accountSuffix'] = $accountSuffix; + $this->container['iban'] = $iban; return $this; } diff --git a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php index dd4935f46..fedb90d28 100644 --- a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php @@ -45,7 +45,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'bankCode' => 'string', + 'clearingCode' => 'string', 'type' => 'string' ]; @@ -58,7 +58,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'bankCode' => null, + 'clearingCode' => null, 'type' => null ]; @@ -69,7 +69,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'bankCode' => false, + 'clearingCode' => false, 'type' => false ]; @@ -160,7 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'bankCode' => 'bankCode', + 'clearingCode' => 'clearingCode', 'type' => 'type' ]; @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'bankCode' => 'setBankCode', + 'clearingCode' => 'setClearingCode', 'type' => 'setType' ]; @@ -182,7 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'bankCode' => 'getBankCode', + 'clearingCode' => 'getClearingCode', 'type' => 'getType' ]; @@ -256,7 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'hkLocal'); } @@ -290,8 +290,8 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ @@ -348,28 +348,28 @@ public function setAccountNumber($accountNumber) } /** - * Gets bankCode + * Gets clearingCode * * @return string */ - public function getBankCode() + public function getClearingCode() { - return $this->container['bankCode']; + return $this->container['clearingCode']; } /** - * Sets bankCode + * Sets clearingCode * - * @param string $bankCode The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. * * @return self */ - public function setBankCode($bankCode) + public function setClearingCode($clearingCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); } - $this->container['bankCode'] = $bankCode; + $this->container['clearingCode'] = $clearingCode; return $this; } diff --git a/src/Adyen/Model/Transfers/MerchantData.php b/src/Adyen/Model/Transfers/MerchantData.php index 3efd60ef7..d7a9fdfc8 100644 --- a/src/Adyen/Model/Transfers/MerchantData.php +++ b/src/Adyen/Model/Transfers/MerchantData.php @@ -44,6 +44,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'acquirerId' => 'string', 'mcc' => 'string', 'merchantId' => 'string', 'nameLocation' => '\Adyen\Model\Transfers\NameLocation', @@ -58,6 +59,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'acquirerId' => null, 'mcc' => null, 'merchantId' => null, 'nameLocation' => null, @@ -70,6 +72,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'acquirerId' => false, 'mcc' => false, 'merchantId' => false, 'nameLocation' => false, @@ -162,6 +165,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'acquirerId' => 'acquirerId', 'mcc' => 'mcc', 'merchantId' => 'merchantId', 'nameLocation' => 'nameLocation', @@ -174,6 +178,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'acquirerId' => 'setAcquirerId', 'mcc' => 'setMcc', 'merchantId' => 'setMerchantId', 'nameLocation' => 'setNameLocation', @@ -186,6 +191,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'acquirerId' => 'getAcquirerId', 'mcc' => 'getMcc', 'merchantId' => 'getMerchantId', 'nameLocation' => 'getNameLocation', @@ -249,6 +255,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('acquirerId', $data ?? [], null); $this->setIfExists('mcc', $data ?? [], null); $this->setIfExists('merchantId', $data ?? [], null); $this->setIfExists('nameLocation', $data ?? [], null); @@ -297,6 +304,33 @@ public function valid() } + /** + * Gets acquirerId + * + * @return string|null + */ + public function getAcquirerId() + { + return $this->container['acquirerId']; + } + + /** + * Sets acquirerId + * + * @param string|null $acquirerId The unique identifier of the merchant's acquirer. + * + * @return self + */ + public function setAcquirerId($acquirerId) + { + if (is_null($acquirerId)) { + throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); + } + $this->container['acquirerId'] = $acquirerId; + + return $this; + } + /** * Gets mcc * diff --git a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php index 02bf8a23c..6ca0f3164 100644 --- a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/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/Transfers/ServiceError.php b/src/Adyen/Model/Transfers/ServiceError.php new file mode 100644 index 000000000..48851d763 --- /dev/null +++ b/src/Adyen/Model/Transfers/ServiceError.php @@ -0,0 +1,518 @@ + + */ +class ServiceError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServiceError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'errorCode' => 'string', + 'errorType' => 'string', + 'message' => 'string', + 'pspReference' => 'string', + 'status' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'errorCode' => null, + 'errorType' => null, + 'message' => null, + 'pspReference' => null, + 'status' => 'int32' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'errorCode' => false, + 'errorType' => false, + 'message' => false, + 'pspReference' => false, + 'status' => true + ]; + + /** + * 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 = [ + 'errorCode' => 'errorCode', + 'errorType' => 'errorType', + 'message' => 'message', + 'pspReference' => 'pspReference', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'errorCode' => 'setErrorCode', + 'errorType' => 'setErrorType', + 'message' => 'setMessage', + 'pspReference' => 'setPspReference', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'errorCode' => 'getErrorCode', + 'errorType' => 'getErrorType', + 'message' => 'getMessage', + 'pspReference' => 'getPspReference', + 'status' => 'getStatus' + ]; + + /** + * 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('errorCode', $data ?? [], null); + $this->setIfExists('errorType', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('pspReference', $data ?? [], null); + $this->setIfExists('status', $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 errorCode + * + * @return string|null + */ + public function getErrorCode() + { + return $this->container['errorCode']; + } + + /** + * Sets errorCode + * + * @param string|null $errorCode The error code mapped to the error message. + * + * @return self + */ + public function setErrorCode($errorCode) + { + if (is_null($errorCode)) { + throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); + } + $this->container['errorCode'] = $errorCode; + + return $this; + } + + /** + * Gets errorType + * + * @return string|null + */ + public function getErrorType() + { + return $this->container['errorType']; + } + + /** + * Sets errorType + * + * @param string|null $errorType The category of the error. + * + * @return self + */ + public function setErrorType($errorType) + { + if (is_null($errorType)) { + throw new \InvalidArgumentException('non-nullable errorType cannot be null'); + } + $this->container['errorType'] = $errorType; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message A short explanation of the issue. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets pspReference + * + * @return string|null + */ + public function getPspReference() + { + return $this->container['pspReference']; + } + + /** + * Sets pspReference + * + * @param string|null $pspReference The PSP reference of the payment. + * + * @return self + */ + public function setPspReference($pspReference) + { + if (is_null($pspReference)) { + throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); + } + $this->container['pspReference'] = $pspReference; + + return $this; + } + + /** + * Gets status + * + * @return int|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status The HTTP response status. + * + * @return self + */ + public function setStatus($status) + { + // Do nothing for nullable integers + $this->container['status'] = $status; + + 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/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index 934086e72..f915158db 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -336,18 +336,25 @@ 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 STATUS_BOOKED = 'booked'; public const STATUS_PENDING = 'pending'; public const TYPE_ATM_WITHDRAWAL = 'atmWithdrawal'; public const TYPE_ATM_WITHDRAWAL_REVERSAL = 'atmWithdrawalReversal'; public const TYPE_BALANCE_ADJUSTMENT = 'balanceAdjustment'; + public const TYPE_BALANCE_MIGRATION = 'balanceMigration'; public const TYPE_BALANCE_ROLLOVER = 'balanceRollover'; public const TYPE_BANK_TRANSFER = 'bankTransfer'; public const TYPE_CAPTURE = 'capture'; public const TYPE_CAPTURE_REVERSAL = 'captureReversal'; public const TYPE_CARD_TRANSFER = 'cardTransfer'; + public const TYPE_CASH_OUT_FEE = 'cashOutFee'; + public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; + public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; public const TYPE_CHARGEBACK = 'chargeback'; + public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; + public const TYPE_CHARGEBACK_REVERSAL_CORRECTION = 'chargebackReversalCorrection'; public const TYPE_DEPOSIT_CORRECTION = 'depositCorrection'; public const TYPE_FEE = 'fee'; public const TYPE_GRANT = 'grant'; @@ -365,6 +372,7 @@ public function getModelName() public const TYPE_REPAYMENT = 'repayment'; public const TYPE_RESERVE_ADJUSTMENT = 'reserveAdjustment'; public const TYPE_SECOND_CHARGEBACK = 'secondChargeback'; + public const TYPE_SECOND_CHARGEBACK_CORRECTION = 'secondChargebackCorrection'; /** * Gets allowable values of the enum @@ -381,6 +389,7 @@ public function getCategoryAllowableValues() self::CATEGORY_ISSUED_CARD, self::CATEGORY_MIGRATION, self::CATEGORY_PLATFORM_PAYMENT, + self::CATEGORY_UPGRADE, ]; } /** @@ -406,13 +415,19 @@ public function getTypeAllowableValues() self::TYPE_ATM_WITHDRAWAL, self::TYPE_ATM_WITHDRAWAL_REVERSAL, self::TYPE_BALANCE_ADJUSTMENT, + self::TYPE_BALANCE_MIGRATION, self::TYPE_BALANCE_ROLLOVER, self::TYPE_BANK_TRANSFER, self::TYPE_CAPTURE, self::TYPE_CAPTURE_REVERSAL, self::TYPE_CARD_TRANSFER, + self::TYPE_CASH_OUT_FEE, + self::TYPE_CASH_OUT_FUNDING, + self::TYPE_CASH_OUT_INSTRUCTION, self::TYPE_CHARGEBACK, + self::TYPE_CHARGEBACK_CORRECTION, self::TYPE_CHARGEBACK_REVERSAL, + self::TYPE_CHARGEBACK_REVERSAL_CORRECTION, self::TYPE_DEPOSIT_CORRECTION, self::TYPE_FEE, self::TYPE_GRANT, @@ -430,6 +445,7 @@ public function getTypeAllowableValues() self::TYPE_REPAYMENT, self::TYPE_RESERVE_ADJUSTMENT, self::TYPE_SECOND_CHARGEBACK, + self::TYPE_SECOND_CHARGEBACK_CORRECTION, ]; } /** @@ -665,7 +681,7 @@ public function getBalancePlatform() /** * Sets balancePlatform * - * @param string $balancePlatform Unique identifier of the balance platform. + * @param string $balancePlatform The unique identifier of the balance platform. * * @return self */ @@ -692,7 +708,7 @@ public function getBookingDate() /** * Sets bookingDate * - * @param \DateTime $bookingDate The date the transaction was booked to the balance account. + * @param \DateTime $bookingDate The date the transaction was booked into the balance account. * * @return self */ @@ -864,7 +880,7 @@ public function getEventId() /** * Sets eventId * - * @param string|null $eventId The PSP reference in the journal. + * @param string|null $eventId The PSP reference of the transaction in the journal. * * @return self */ @@ -891,7 +907,7 @@ public function getId() /** * Sets id * - * @param string $id Unique identifier of the transaction. + * @param string $id The unique identifier of the transaction. * * @return self */ @@ -945,7 +961,7 @@ public function getPaymentInstrumentId() /** * Sets paymentInstrumentId * - * @param string|null $paymentInstrumentId Unique identifier of the payment instrument that was used for the transaction. + * @param string|null $paymentInstrumentId The unique identifier of the payment instrument that was used for the transaction. * * @return self */ diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index 5b012dab0..f20843f58 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -326,16 +326,19 @@ public function getModelName() public const PRIORITY_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_APPROVAL_PENDING = 'approvalPending'; public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; @@ -386,10 +389,6 @@ public function getModelName() public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; public const STATUS_MISC_COST = 'miscCost'; public const STATUS_MISC_COST_PENDING = 'miscCostPending'; - public const STATUS_OPERATION_AUTHORIZED = 'operationAuthorized'; - public const STATUS_OPERATION_BOOKED = 'operationBooked'; - public const STATUS_OPERATION_PENDING = 'operationPending'; - public const STATUS_OPERATION_RECEIVED = 'operationReceived'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; public const STATUS_RECEIVED = 'received'; @@ -459,16 +458,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, ]; } @@ -529,10 +531,6 @@ public function getStatusAllowableValues() self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, self::STATUS_MISC_COST, self::STATUS_MISC_COST_PENDING, - self::STATUS_OPERATION_AUTHORIZED, - self::STATUS_OPERATION_BOOKED, - self::STATUS_OPERATION_PENDING, - self::STATUS_OPERATION_RECEIVED, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, self::STATUS_RECEIVED, @@ -806,7 +804,7 @@ public function getCategory() /** * Sets category * - * @param string $category The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * @param string $category The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. * * @return self */ @@ -1044,7 +1042,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. * * @return self */ diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index 13dedfea8..db4859a23 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -49,7 +49,6 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'category' => 'string', 'counterparty' => '\Adyen\Model\Transfers\CounterpartyInfoV3', 'description' => 'string', - 'id' => 'string', 'paymentInstrumentId' => 'string', 'priority' => 'string', 'reference' => 'string', @@ -70,7 +69,6 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'category' => null, 'counterparty' => null, 'description' => null, - 'id' => null, 'paymentInstrumentId' => null, 'priority' => null, 'reference' => null, @@ -89,7 +87,6 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'category' => false, 'counterparty' => false, 'description' => false, - 'id' => false, 'paymentInstrumentId' => false, 'priority' => false, 'reference' => false, @@ -188,7 +185,6 @@ public function isNullableSetToNull(string $property): bool 'category' => 'category', 'counterparty' => 'counterparty', 'description' => 'description', - 'id' => 'id', 'paymentInstrumentId' => 'paymentInstrumentId', 'priority' => 'priority', 'reference' => 'reference', @@ -207,7 +203,6 @@ public function isNullableSetToNull(string $property): bool 'category' => 'setCategory', 'counterparty' => 'setCounterparty', 'description' => 'setDescription', - 'id' => 'setId', 'paymentInstrumentId' => 'setPaymentInstrumentId', 'priority' => 'setPriority', 'reference' => 'setReference', @@ -226,7 +221,6 @@ public function isNullableSetToNull(string $property): bool 'category' => 'getCategory', 'counterparty' => 'getCounterparty', 'description' => 'getDescription', - 'id' => 'getId', 'paymentInstrumentId' => 'getPaymentInstrumentId', 'priority' => 'getPriority', 'reference' => 'getReference', @@ -340,7 +334,6 @@ public function __construct(array $data = null) $this->setIfExists('category', $data ?? [], null); $this->setIfExists('counterparty', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('paymentInstrumentId', $data ?? [], null); $this->setIfExists('priority', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); @@ -562,33 +555,6 @@ public function setDescription($description) 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; - } - /** * Gets paymentInstrumentId * diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 3f39a1d2e..0ae12cde8 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -167,15 +167,15 @@ public function createBalanceAccount(\Adyen\Model\BalancePlatform\BalanceAccount * Create a sweep * * @param string $balanceAccountId - * @param \Adyen\Model\BalancePlatform\SweepConfigurationV2 $sweepConfigurationV2 + * @param \Adyen\Model\BalancePlatform\CreateSweepConfigurationV2 $createSweepConfigurationV2 * @param array|null $requestOptions * @return \Adyen\Model\BalancePlatform\SweepConfigurationV2 * @throws AdyenException */ - public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatform\SweepConfigurationV2 $sweepConfigurationV2, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 + public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatform\CreateSweepConfigurationV2 $createSweepConfigurationV2, array $requestOptions = null): \Adyen\Model\BalancePlatform\SweepConfigurationV2 { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}'], [$balanceAccountId], "/balanceAccounts/{balanceAccountId}/sweeps"); - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $sweepConfigurationV2->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $createSweepConfigurationV2->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\SweepConfigurationV2::class); } } diff --git a/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php b/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php new file mode 100644 index 000000000..7c592f27b --- /dev/null +++ b/src/Adyen/Service/BalancePlatform/TransferRoutesApi.php @@ -0,0 +1,56 @@ +baseURL = $this->createBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * Calculate transfer routes + * + * @param \Adyen\Model\BalancePlatform\TransferRouteRequest $transferRouteRequest + * @param array|null $requestOptions + * @return \Adyen\Model\BalancePlatform\TransferRouteResponse + * @throws AdyenException + */ + public function calculateTransferRoutes(\Adyen\Model\BalancePlatform\TransferRouteRequest $transferRouteRequest, array $requestOptions = null): \Adyen\Model\BalancePlatform\TransferRouteResponse + { + $endpoint = $this->baseURL . "/transferRoutes/calculate"; + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $transferRouteRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\BalancePlatform\TransferRouteResponse::class); + } +} diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 2c9bb58c3..652995197 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,14 +44,13 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - * @return \Adyen\Model\Checkout\StoredPaymentMethodResource + * @throws AdyenException */ - public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null): \Adyen\Model\Checkout\StoredPaymentMethodResource + public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); - $response = $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\StoredPaymentMethodResource::class); + $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); } /** diff --git a/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php b/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php new file mode 100644 index 000000000..c91d543a5 --- /dev/null +++ b/src/Adyen/Service/Management/AndroidFilesCompanyLevelApi.php @@ -0,0 +1,87 @@ +baseURL = $this->createBaseUrl("https://management-test.adyen.com/v1"); + } + + /** + * Get a list of Android apps + * + * @param string $companyId + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'packageName'=> string, 'versionCode'=> int]] + * @return \Adyen\Model\Management\AndroidAppsResponse + * @throws AdyenException + */ + public function listAndroidApps(string $companyId, array $requestOptions = null): \Adyen\Model\Management\AndroidAppsResponse + { + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidApps"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidAppsResponse::class); + } + + /** + * Get Android app + * + * @param string $companyId + * @param string $id + * @param array|null $requestOptions + * @return \Adyen\Model\Management\AndroidApp + * @throws AdyenException + */ + public function getAndroidApp(string $companyId, string $id, array $requestOptions = null): \Adyen\Model\Management\AndroidApp + { + $endpoint = $this->baseURL . str_replace(['{companyId}', '{id}'], [$companyId, $id], "/companies/{companyId}/androidApps/{id}"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidApp::class); + } + + /** + * Get a list of Android certificates + * + * @param string $companyId + * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'certificateName'=> string]] + * @return \Adyen\Model\Management\AndroidCertificatesResponse + * @throws AdyenException + */ + public function listAndroidCertificates(string $companyId, array $requestOptions = null): \Adyen\Model\Management\AndroidCertificatesResponse + { + $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidCertificates"); + $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); + return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidCertificatesResponse::class); + } +} diff --git a/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php b/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php index b3a6104f5..346ad3e75 100644 --- a/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/TerminalActionsCompanyLevelApi.php @@ -39,36 +39,6 @@ public function __construct(Client $client) $this->baseURL = $this->createBaseUrl("https://management-test.adyen.com/v1"); } - /** - * Get a list of Android apps - * - * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'packageName'=> string, 'versionCode'=> int]] - * @return \Adyen\Model\Management\AndroidAppsResponse - * @throws AdyenException - */ - public function listAndroidApps(string $companyId, array $requestOptions = null): \Adyen\Model\Management\AndroidAppsResponse - { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidApps"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidAppsResponse::class); - } - - /** - * Get a list of Android certificates - * - * @param string $companyId - * @param array|null $requestOptions ['queryParams' => ['pageNumber'=> int, 'pageSize'=> int, 'certificateName'=> string]] - * @return \Adyen\Model\Management\AndroidCertificatesResponse - * @throws AdyenException - */ - public function listAndroidCertificates(string $companyId, array $requestOptions = null): \Adyen\Model\Management\AndroidCertificatesResponse - { - $endpoint = $this->baseURL . str_replace(['{companyId}'], [$companyId], "/companies/{companyId}/androidCertificates"); - $response = $this->requestHttp($endpoint, strtolower('GET'), null, $requestOptions); - return ObjectSerializer::deserialize($response, \Adyen\Model\Management\AndroidCertificatesResponse::class); - } - /** * Get a list of terminal actions * diff --git a/tests/Unit/ModelBasedCheckoutTest.php b/tests/Unit/ModelBasedCheckoutTest.php index 06b261921..e219d1d61 100644 --- a/tests/Unit/ModelBasedCheckoutTest.php +++ b/tests/Unit/ModelBasedCheckoutTest.php @@ -320,10 +320,7 @@ public function testDeleteStoredPaymentMethodsSuccess($jsonFile, $httpStatus) $service = new RecurringApi($client); - $result = $service->deleteTokenForStoredPaymentDetails("123"); - - $this->assertEquals("CS16116100127511AF", $result->getId()); - $this->assertEquals("networkRef", $result->getNetworkTxReference()); + $service->deleteTokenForStoredPaymentDetails("123"); } public static function successDeleteStoredPaymentMethodsProvider()